All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ceph: fix posix acl couldn't be settable
@ 2020-02-10 13:58 xiubli
  2020-02-10 14:52 ` Xiubo Li
  0 siblings, 1 reply; 4+ messages in thread
From: xiubli @ 2020-02-10 13:58 UTC (permalink / raw)
  To: jlayton, idryomov; +Cc: sage, zyan, dhowells, ceph-devel, Xiubo Li

From: Xiubo Li <xiubli@redhat.com>

For the old mount API, the module parameters parseing function will
be called in ceph_mount() and also just after the default posix acl
flag set, so we can control to enable/disable it via the mount option.

But for the new mount API, it will call the module parameters
parseing function before ceph_get_tree(), so the posix acl will always
be enabled.

Fixes: 82995cc6c5ae ("libceph, rbd, ceph: convert to use the new mount API")
Signed-off-by: Xiubo Li <xiubli@redhat.com>
---
 fs/ceph/super.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 5fef4f59e13e..69fa498391dc 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -341,6 +341,10 @@ static int ceph_parse_mount_param(struct fs_context *fc,
 	unsigned int mode;
 	int token, ret;
 
+#ifdef CONFIG_CEPH_FS_POSIX_ACL
+	fc->sb_flags |= SB_POSIXACL;
+#endif
+
 	ret = ceph_parse_param(param, pctx->copts, fc);
 	if (ret != -ENOPARAM)
 		return ret;
@@ -1089,10 +1093,6 @@ static int ceph_get_tree(struct fs_context *fc)
 	if (!fc->source)
 		return invalf(fc, "ceph: No source");
 
-#ifdef CONFIG_CEPH_FS_POSIX_ACL
-	fc->sb_flags |= SB_POSIXACL;
-#endif
-
 	/* create client (which we may/may not use) */
 	fsc = create_fs_client(pctx->opts, pctx->copts);
 	pctx->opts = NULL;
-- 
2.21.0

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

* Re: [PATCH] ceph: fix posix acl couldn't be settable
  2020-02-10 13:58 [PATCH] ceph: fix posix acl couldn't be settable xiubli
@ 2020-02-10 14:52 ` Xiubo Li
  2020-02-10 19:45   ` Ilya Dryomov
  0 siblings, 1 reply; 4+ messages in thread
From: Xiubo Li @ 2020-02-10 14:52 UTC (permalink / raw)
  To: jlayton, idryomov; +Cc: sage, zyan, dhowells, ceph-devel

On 2020/2/10 21:58, xiubli@redhat.com wrote:
> From: Xiubo Li <xiubli@redhat.com>
>
> For the old mount API, the module parameters parseing function will
> be called in ceph_mount() and also just after the default posix acl
> flag set, so we can control to enable/disable it via the mount option.
>
> But for the new mount API, it will call the module parameters
> parseing function before ceph_get_tree(), so the posix acl will always
> be enabled.
>
> Fixes: 82995cc6c5ae ("libceph, rbd, ceph: convert to use the new mount API")
> Signed-off-by: Xiubo Li <xiubli@redhat.com>
> ---
>   fs/ceph/super.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/fs/ceph/super.c b/fs/ceph/super.c
> index 5fef4f59e13e..69fa498391dc 100644
> --- a/fs/ceph/super.c
> +++ b/fs/ceph/super.c
> @@ -341,6 +341,10 @@ static int ceph_parse_mount_param(struct fs_context *fc,
>   	unsigned int mode;
>   	int token, ret;
>   
> +#ifdef CONFIG_CEPH_FS_POSIX_ACL
> +	fc->sb_flags |= SB_POSIXACL;
> +#endif
> +

Maybe we should move this to ceph_init_fs_context().

>   	ret = ceph_parse_param(param, pctx->copts, fc);
>   	if (ret != -ENOPARAM)
>   		return ret;
> @@ -1089,10 +1093,6 @@ static int ceph_get_tree(struct fs_context *fc)
>   	if (!fc->source)
>   		return invalf(fc, "ceph: No source");
>   
> -#ifdef CONFIG_CEPH_FS_POSIX_ACL
> -	fc->sb_flags |= SB_POSIXACL;
> -#endif
> -
>   	/* create client (which we may/may not use) */
>   	fsc = create_fs_client(pctx->opts, pctx->copts);
>   	pctx->opts = NULL;

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

* Re: [PATCH] ceph: fix posix acl couldn't be settable
  2020-02-10 14:52 ` Xiubo Li
@ 2020-02-10 19:45   ` Ilya Dryomov
  2020-02-11  1:09     ` Xiubo Li
  0 siblings, 1 reply; 4+ messages in thread
From: Ilya Dryomov @ 2020-02-10 19:45 UTC (permalink / raw)
  To: Xiubo Li
  Cc: Jeff Layton, Sage Weil, Yan, Zheng, David Howells, Ceph Development

On Mon, Feb 10, 2020 at 3:52 PM Xiubo Li <xiubli@redhat.com> wrote:
>
> On 2020/2/10 21:58, xiubli@redhat.com wrote:
> > From: Xiubo Li <xiubli@redhat.com>
> >
> > For the old mount API, the module parameters parseing function will
> > be called in ceph_mount() and also just after the default posix acl
> > flag set, so we can control to enable/disable it via the mount option.
> >
> > But for the new mount API, it will call the module parameters
> > parseing function before ceph_get_tree(), so the posix acl will always
> > be enabled.
> >
> > Fixes: 82995cc6c5ae ("libceph, rbd, ceph: convert to use the new mount API")
> > Signed-off-by: Xiubo Li <xiubli@redhat.com>
> > ---
> >   fs/ceph/super.c | 8 ++++----
> >   1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/fs/ceph/super.c b/fs/ceph/super.c
> > index 5fef4f59e13e..69fa498391dc 100644
> > --- a/fs/ceph/super.c
> > +++ b/fs/ceph/super.c
> > @@ -341,6 +341,10 @@ static int ceph_parse_mount_param(struct fs_context *fc,
> >       unsigned int mode;
> >       int token, ret;
> >
> > +#ifdef CONFIG_CEPH_FS_POSIX_ACL
> > +     fc->sb_flags |= SB_POSIXACL;
> > +#endif
> > +
>
> Maybe we should move this to ceph_init_fs_context().

Hi Xiubo,

Yes -- so it is together with fsopt defaults.

Thanks,

                Ilya

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

* Re: [PATCH] ceph: fix posix acl couldn't be settable
  2020-02-10 19:45   ` Ilya Dryomov
@ 2020-02-11  1:09     ` Xiubo Li
  0 siblings, 0 replies; 4+ messages in thread
From: Xiubo Li @ 2020-02-11  1:09 UTC (permalink / raw)
  To: Ilya Dryomov
  Cc: Jeff Layton, Sage Weil, Yan, Zheng, David Howells, Ceph Development

On 2020/2/11 3:45, Ilya Dryomov wrote:
> On Mon, Feb 10, 2020 at 3:52 PM Xiubo Li <xiubli@redhat.com> wrote:
>> On 2020/2/10 21:58, xiubli@redhat.com wrote:
>>> From: Xiubo Li <xiubli@redhat.com>
>>>
>>> For the old mount API, the module parameters parseing function will
>>> be called in ceph_mount() and also just after the default posix acl
>>> flag set, so we can control to enable/disable it via the mount option.
>>>
>>> But for the new mount API, it will call the module parameters
>>> parseing function before ceph_get_tree(), so the posix acl will always
>>> be enabled.
>>>
>>> Fixes: 82995cc6c5ae ("libceph, rbd, ceph: convert to use the new mount API")
>>> Signed-off-by: Xiubo Li <xiubli@redhat.com>
>>> ---
>>>    fs/ceph/super.c | 8 ++++----
>>>    1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/fs/ceph/super.c b/fs/ceph/super.c
>>> index 5fef4f59e13e..69fa498391dc 100644
>>> --- a/fs/ceph/super.c
>>> +++ b/fs/ceph/super.c
>>> @@ -341,6 +341,10 @@ static int ceph_parse_mount_param(struct fs_context *fc,
>>>        unsigned int mode;
>>>        int token, ret;
>>>
>>> +#ifdef CONFIG_CEPH_FS_POSIX_ACL
>>> +     fc->sb_flags |= SB_POSIXACL;
>>> +#endif
>>> +
>> Maybe we should move this to ceph_init_fs_context().
> Hi Xiubo,
>
> Yes -- so it is together with fsopt defaults.
>
Okay, will fix it.

Thanks.

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

end of thread, other threads:[~2020-02-11  1:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 13:58 [PATCH] ceph: fix posix acl couldn't be settable xiubli
2020-02-10 14:52 ` Xiubo Li
2020-02-10 19:45   ` Ilya Dryomov
2020-02-11  1:09     ` Xiubo Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.