Skip to content

overlayfs: Delayed copy up of data

Vivek Goyal linux-unionfs 15 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v15 Latest30 patches 46 repliesIn review
  2. v1431 patches 35 repliesSuperseded
  3. v1328 patches 62 repliesSuperseded
Earlier versions · 12
VersionPostedPatchesRepliesStatus
v1217 patches45 repliesSuperseded
v1118 patches7 repliesSuperseded
v1018 patches14 repliesSuperseded
v915 patches32 repliesSuperseded
v8 RFC15 patches6 repliesSuperseded
v7 RFC14 patches18 repliesSuperseded
v6 RFC15 patches19 repliesSuperseded
v5 RFC13 patches30 repliesSuperseded
v4 RFC11 patches36 repliesSuperseded
v3 RFC9 patches21 repliesSuperseded
v2 RFC8 patches6 repliesSuperseded
v1 RFC7 patches22 repliesSuperseded

Changes in v15 from the cover letter

- Rebased on top of latest overlayfs-rorw branch.
- Took care of amir's comments on V14.
- Started passing arguments to ovl_get_inode() in a structure, as argument list was getting too long.
- Simplified ovl_fsync() and helper patches a bit.
- unioned new field lowerdata with dir cache.
- Renamed few helper functions with suffix _realdata instead of
- Renamed ovl_rel_redirect() to ovl_need_absolute_redirect() and also now started calling it from ovl_set_redirect() instead of calling from ovl_reaname() directly.
- Added argument padding to ovl_get_redirect_xattr() and reused this function in ovl_check_redirect().
- Added a helper funciton ovl_copy_up_with_data() to force full copy up (metadata plus data).

Patches in v15 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/30ovl: Pass argument to ovl_get_inode() in a structurefs/overlayfs/export.c fs/overlayfs/inode.c fs/overlayfs/namei.c +2 more+26 -154 replies
2/30ovl: Initialize ovl_inode->redirect in ovl_get_inode()fs/overlayfs/export.c fs/overlayfs/inode.c fs/overlayfs/namei.c +1 more+8 -91 reply
3/30ovl: Move the copy up helpers to copy_up.cfs/overlayfs/copy_up.c fs/overlayfs/inode.c fs/overlayfs/overlayfs.h+33 -330 replies
4/30ovl: Provide a mount option metacopy=on/off for metadata copyupDocumentation/filesystems/overlayfs.txt fs/overlayfs/Kconfig fs/overlayfs/ovl_entry.h +1 more+92 -40 replies
5/30ovl: During copy up, first copy up metadata and then datafs/overlayfs/copy_up.c+17 -190 replies
6/30ovl: Copy up only metadata during copy up where it makes sensefs/overlayfs/copy_up.c+24 -10 replies
7/30ovl: Add helper ovl_already_copied_up()fs/overlayfs/copy_up.c fs/overlayfs/overlayfs.h fs/overlayfs/util.c+28 -190 replies
8/30ovl: A new xattr OVL_XATTR_METACOPY for file on upperfs/overlayfs/copy_up.c fs/overlayfs/dir.c fs/overlayfs/overlayfs.h +2 more+143 -110 replies
9/30ovl: Use out_err instead of out_nomemfs/overlayfs/inode.c+10 -70 replies
10/30ovl: Modify ovl_lookup() and friends to lookup metacopy dentryfs/overlayfs/export.c fs/overlayfs/inode.c fs/overlayfs/namei.c +2 more+130 -1520 replies
11/30ovl: Copy up meta inode data from lowest data inodefs/overlayfs/copy_up.c fs/overlayfs/overlayfs.h fs/overlayfs/util.c+25 -40 replies
12/30ovl: Add helper ovl_dentry_lowerdata() to get lower data dentryfs/overlayfs/overlayfs.h fs/overlayfs/util.c+15 -00 replies
13/30ovl: Add an helper to get real data dentryfs/overlayfs/overlayfs.h fs/overlayfs/util.c+13 -00 replies
14/30ovl: Fix ovl_getattr() to get number of blocks from lowerfs/overlayfs/inode.c fs/overlayfs/overlayfs.h fs/overlayfs/util.c+51 -10 replies
15/30ovl: Store lower data inode in ovl_inodefs/overlayfs/export.c fs/overlayfs/inode.c fs/overlayfs/namei.c +4 more+29 -92 replies
16/30ovl: Add helper ovl_inode_real_data()fs/overlayfs/overlayfs.h fs/overlayfs/util.c+13 -01 reply
17/30ovl: Open file with data except for the case of fsyncfs/overlayfs/file.c+33 -167 replies
18/30ovl: Do not expose metacopy only dentry from d_real()fs/overlayfs/super.c+3 -21 reply
19/30ovl: Move some dir related ovl_lookup_single() code in else blockfs/overlayfs/namei.c+15 -140 replies
20/30ovl: Check redirects for metacopy filesfs/overlayfs/namei.c+2 -20 replies
21/30ovl: Treat metacopy dentries as type OVL_PATH_MERGEfs/overlayfs/util.c+2 -10 replies
22/30ovl: Add an inode flag OVL_CONST_INOfs/overlayfs/inode.c fs/overlayfs/overlayfs.h+5 -00 replies
23/30ovl: Do not set dentry type ORIGIN for broken hardlinksfs/overlayfs/util.c+2 -10 replies
24/30ovl: Set redirect on metacopy files upon renamefs/overlayfs/dir.c+46 -201 reply
25/30ovl: Set redirect on upper inode when it is linkedfs/overlayfs/dir.c+14 -40 replies
26/30ovl: Check redirect on index as wellfs/overlayfs/namei.c fs/overlayfs/overlayfs.h fs/overlayfs/util.c+64 -352 replies
27/30ovl: Disbale metacopy for MAP_SHARED mmap()fs/overlayfs/copy_up.c fs/overlayfs/file.c fs/overlayfs/overlayfs.h+7 -10 replies
28/30ovl: Do not do metadata only copy-up for truncate operationfs/overlayfs/inode.c+8 -10 replies
29/30ovl: Do not do metacopy only for ioctl modifying file attrfs/overlayfs/file.c+1 -10 replies
30/30ovl: Enable metadata only featurefs/overlayfs/copy_up.c+0 -30 replies

Reviews trailers per patch

All 30 patches have a Reviewed-by or Acked-by.

PatchAmir Goldstein
1/30R-b R-b
2/30R-b R-b
3/30R-b
4/30R-b
5/30R-b
6/30R-b
7/30R-b
8/30R-b
9/30R-b
10/30R-b R-b R-b
11/30R-b
12/30R-b
13/30R-b
14/30R-b
15/30R-b R-b
16/30R-b
17/30R-b R-b R-b
18/30R-b
19/30R-b
20/30R-b
21/30R-b
22/30R-b
23/30R-b
24/30R-b
25/30R-b
26/30R-b R-b
27/30R-b
28/30R-b
29/30R-b
30/30R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v15 thread

Cover letter [PATCH v15 00/30] overlayfs: Delayed copy up of data

Hi,

This is V15 of overlayfs metadata only copy-up feature. These patches I have rebased on top of Miklos overlayfs-next tree's branch overlayfs-rorw.

git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs.git overlayfs-rorw

Patches are also available here.

https://github.com/rhvgoyal/linux/commits/metacopy-v15

I have run unionmount-testsuite and "./check -overlay -g quick" and that works. Only 4 overlay tests fail, which fail on vanilla kernel too.

Changes from V14:

- Rebased on top of latest overlayfs-rorw branch.
- Took care of amir's comments on V14.
- Started passing arguments to ovl_get_inode() in a structure, as argument list was getting too long.
- Simplified ovl_fsync() and helper patches a bit.
- unioned new field lowerdata with dir cache.
- Renamed few helper functions with suffix _realdata instead of
- Renamed ovl_rel_redirect() to ovl_need_absolute_redirect() and also now started calling it from ovl_set_redirect() instead of calling from ovl_reaname() directly.
- Added argument padding to ovl_get_redirect_xattr() and reused this function in ovl_check_redirect().
- Added a helper funciton ovl_copy_up_with_data() to force full copy up (metadata plus data).

Thanks
Vivek

Vivek Goyal (30):
ovl: Pass argument to ovl_get_inode() in a structure
ovl: Initialize ovl_inode->redirect in ovl_get_inode()
ovl: Move the copy up helpers to copy_up.c
ovl: Provide a mount option metacopy=on/off for metadata copyup
ovl: During copy up, first copy up metadata and then data
ovl: Copy up only metadata during copy up where it makes sense
ovl: Add helper ovl_already_copied_up()
ovl: A new xattr OVL_XATTR_METACOPY for file on upper
ovl: Use out_err instead of out_nomem
ovl: Modify ovl_lookup() and friends to lookup metacopy dentry
ovl: Copy up meta inode data from lowest data inode
ovl: Add helper ovl_dentry_lowerdata() to get lower data dentry
ovl: Add an helper to get real data dentry
ovl: Fix ovl_getattr() to get number of blocks from lower
ovl: Store lower data inode in ovl_inode
ovl: Add helper ovl_inode_real_data()
ovl: Open file with data except for the case of fsync
ovl: Do not expose metacopy only dentry from d_real()
ovl: Move some dir related ovl_lookup_single() code in else block
ovl: Check redirects for metacopy files
ovl: Treat metacopy dentries as type OVL_PATH_MERGE
ovl: Add an inode flag OVL_CONST_INO
ovl: Do not set dentry type ORIGIN for broken hardlinks
ovl: Set redirect on metacopy files upon rename
ovl: Set redirect on upper inode when it is linked
ovl: Check redirect on index as well
ovl: Disbale metacopy for MAP_SHARED mmap()
ovl: Do not do metadata only copy-up for truncate operation
ovl: Do not do metacopy only for ioctl modifying file attr
ovl: Enable metadata only feature

 Documentation/filesystems/overlayfs.txt |  30 +++-
 fs/overlayfs/Kconfig                    |  19 +++
 fs/overlayfs/copy_up.c                  | 161 ++++++++++++++++-----
 fs/overlayfs/dir.c                      |  85 ++++++++---
 fs/overlayfs/export.c                   |   8 +-
 fs/overlayfs/file.c                     |  53 ++++---
 fs/overlayfs/inode.c                    | 131 ++++++++++-------
 fs/overlayfs/namei.c                    | 199 ++++++++++++++++---------
 fs/overlayfs/overlayfs.h                |  36 ++++-
 fs/overlayfs/ovl_entry.h                |  16 +-
 fs/overlayfs/super.c                    |  60 +++++++-
 fs/overlayfs/util.c                     | 249 +++++++++++++++++++++++++++++++-
 12 files changed, 829 insertions(+), 218 deletions(-)
Signature · 1 line
2.13.6