Skip to content

Commit 538140c

Browse files
committed
Merge tag 'ovl-update-6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs
Pull more overlayfs updates from Amir Goldstein: "This is a small 'move code around' followup by Christian to his work on porting overlayfs to the new mount api for 6.5. It makes things a bit cleaner and simpler for the next development cycle when I hand overlayfs back over to Miklos" * tag 'ovl-update-6.5-2' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs: ovl: move all parameter handling into params.{c,h}
2 parents 94c7695 + 7fb7998 commit 538140c

4 files changed

Lines changed: 581 additions & 564 deletions

File tree

fs/overlayfs/overlayfs.h

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ enum {
7070
OVL_XINO_ON,
7171
};
7272

73-
/* The set of options that user requested explicitly via mount options */
74-
struct ovl_opt_set {
75-
bool metacopy;
76-
bool redirect;
77-
bool nfs_export;
78-
bool index;
79-
};
80-
8173
/*
8274
* The tuple (fh,uuid) is a universal unique identifier for a copy up origin,
8375
* where:
@@ -368,30 +360,6 @@ static inline bool ovl_open_flags_need_copy_up(int flags)
368360
return ((OPEN_FMODE(flags) & FMODE_WRITE) || (flags & O_TRUNC));
369361
}
370362

371-
372-
/* params.c */
373-
#define OVL_MAX_STACK 500
374-
375-
struct ovl_fs_context_layer {
376-
char *name;
377-
struct path path;
378-
};
379-
380-
struct ovl_fs_context {
381-
struct path upper;
382-
struct path work;
383-
size_t capacity;
384-
size_t nr; /* includes nr_data */
385-
size_t nr_data;
386-
struct ovl_opt_set set;
387-
struct ovl_fs_context_layer *lower;
388-
};
389-
390-
int ovl_parse_param_upperdir(const char *name, struct fs_context *fc,
391-
bool workdir);
392-
int ovl_parse_param_lowerdir(const char *name, struct fs_context *fc);
393-
void ovl_parse_param_drop_lowerdir(struct ovl_fs_context *ctx);
394-
395363
/* util.c */
396364
int ovl_want_write(struct dentry *dentry);
397365
void ovl_drop_write(struct dentry *dentry);
@@ -791,3 +759,12 @@ int ovl_set_origin(struct ovl_fs *ofs, struct dentry *lower,
791759

792760
/* export.c */
793761
extern const struct export_operations ovl_export_operations;
762+
763+
/* super.c */
764+
int ovl_fill_super(struct super_block *sb, struct fs_context *fc);
765+
766+
/* Will this overlay be forced to mount/remount ro? */
767+
static inline bool ovl_force_readonly(struct ovl_fs *ofs)
768+
{
769+
return (!ovl_upper_mnt(ofs) || !ofs->workdir);
770+
}

0 commit comments

Comments
 (0)