Skip to content

Commit

Permalink
Merge tag 'ovl-update-6.5-2' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/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}
  • Loading branch information
Linus Torvalds committed Jul 4, 2023
2 parents 94c7695 + 7fb7998 commit 538140c
Show file tree
Hide file tree
Showing 4 changed files with 581 additions and 564 deletions.
41 changes: 9 additions & 32 deletions fs/overlayfs/overlayfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,6 @@ enum {
OVL_XINO_ON,
};

/* The set of options that user requested explicitly via mount options */
struct ovl_opt_set {
bool metacopy;
bool redirect;
bool nfs_export;
bool index;
};

/*
* The tuple (fh,uuid) is a universal unique identifier for a copy up origin,
* where:
Expand Down Expand Up @@ -368,30 +360,6 @@ static inline bool ovl_open_flags_need_copy_up(int flags)
return ((OPEN_FMODE(flags) & FMODE_WRITE) || (flags & O_TRUNC));
}


/* params.c */
#define OVL_MAX_STACK 500

struct ovl_fs_context_layer {
char *name;
struct path path;
};

struct ovl_fs_context {
struct path upper;
struct path work;
size_t capacity;
size_t nr; /* includes nr_data */
size_t nr_data;
struct ovl_opt_set set;
struct ovl_fs_context_layer *lower;
};

int ovl_parse_param_upperdir(const char *name, struct fs_context *fc,
bool workdir);
int ovl_parse_param_lowerdir(const char *name, struct fs_context *fc);
void ovl_parse_param_drop_lowerdir(struct ovl_fs_context *ctx);

/* util.c */
int ovl_want_write(struct dentry *dentry);
void ovl_drop_write(struct dentry *dentry);
Expand Down Expand Up @@ -791,3 +759,12 @@ int ovl_set_origin(struct ovl_fs *ofs, struct dentry *lower,

/* export.c */
extern const struct export_operations ovl_export_operations;

/* super.c */
int ovl_fill_super(struct super_block *sb, struct fs_context *fc);

/* Will this overlay be forced to mount/remount ro? */
static inline bool ovl_force_readonly(struct ovl_fs *ofs)
{
return (!ovl_upper_mnt(ofs) || !ofs->workdir);
}
Loading

0 comments on commit 538140c

Please sign in to comment.