NACK: Re: [PATCH 1/2][SRU][EOAN] UBUNTU: SAUCE: shiftfs: rework how shiftfs opens files

Christian Brauner christian.brauner at ubuntu.com
Wed Oct 2 07:45:54 UTC 2019


On Tue, Oct 01, 2019 at 10:55:41PM +0200, Christian Brauner wrote:
> From: Christian Brauner <christian at brauner.io>
> 
> 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>

Will resend as a separate patch so that each patch corresponds to one
bug report.

Thanks!
Christian



More information about the kernel-team mailing list