diff options
author | Chengguang Xu <cgxu519@mykernel.net> | 2020-04-24 04:55:17 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2020-05-13 11:11:24 +0200 |
commit | c21c839b8448dd4b1e37ffc1bde928f57d34c0db (patch) | |
tree | 72887c93eebea1c78fbd61d032cbc06191d082f4 /fs/overlayfs/ovl_entry.h | |
parent | ovl: inherit SB_NOSEC flag from upperdir (diff) | |
download | linux-c21c839b8448dd4b1e37ffc1bde928f57d34c0db.tar.xz linux-c21c839b8448dd4b1e37ffc1bde928f57d34c0db.zip |
ovl: whiteout inode sharing
Share inode with different whiteout files for saving inode and speeding up
delete operation.
If EMLINK is encountered when linking a shared whiteout, create a new one.
In case of any other error, disable sharing for this super block.
Note: ofs->whiteout is protected by inode lock on workdir.
Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/ovl_entry.h')
-rw-r--r-- | fs/overlayfs/ovl_entry.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/overlayfs/ovl_entry.h b/fs/overlayfs/ovl_entry.h index 5762d802fe01..a8f82fb7ffb4 100644 --- a/fs/overlayfs/ovl_entry.h +++ b/fs/overlayfs/ovl_entry.h @@ -68,6 +68,7 @@ struct ovl_fs { /* Did we take the inuse lock? */ bool upperdir_locked; bool workdir_locked; + bool share_whiteout; /* Traps in ovl inode cache */ struct inode *upperdir_trap; struct inode *workbasedir_trap; @@ -77,6 +78,8 @@ struct ovl_fs { int xino_mode; /* For allocation of non-persistent inode numbers */ atomic_long_t last_ino; + /* Whiteout dentry cache */ + struct dentry *whiteout; }; static inline struct ovl_fs *OVL_FS(struct super_block *sb) |