default_acl and acl of newly created inode will be initiated
as ACL_NOT_CACHED in vfs function inode_init_always() and later
will be updated by calling xxx_init_acl() in specific filesystems.
Howerver, when default_acl and acl are NULL then they keep the value
of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
in this case.
Signed-off-by: Chengguang Xu <[email protected]>
---
v1->v2:
- Coding style change.
fs/ext2/acl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c
index 224c04abb2e5..cf4c77f8dd08 100644
--- a/fs/ext2/acl.c
+++ b/fs/ext2/acl.c
@@ -256,11 +256,15 @@ ext2_init_acl(struct inode *inode, struct inode *dir)
if (default_acl) {
error = __ext2_set_acl(inode, default_acl, ACL_TYPE_DEFAULT);
posix_acl_release(default_acl);
+ } else {
+ inode->i_default_acl = NULL;
}
if (acl) {
if (!error)
error = __ext2_set_acl(inode, acl, ACL_TYPE_ACCESS);
posix_acl_release(acl);
+ } else {
+ inode->i_acl = NULL;
}
return error;
}
--
2.17.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
default_acl and acl of newly created inode will be initiated
as ACL_NOT_CACHED in vfs function inode_init_always() and later
will be updated by calling xxx_init_acl() in specific filesystems.
Howerver, when default_acl and acl are NULL then they keep the value
of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
in this case.
Signed-off-by: Chengguang Xu <[email protected]>
---
v1->v2:
- Coding style change.
fs/ext4/acl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c
index fb50f9aa6ead..c1d570ee1d9f 100644
--- a/fs/ext4/acl.c
+++ b/fs/ext4/acl.c
@@ -284,12 +284,16 @@ ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
error = __ext4_set_acl(handle, inode, ACL_TYPE_DEFAULT,
default_acl, XATTR_CREATE);
posix_acl_release(default_acl);
+ } else {
+ inode->i_default_acl = NULL;
}
if (acl) {
if (!error)
error = __ext4_set_acl(handle, inode, ACL_TYPE_ACCESS,
acl, XATTR_CREATE);
posix_acl_release(acl);
+ } else {
+ inode->i_acl = NULL;
}
return error;
}
--
2.17.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
default_acl and acl of newly created inode will be initiated
as ACL_NOT_CACHED in vfs function inode_init_always() and later
will be updated by calling xxx_init_acl() in specific filesystems.
Howerver, when default_acl and acl are NULL then they keep the value
of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
in this case.
Signed-off-by: Chengguang Xu <[email protected]>
---
v1->v2:
- Coding style change.
fs/f2fs/acl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
index 111824199a88..80aabdf92659 100644
--- a/fs/f2fs/acl.c
+++ b/fs/f2fs/acl.c
@@ -394,12 +394,16 @@ int f2fs_init_acl(struct inode *inode, struct inode *dir, struct page *ipage,
error = __f2fs_set_acl(inode, ACL_TYPE_DEFAULT, default_acl,
ipage);
posix_acl_release(default_acl);
+ } else {
+ inode->i_default_acl = NULL;
}
if (acl) {
if (!error)
error = __f2fs_set_acl(inode, ACL_TYPE_ACCESS, acl,
ipage);
posix_acl_release(acl);
+ } else {
+ inode->i_acl = NULL;
}
return error;
--
2.17.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
default_acl and acl of newly created inode will be initiated
as ACL_NOT_CACHED in vfs function inode_init_always() and later
will be updated by calling xxx_init_acl() in specific filesystems.
Howerver, when default_acl and acl are NULL then they keep the value
of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
in this case.
Signed-off-by: Chengguang Xu <[email protected]>
---
v1->v2:
- Coding style change.
fs/jfs/acl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c
index 2e71b6e7e646..8c06a6ea862d 100644
--- a/fs/jfs/acl.c
+++ b/fs/jfs/acl.c
@@ -146,12 +146,16 @@ int jfs_init_acl(tid_t tid, struct inode *inode, struct inode *dir)
if (default_acl) {
rc = __jfs_set_acl(tid, inode, ACL_TYPE_DEFAULT, default_acl);
posix_acl_release(default_acl);
+ } else {
+ inode->i_default_acl = NULL;
}
if (acl) {
if (!rc)
rc = __jfs_set_acl(tid, inode, ACL_TYPE_ACCESS, acl);
posix_acl_release(acl);
+ } else {
+ inode->i_acl = NULL;
}
JFS_IP(inode)->mode2 = (JFS_IP(inode)->mode2 & 0xffff0000) |
--
2.17.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
default_acl and acl of newly created inode will be initiated
as ACL_NOT_CACHED in vfs function inode_init_always() and later
will be updated by calling xxx_init_acl() in specific filesystems.
Howerver, when default_acl and acl are NULL then they keep the value
of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
in this case.
Signed-off-by: Chengguang Xu <[email protected]>
---
v1->v2:
- Coding style change.
fs/orangefs/acl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/fs/orangefs/acl.c b/fs/orangefs/acl.c
index 10587413b20e..72d2ff17d27b 100644
--- a/fs/orangefs/acl.c
+++ b/fs/orangefs/acl.c
@@ -167,12 +167,16 @@ int orangefs_init_acl(struct inode *inode, struct inode *dir)
error = __orangefs_set_acl(inode, default_acl,
ACL_TYPE_DEFAULT);
posix_acl_release(default_acl);
+ } else {
+ inode->i_default_acl = NULL;
}
if (acl) {
if (!error)
error = __orangefs_set_acl(inode, acl, ACL_TYPE_ACCESS);
posix_acl_release(acl);
+ } else {
+ inode->i_acl = NULL;
}
/* If mode of the inode was changed, then do a forcible ->setattr */
--
2.17.1
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
On 2018/8/31 22:33, Chengguang Xu wrote:
> default_acl and acl of newly created inode will be initiated
> as ACL_NOT_CACHED in vfs function inode_init_always() and later
> will be updated by calling xxx_init_acl() in specific filesystems.
> Howerver, when default_acl and acl are NULL then they keep the value
> of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
> in this case.
>
> Signed-off-by: Chengguang Xu <[email protected]>
Acked-by: Chao Yu <[email protected]>
Thanks,
On Fri 31-08-18 22:33:49, Chengguang Xu wrote:
> default_acl and acl of newly created inode will be initiated
> as ACL_NOT_CACHED in vfs function inode_init_always() and later
> will be updated by calling xxx_init_acl() in specific filesystems.
> Howerver, when default_acl and acl are NULL then they keep the value
^^^^ However
> of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
> in this case.
I'd rephrase the above as: ... then they keep the value of ACL_NOT_CACHED.
This patch changes the code to cache NULL for acl / default_acl in this
case to save unnecessary ACL lookup attempt.
Otherwise the patch looks good to me. You can add:
Reviewed-by: Jan Kara <[email protected]>
Honza
>
> Signed-off-by: Chengguang Xu <[email protected]>
> ---
> v1->v2:
> - Coding style change.
>
> fs/ext4/acl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c
> index fb50f9aa6ead..c1d570ee1d9f 100644
> --- a/fs/ext4/acl.c
> +++ b/fs/ext4/acl.c
> @@ -284,12 +284,16 @@ ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
> error = __ext4_set_acl(handle, inode, ACL_TYPE_DEFAULT,
> default_acl, XATTR_CREATE);
> posix_acl_release(default_acl);
> + } else {
> + inode->i_default_acl = NULL;
> }
> if (acl) {
> if (!error)
> error = __ext4_set_acl(handle, inode, ACL_TYPE_ACCESS,
> acl, XATTR_CREATE);
> posix_acl_release(acl);
> + } else {
> + inode->i_acl = NULL;
> }
> return error;
> }
> --
> 2.17.1
>
>
--
Jan Kara <[email protected]>
SUSE Labs, CR
On Fri 31-08-18 22:33:48, Chengguang Xu wrote:
> default_acl and acl of newly created inode will be initiated
> as ACL_NOT_CACHED in vfs function inode_init_always() and later
> will be updated by calling xxx_init_acl() in specific filesystems.
> Howerver, when default_acl and acl are NULL then they keep the value
> of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
> in this case.
>
> Signed-off-by: Chengguang Xu <[email protected]>
Thanks! I'll take this patch (with slight changelog update) to my tree.
Honza
> ---
> v1->v2:
> - Coding style change.
>
> fs/ext2/acl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c
> index 224c04abb2e5..cf4c77f8dd08 100644
> --- a/fs/ext2/acl.c
> +++ b/fs/ext2/acl.c
> @@ -256,11 +256,15 @@ ext2_init_acl(struct inode *inode, struct inode *dir)
> if (default_acl) {
> error = __ext2_set_acl(inode, default_acl, ACL_TYPE_DEFAULT);
> posix_acl_release(default_acl);
> + } else {
> + inode->i_default_acl = NULL;
> }
> if (acl) {
> if (!error)
> error = __ext2_set_acl(inode, acl, ACL_TYPE_ACCESS);
> posix_acl_release(acl);
> + } else {
> + inode->i_acl = NULL;
> }
> return error;
> }
> --
> 2.17.1
>
>
--
Jan Kara <[email protected]>
SUSE Labs, CR
Are you pushing these as a series, or would you like this patch pushed
through the jfs tree?
On 8/31/18 9:33 AM, Chengguang Xu wrote:
> default_acl and acl of newly created inode will be initiated
> as ACL_NOT_CACHED in vfs function inode_init_always() and later
> will be updated by calling xxx_init_acl() in specific filesystems.
> Howerver, when default_acl and acl are NULL then they keep the value
> of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
> in this case.
>
> Signed-off-by: Chengguang Xu <[email protected]>
Acked-by: Dave Kleikamp <[email protected]>
> ---
> v1->v2:
> - Coding style change.
>
> fs/jfs/acl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c
> index 2e71b6e7e646..8c06a6ea862d 100644
> --- a/fs/jfs/acl.c
> +++ b/fs/jfs/acl.c
> @@ -146,12 +146,16 @@ int jfs_init_acl(tid_t tid, struct inode *inode, struct inode *dir)
> if (default_acl) {
> rc = __jfs_set_acl(tid, inode, ACL_TYPE_DEFAULT, default_acl);
> posix_acl_release(default_acl);
> + } else {
> + inode->i_default_acl = NULL;
> }
>
> if (acl) {
> if (!rc)
> rc = __jfs_set_acl(tid, inode, ACL_TYPE_ACCESS, acl);
> posix_acl_release(acl);
> + } else {
> + inode->i_acl = NULL;
> }
>
> JFS_IP(inode)->mode2 = (JFS_IP(inode)->mode2 & 0xffff0000) |
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
On 09/04/2018 04:34 AM, Dave Kleikamp wrote:
> Are you pushing these as a series, or would you like this patch pushed
> through the jfs tree?
I'd hope maintainers pick individual patch to their tree.
Thanks,
Chengguang
>
> On 8/31/18 9:33 AM, Chengguang Xu wrote:
>> default_acl and acl of newly created inode will be initiated
>> as ACL_NOT_CACHED in vfs function inode_init_always() and later
>> will be updated by calling xxx_init_acl() in specific filesystems.
>> Howerver, when default_acl and acl are NULL then they keep the value
>> of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
>> in this case.
>>
>> Signed-off-by: Chengguang Xu <[email protected]>
> Acked-by: Dave Kleikamp <[email protected]>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Thanks... I've added your patch to 4.19-rc2, run it through xfstests,
and added it to my linux-next tree...
-Mike
On Fri, Aug 31, 2018 at 10:35 AM Chengguang Xu <[email protected]> wrote:
>
> default_acl and acl of newly created inode will be initiated
> as ACL_NOT_CACHED in vfs function inode_init_always() and later
> will be updated by calling xxx_init_acl() in specific filesystems.
> Howerver, when default_acl and acl are NULL then they keep the value
> of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
> in this case.
>
> Signed-off-by: Chengguang Xu <[email protected]>
> ---
> v1->v2:
> - Coding style change.
>
> fs/orangefs/acl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/orangefs/acl.c b/fs/orangefs/acl.c
> index 10587413b20e..72d2ff17d27b 100644
> --- a/fs/orangefs/acl.c
> +++ b/fs/orangefs/acl.c
> @@ -167,12 +167,16 @@ int orangefs_init_acl(struct inode *inode, struct inode *dir)
> error = __orangefs_set_acl(inode, default_acl,
> ACL_TYPE_DEFAULT);
> posix_acl_release(default_acl);
> + } else {
> + inode->i_default_acl = NULL;
> }
>
> if (acl) {
> if (!error)
> error = __orangefs_set_acl(inode, acl, ACL_TYPE_ACCESS);
> posix_acl_release(acl);
> + } else {
> + inode->i_acl = NULL;
> }
>
> /* If mode of the inode was changed, then do a forcible ->setattr */
> --
> 2.17.1
>
Hi,
Let me queue this patch in my -next.
Thanks,
On 09/02, Chao Yu wrote:
> On 2018/8/31 22:33, Chengguang Xu wrote:
> > default_acl and acl of newly created inode will be initiated
> > as ACL_NOT_CACHED in vfs function inode_init_always() and later
> > will be updated by calling xxx_init_acl() in specific filesystems.
> > Howerver, when default_acl and acl are NULL then they keep the value
> > of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
> > in this case.
> >
> > Signed-off-by: Chengguang Xu <[email protected]>
>
> Acked-by: Chao Yu <[email protected]>
>
> Thanks,
On 08/31/2018 10:33 PM, Chengguang Xu wrote:
> default_acl and acl of newly created inode will be initiated
> as ACL_NOT_CACHED in vfs function inode_init_always() and later
> will be updated by calling xxx_init_acl() in specific filesystems.
> Howerver, when default_acl and acl are NULL then they keep the value
> of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
> in this case.
>
> Signed-off-by: Chengguang Xu <[email protected]>
> ---
> v1->v2:
> - Coding style change.
>
> fs/ext4/acl.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c
> index fb50f9aa6ead..c1d570ee1d9f 100644
> --- a/fs/ext4/acl.c
> +++ b/fs/ext4/acl.c
> @@ -284,12 +284,16 @@ ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
> error = __ext4_set_acl(handle, inode, ACL_TYPE_DEFAULT,
> default_acl, XATTR_CREATE);
> posix_acl_release(default_acl);
> + } else {
> + inode->i_default_acl = NULL;
> }
> if (acl) {
> if (!error)
> error = __ext4_set_acl(handle, inode, ACL_TYPE_ACCESS,
> acl, XATTR_CREATE);
> posix_acl_release(acl);
> + } else {
> + inode->i_acl = NULL;
> }
> return error;
> }
Hi Ted, Andreas
Have you got chance to look at this patch?
Thanks,
Chengguang
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
On Wed, Sep 12, 2018 at 11:04:35PM +0800, cgxu519 wrote:
> On 08/31/2018 10:33 PM, Chengguang Xu wrote:
> > default_acl and acl of newly created inode will be initiated
> > as ACL_NOT_CACHED in vfs function inode_init_always() and later
> > will be updated by calling xxx_init_acl() in specific filesystems.
> > Howerver, when default_acl and acl are NULL then they keep the value
> > of ACL_NOT_CACHED, this patch tries to cache NULL for acl/default_acl
> > in this case.
> >
> > Signed-off-by: Chengguang Xu <[email protected]>
Applied, thanks.
- Ted