[PATCH 0/4] Stash overlay real upper file in backing_file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Al Viro posted a proposal to cleanup overlayfs handling of temporary
cloned real file references [1].

This is a proposal in the opposite direction to get rid of the temporary
cloned file references, because they are inefficient and cause for ugly
subtle code.

Al, I think that with these changes, overlayfs no longer has value in
using the proposed fderr struct?

FWIW, struct backing_file has no dedicated memcache pool - before
Christian's diet to struct file, struct backing_file was 248 bytes on x86
and now it is 200 bytes, so the addition of 8 more bytes to strucy
backing_file changes nothing wrt memory usage.

Miklos,

The implementation of ovl_real_file() helper is roughly based on
ovl_real_dir_file().

do you see any problems with this approach or any races not handled?

Thanks,
Amir.

[1] https://lore.kernel.org/linux-fsdevel/20241003234534.GM4017910@ZenIV/

Amir Goldstein (4):
  ovl: do not open non-data lower file for fsync
  ovl: stash upper real file in backing_file struct
  ovl: convert ovl_real_fdget_meta() callers to ovl_real_file_meta()
  ovl: convert ovl_real_fdget() callers to ovl_real_file()

 fs/file_table.c     |   7 ++
 fs/internal.h       |   6 ++
 fs/overlayfs/file.c | 230 +++++++++++++++++++++++---------------------
 3 files changed, 133 insertions(+), 110 deletions(-)

-- 
2.34.1





[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux