* [PATCH v2] ceph: fix posix acl couldn't be settable
@ 2020-02-11 6:53 xiubli
2020-02-11 10:35 ` Ilya Dryomov
2020-02-11 12:07 ` Jeff Layton
0 siblings, 2 replies; 3+ messages in thread
From: xiubli @ 2020-02-11 6:53 UTC (permalink / raw)
To: jlayton, idryomov; +Cc: sage, zyan, dhowells, pdonnell, 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>
---
Changed in V2:
- move default fc->sb_flags setting to ceph_init_fs_context().
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..c3d9ac768cec 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -1089,10 +1089,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;
@@ -1215,6 +1211,10 @@ static int ceph_init_fs_context(struct fs_context *fc)
fsopt->max_readdir_bytes = CEPH_MAX_READDIR_BYTES_DEFAULT;
fsopt->congestion_kb = default_congestion_kb();
+#ifdef CONFIG_CEPH_FS_POSIX_ACL
+ fc->sb_flags |= SB_POSIXACL;
+#endif
+
fc->fs_private = pctx;
fc->ops = &ceph_context_ops;
return 0;
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ceph: fix posix acl couldn't be settable
2020-02-11 6:53 [PATCH v2] ceph: fix posix acl couldn't be settable xiubli
@ 2020-02-11 10:35 ` Ilya Dryomov
2020-02-11 12:07 ` Jeff Layton
1 sibling, 0 replies; 3+ messages in thread
From: Ilya Dryomov @ 2020-02-11 10:35 UTC (permalink / raw)
To: Xiubo Li
Cc: Jeff Layton, Sage Weil, Yan, Zheng, David Howells,
Patrick Donnelly, Ceph Development
On Tue, Feb 11, 2020 at 7:53 AM <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>
> ---
>
> Changed in V2:
> - move default fc->sb_flags setting to ceph_init_fs_context().
>
> 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..c3d9ac768cec 100644
> --- a/fs/ceph/super.c
> +++ b/fs/ceph/super.c
> @@ -1089,10 +1089,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;
> @@ -1215,6 +1211,10 @@ static int ceph_init_fs_context(struct fs_context *fc)
> fsopt->max_readdir_bytes = CEPH_MAX_READDIR_BYTES_DEFAULT;
> fsopt->congestion_kb = default_congestion_kb();
>
> +#ifdef CONFIG_CEPH_FS_POSIX_ACL
> + fc->sb_flags |= SB_POSIXACL;
> +#endif
> +
> fc->fs_private = pctx;
> fc->ops = &ceph_context_ops;
> return 0;
Applied.
Thanks,
Ilya
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] ceph: fix posix acl couldn't be settable
2020-02-11 6:53 [PATCH v2] ceph: fix posix acl couldn't be settable xiubli
2020-02-11 10:35 ` Ilya Dryomov
@ 2020-02-11 12:07 ` Jeff Layton
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2020-02-11 12:07 UTC (permalink / raw)
To: xiubli, idryomov; +Cc: sage, zyan, dhowells, pdonnell, ceph-devel
On Tue, 2020-02-11 at 01:53 -0500, 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>
> ---
>
> Changed in V2:
> - move default fc->sb_flags setting to ceph_init_fs_context().
>
> 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..c3d9ac768cec 100644
> --- a/fs/ceph/super.c
> +++ b/fs/ceph/super.c
> @@ -1089,10 +1089,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;
> @@ -1215,6 +1211,10 @@ static int ceph_init_fs_context(struct fs_context *fc)
> fsopt->max_readdir_bytes = CEPH_MAX_READDIR_BYTES_DEFAULT;
> fsopt->congestion_kb = default_congestion_kb();
>
> +#ifdef CONFIG_CEPH_FS_POSIX_ACL
> + fc->sb_flags |= SB_POSIXACL;
> +#endif
> +
> fc->fs_private = pctx;
> fc->ops = &ceph_context_ops;
> return 0;
Nice catch.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-11 12:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-11 6:53 [PATCH v2] ceph: fix posix acl couldn't be settable xiubli
2020-02-11 10:35 ` Ilya Dryomov
2020-02-11 12:07 ` Jeff Layton
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.