ACK/APPLIED[Unstable]: [PATCH v1][SRU][EOAN] UBUNTU: SAUCE: shiftfs: rework how shiftfs opens files

Seth Forshee seth.forshee at canonical.com
Tue Oct 15 18:25:19 UTC 2019


On Wed, Oct 02, 2019 at 09:57:14AM +0200, Christian Brauner wrote:
> BugLink: https://bugs.launchpad.net/bugs/1846265
> 
> This commit simplifies how shiftfs open files, both regular files an
> directories.
> 
> In the first iteration, we implemented a kmem cache for struct
> shiftfs_file_info which stashed away a struct path and the struct file
> for the underlay. The path however was never used anywhere so the struct
> shiftfs_file_info and therefore the whole kmem cache can go away.
> Instead we move to the same model as overlayfs and just stash away the
> struct file for the underlay in file->private_data of the shiftfs struct
> file.
> Addtionally, we split the .open method for files and directories.
> Similar to overlayfs .open for regular files uses open_with_fake_path()
> which ensures that it doesn't contribute to the open file count (since
> this would mean we'd count double). The .open method for directories
> however used dentry_open() which contributes to the open file count.
> 
> The basic logic for opening files is unchanged. The main point is to
> ensure that a reference to the underlay's dentry is kept through struct
> path.
> 
> Various bits and pieces of this were cooked up in discussions Seth and I
> had in Paris.
> 
> Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>

Looks sane, scope limited to shiftfs.

Acked-by: Seth Forshee <seth.forshee at canonical.com>

Applied to unstable/master, thanks!




More information about the kernel-team mailing list