Re: linux-next: Tree for July 20 (overlayfs)

From: Sedat Dilek
Date: Fri Jul 22 2011 - 05:59:11 EST


On Fri, Jul 22, 2011 at 11:51 AM, Miklos Szeredi <miklos@xxxxxxxxxx> wrote:
> Sedat Dilek <sedat.dilek@xxxxxxxxxxxxxx> writes:
>
>> On Wed, Jul 20, 2011 at 8:48 PM, Sedat Dilek <sedat.dilek@xxxxxxxxxxxxxx> wrote:
>>> Hi,
>>>
>>> I have here a problem with linux-next (next-20110720) and
>>> overlayfs-v10 (not the latest from GIT).
>>>
>>> ### OVERLAYFS
>>> # Patches from mszeredi/vfs.git#overlayfs.v10 (up to commit
>>> 00b27467b181a27c808cef0d66860eba5f450b24)
>>> # "overlay: overlay filesystem documentation"
>>> # See also <http://lkml.org/lkml/2011/6/1/456>
>>> # "[PATCH 0/7] overlay filesystem: request for inclusion"
>>> + overlayfs-v10/overlayfs-v10.patch
>>>
>>> Documentation/filesystems/porting says:
>>>
>>> [mandatory]
>>> Â Â Â Â->permission(), generic_permission() and ->check_acl() have lost flags
>>> argument; instead of passing IPERM_FLAG_RCU we add MAY_NOT_BLOCK into mask.
>>> Â Â Â Âgeneric_permission() has also lost the check_acl argument; if you want
>>> non-NULL to be used for that inode, put it into ->i_op->check_acl.
>>>
>>> I checked with other files below fs/ and changed accordingly.
>>> So, I hope the attached patch is OK (untested, uncompiled)?
>>>
>>> What's the status of OverlayFS anyway, will it be merged into v3.1?
>>>
>>> Regards,
>>> - Sedat -
>>>
>>
>> I checked again and adapted ovl_permission().
>>
>> [ fs/namei.c ]
>> static int acl_permission_check(struct inode *inode, int mask)
>>
>> Here is a v2, which compiles.
>
> Thanks, the patch looks good.
>
> And ->fsync is another one that will have an updated API.
>
> Miklos
>
> ---
> Âfs/overlayfs/readdir.c | Â Â5 +++--
> Â1 file changed, 3 insertions(+), 2 deletions(-)
>
> Index: linux-2.6/fs/overlayfs/readdir.c
> ===================================================================
> --- linux-2.6.orig/fs/overlayfs/readdir.c    2011-07-21 17:07:52.000000000 +0200
> +++ linux-2.6/fs/overlayfs/readdir.c  Â2011-07-21 17:10:20.000000000 +0200
> @@ -386,7 +386,8 @@ static loff_t ovl_dir_llseek(struct file
> Â Â Â Âreturn res;
> Â}
>
> -static int ovl_dir_fsync(struct file *file, int datasync)
> +static int ovl_dir_fsync(struct file *file, loff_t start, loff_t end,
> + Â Â Â Â Â Â Â Â Â Â Â Âint datasync)
> Â{
> Â Â Â Âstruct ovl_dir_file *od = file->private_data;
>
> @@ -400,7 +401,7 @@ static int ovl_dir_fsync(struct file *fi
> Â Â Â Â Â Â Â Â Â Â Â Âreturn PTR_ERR(od->realfile);
> Â Â Â Â}
>
> - Â Â Â return vfs_fsync(od->realfile, datasync);
> + Â Â Â return vfs_fsync_range(od->realfile, start, end, datasync);
> Â}
>
> Âstatic int ovl_dir_release(struct inode *inode, struct file *file)
>

Hi Miklos,

cool, thanks.
I have renamed my patch in the meanwhile to
"ovl-Fix-ovl_permission-by-adding-MAY_NOT_BLOCK-into-mask.patch".

The change was due to...

commit d749519b444db985e40b897f73ce1898b11f997e
"->permission() sanitizing: don't pass flags to generic_permission()" [1].

You want me to do a clean patch or by yourself?

Can you please, do a overlayfs-v11 on top of Linux-3.0?
I hope your work will be accepted into v3.1.

Regards,
- Sedat -

[1] http://git.us.kernel.org/?p=linux/kernel/git/viro/vfs-2.6.git;a=commitdiff;h=d749519b444db985e40b897f73ce1898b11f997e
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/