linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Stash overlay real upper file in backing_file
@ 2024-10-06  8:23 Amir Goldstein
  2024-10-06  8:23 ` [PATCH v2 1/4] ovl: do not open non-data lower file for fsync Amir Goldstein
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Amir Goldstein @ 2024-10-06  8:23 UTC (permalink / raw)
  To: Miklos Szeredi, Al Viro; +Cc: Christian Brauner, linux-fsdevel, linux-unionfs

Hi all,

This is v2 of the code to avoid temporary backing file opens in
overlayfs, taking into account Al's comments on v1 [1].

Miklos,

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

do you see any problems with this approach or any races not handled?
Note that I did have a logical bug in v1 (always choosing the stashed
upperfile if it exists), so there may be more.

Thanks,
Amir.

Changes since v1:
- Use helpers ovl_real_file() and ovl_upper_file() to express that
  ovl_real_file() cannot return NULL
- Fix readability and bug is code to select and store stashed upperfile

[1] https://lore.kernel.org/linux-fsdevel/20241004102342.179434-1-amir73il@gmail.com/

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_path() callers to ovl_real_file_path()
  ovl: convert ovl_real_fdget() callers to ovl_real_file()

 fs/file_table.c     |   7 ++
 fs/internal.h       |   6 +
 fs/overlayfs/file.c | 288 ++++++++++++++++++++++++++------------------
 3 files changed, 182 insertions(+), 119 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-10-07 14:21 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-06  8:23 [PATCH v2 0/4] Stash overlay real upper file in backing_file Amir Goldstein
2024-10-06  8:23 ` [PATCH v2 1/4] ovl: do not open non-data lower file for fsync Amir Goldstein
2024-10-06  8:23 ` [PATCH v2 2/4] ovl: stash upper real file in backing_file struct Amir Goldstein
2024-10-06 21:04   ` Al Viro
2024-10-07  3:03     ` Al Viro
2024-10-07  3:42       ` Al Viro
2024-10-07  6:34         ` Amir Goldstein
2024-10-06  8:23 ` [PATCH v2 3/4] ovl: convert ovl_real_fdget_path() callers to ovl_real_file_path() Amir Goldstein
2024-10-07  3:12   ` Al Viro
2024-10-07  6:36     ` Amir Goldstein
2024-10-06  8:23 ` [PATCH v2 4/4] ovl: convert ovl_real_fdget() callers to ovl_real_file() Amir Goldstein
2024-10-07  9:35 ` [PATCH v2 0/4] Stash overlay real upper file in backing_file Miklos Szeredi
2024-10-07 10:22   ` Amir Goldstein
2024-10-07 10:37     ` Miklos Szeredi
2024-10-07 11:01       ` Amir Goldstein
2024-10-07 11:15         ` Miklos Szeredi
2024-10-07 12:42           ` Amir Goldstein
2024-10-07 14:11         ` Christian Brauner
2024-10-07 14:21           ` Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).