ceph: fix posix acl couldn't be settable
PATCH 1/1 ceph: fix posix acl couldn't be settable
From: Xiubo Li <[email protected]>
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.
--- fs/ceph/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
fs/ceph/super.c +4 -4
@@ -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 ;
Signature · 1 line
2.21.0
Quoted 21 lines · On 2020/2/10 21:58, [email protected] wrote:
From: Xiubo Li <[email protected]>
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 <[email protected]>--- fs/ceph/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)fs/ceph/super.c +0
-0
fs/ceph/super.c static int ceph_parse_mount_param(struct fs_context *fc, · line 347
Quoted 7 lines
fs/ceph/super.c +4
-0@@ -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().
Quoted 14 lines
fs/ceph/super.c +0
-4ret =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 ;
Ilya Dryomov
maintainerQuoted 26 lines · Xiubo Li
Quoted 24 lines · On 2020/2/10 21:58, [email protected] wrote:
From: Xiubo Li <[email protected]>
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 <[email protected]>--- fs/ceph/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)fs/ceph/super.c +0
-0@@ -341,6 +341,10 @@ static int ceph_parse_mount_param(struct fs_context *fc,unsigned int mode;int token, ret;
Quoted 6 lines
fs/ceph/super.c static int ceph_parse_mount_param(struct fs_context *fc, · line 347
Quoted 4 lines
fs/ceph/super.c +4
-0+#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
Quoted 26 lines · Ilya Dryomov
Quoted 25 lines · Xiubo Li
Quoted 24 lines · On 2020/2/10 21:58, [email protected] wrote:
From: Xiubo Li <[email protected]>
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 <[email protected]>--- fs/ceph/super.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)fs/ceph/super.c +0
-0@@ -341,6 +341,10 @@ static int ceph_parse_mount_param(struct fs_context *fc,unsigned int mode;int token, ret;
Quoted 9 lines
Quoted 5 lines
fs/ceph/super.c static int ceph_parse_mount_param(struct fs_context *fc, · line 347
Quoted 4 lines
fs/ceph/super.c +4
-0+#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.