* [PATCH v2 1/5] ext2: cache NULL when both default_acl and acl are NULL
@ 2018-08-31 14:33 ` Chengguang Xu
0 siblings, 0 replies; 24+ messages in thread
From: Chengguang Xu @ 2018-08-31 14:33 UTC (permalink / raw)
To: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap, martin
Cc: devel, linux-kernel, linux-ext4, linux-f2fs-devel,
jfs-discussion, Chengguang Xu
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 <cgxu519@gmx.com>
---
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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 1/5] ext2: cache NULL when both default_acl and acl are NULL
@ 2018-08-31 14:33 ` Chengguang Xu
0 siblings, 0 replies; 24+ messages in thread
From: Chengguang Xu @ 2018-08-31 14:33 UTC (permalink / raw)
To: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap, martin
Cc: jfs-discussion, Chengguang Xu, linux-kernel, linux-f2fs-devel,
linux-ext4, devel
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 <cgxu519@gmx.com>
---
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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 2/5] ext4: cache NULL when both default_acl and acl are NULL
2018-08-31 14:33 ` Chengguang Xu
@ 2018-08-31 14:33 ` Chengguang Xu
-1 siblings, 0 replies; 24+ messages in thread
From: Chengguang Xu @ 2018-08-31 14:33 UTC (permalink / raw)
To: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap, martin
Cc: devel, linux-kernel, linux-ext4, linux-f2fs-devel,
jfs-discussion, Chengguang Xu
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 <cgxu519@gmx.com>
---
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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 2/5] ext4: cache NULL when both default_acl and acl are NULL
@ 2018-08-31 14:33 ` Chengguang Xu
0 siblings, 0 replies; 24+ messages in thread
From: Chengguang Xu @ 2018-08-31 14:33 UTC (permalink / raw)
To: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap, martin
Cc: jfs-discussion, Chengguang Xu, linux-kernel, linux-f2fs-devel,
linux-ext4, devel
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 <cgxu519@gmx.com>
---
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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 3/5] f2fs: cache NULL when both default_acl and acl are NULL
2018-08-31 14:33 ` Chengguang Xu
@ 2018-08-31 14:33 ` Chengguang Xu
-1 siblings, 0 replies; 24+ messages in thread
From: Chengguang Xu @ 2018-08-31 14:33 UTC (permalink / raw)
To: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap, martin
Cc: devel, linux-kernel, linux-ext4, linux-f2fs-devel,
jfs-discussion, Chengguang Xu
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 <cgxu519@gmx.com>
---
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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 3/5] f2fs: cache NULL when both default_acl and acl are NULL
@ 2018-08-31 14:33 ` Chengguang Xu
0 siblings, 0 replies; 24+ messages in thread
From: Chengguang Xu @ 2018-08-31 14:33 UTC (permalink / raw)
To: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap, martin
Cc: jfs-discussion, Chengguang Xu, linux-kernel, linux-f2fs-devel,
linux-ext4, devel
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 <cgxu519@gmx.com>
---
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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 4/5] jfs: cache NULL when both default_acl and acl are NULL
2018-08-31 14:33 ` Chengguang Xu
@ 2018-08-31 14:33 ` Chengguang Xu
-1 siblings, 0 replies; 24+ messages in thread
From: Chengguang Xu @ 2018-08-31 14:33 UTC (permalink / raw)
To: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap, martin
Cc: devel, linux-kernel, linux-ext4, linux-f2fs-devel,
jfs-discussion, Chengguang Xu
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 <cgxu519@gmx.com>
---
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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 4/5] jfs: cache NULL when both default_acl and acl are NULL
@ 2018-08-31 14:33 ` Chengguang Xu
0 siblings, 0 replies; 24+ messages in thread
From: Chengguang Xu @ 2018-08-31 14:33 UTC (permalink / raw)
To: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap, martin
Cc: jfs-discussion, Chengguang Xu, linux-kernel, linux-f2fs-devel,
linux-ext4, devel
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 <cgxu519@gmx.com>
---
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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 5/5] orangefs: cache NULL when both default_acl and acl are NULL
2018-08-31 14:33 ` Chengguang Xu
@ 2018-08-31 14:33 ` Chengguang Xu
-1 siblings, 0 replies; 24+ messages in thread
From: Chengguang Xu @ 2018-08-31 14:33 UTC (permalink / raw)
To: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap, martin
Cc: devel, linux-kernel, linux-ext4, linux-f2fs-devel,
jfs-discussion, Chengguang Xu
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 <cgxu519@gmx.com>
---
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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* [PATCH v2 5/5] orangefs: cache NULL when both default_acl and acl are NULL
@ 2018-08-31 14:33 ` Chengguang Xu
0 siblings, 0 replies; 24+ messages in thread
From: Chengguang Xu @ 2018-08-31 14:33 UTC (permalink / raw)
To: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap, martin
Cc: jfs-discussion, Chengguang Xu, linux-kernel, linux-f2fs-devel,
linux-ext4, devel
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 <cgxu519@gmx.com>
---
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
^ permalink raw reply related [flat|nested] 24+ messages in thread
* Re: [f2fs-dev] [PATCH v2 3/5] f2fs: cache NULL when both default_acl and acl are NULL
2018-08-31 14:33 ` Chengguang Xu
(?)
@ 2018-09-02 7:55 ` Chao Yu
2018-09-11 20:12 ` Jaegeuk Kim
-1 siblings, 1 reply; 24+ messages in thread
From: Chao Yu @ 2018-09-02 7:55 UTC (permalink / raw)
To: Chengguang Xu, jack, tytso, adilger.kernel, jaegeuk, yuchao0,
shaggy, hubcap, martin
Cc: jfs-discussion, linux-kernel, linux-f2fs-devel, linux-ext4, devel
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 <cgxu519@gmx.com>
Acked-by: Chao Yu <yuchao0@huawei.com>
Thanks,
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/5] ext4: cache NULL when both default_acl and acl are NULL
2018-08-31 14:33 ` Chengguang Xu
(?)
@ 2018-09-03 8:57 ` Jan Kara
-1 siblings, 0 replies; 24+ messages in thread
From: Jan Kara @ 2018-09-03 8:57 UTC (permalink / raw)
To: Chengguang Xu
Cc: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap,
martin, devel, linux-kernel, linux-ext4, linux-f2fs-devel,
jfs-discussion
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 <jack@suse.cz>
Honza
>
> Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
> ---
> 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 <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 1/5] ext2: cache NULL when both default_acl and acl are NULL
2018-08-31 14:33 ` Chengguang Xu
` (4 preceding siblings ...)
(?)
@ 2018-09-03 9:03 ` Jan Kara
-1 siblings, 0 replies; 24+ messages in thread
From: Jan Kara @ 2018-09-03 9:03 UTC (permalink / raw)
To: Chengguang Xu
Cc: jack, tytso, adilger.kernel, jaegeuk, yuchao0, shaggy, hubcap,
martin, devel, linux-kernel, linux-ext4, linux-f2fs-devel,
jfs-discussion
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 <cgxu519@gmx.com>
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 <jack@suse.com>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Jfs-discussion] [PATCH v2 4/5] jfs: cache NULL when both default_acl and acl are NULL
2018-08-31 14:33 ` Chengguang Xu
@ 2018-09-03 20:34 ` Dave Kleikamp
-1 siblings, 0 replies; 24+ messages in thread
From: Dave Kleikamp @ 2018-09-03 20:34 UTC (permalink / raw)
To: Chengguang Xu, jack, tytso, adilger.kernel, jaegeuk, yuchao0,
shaggy, hubcap, martin
Cc: jfs-discussion, linux-kernel, linux-f2fs-devel, linux-ext4, devel
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 <cgxu519@gmx.com>
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> ---
> 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) |
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Jfs-discussion] [PATCH v2 4/5] jfs: cache NULL when both default_acl and acl are NULL
@ 2018-09-03 20:34 ` Dave Kleikamp
0 siblings, 0 replies; 24+ messages in thread
From: Dave Kleikamp @ 2018-09-03 20:34 UTC (permalink / raw)
To: Chengguang Xu, jack, tytso, adilger.kernel, jaegeuk, yuchao0,
shaggy, hubcap, martin
Cc: jfs-discussion, linux-ext4, linux-kernel, devel, linux-f2fs-devel
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 <cgxu519@gmx.com>
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> ---
> 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
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Jfs-discussion] [PATCH v2 4/5] jfs: cache NULL when both default_acl and acl are NULL
2018-09-03 20:34 ` Dave Kleikamp
@ 2018-09-05 6:13 ` cgxu519
-1 siblings, 0 replies; 24+ messages in thread
From: cgxu519 @ 2018-09-05 6:13 UTC (permalink / raw)
To: Dave Kleikamp, jack, tytso, adilger.kernel, jaegeuk, yuchao0,
shaggy, hubcap, martin
Cc: jfs-discussion, linux-kernel, linux-f2fs-devel, linux-ext4, devel
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 <cgxu519@gmx.com>
> Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Jfs-discussion] [PATCH v2 4/5] jfs: cache NULL when both default_acl and acl are NULL
@ 2018-09-05 6:13 ` cgxu519
0 siblings, 0 replies; 24+ messages in thread
From: cgxu519 @ 2018-09-05 6:13 UTC (permalink / raw)
To: Dave Kleikamp, jack, tytso, adilger.kernel, jaegeuk, yuchao0,
shaggy, hubcap, martin
Cc: jfs-discussion, linux-ext4, linux-kernel, devel, linux-f2fs-devel
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 <cgxu519@gmx.com>
> Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [Jfs-discussion] [PATCH v2 4/5] jfs: cache NULL when both default_acl and acl are NULL
2018-09-05 6:13 ` cgxu519
(?)
@ 2018-09-05 12:28 ` Dave Kleikamp
-1 siblings, 0 replies; 24+ messages in thread
From: Dave Kleikamp @ 2018-09-05 12:28 UTC (permalink / raw)
To: cgxu519; +Cc: jfs-discussion, linux-kernel
On 9/5/18 1:13 AM, cgxu519 wrote:
>
> 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.
I'll take care of this one.
Thanks,
Shaggy
>
> 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 <cgxu519@gmx.com>
>> Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
>>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 5/5] orangefs: cache NULL when both default_acl and acl are NULL
2018-08-31 14:33 ` Chengguang Xu
(?)
@ 2018-09-07 18:11 ` Mike Marshall
-1 siblings, 0 replies; 24+ messages in thread
From: Mike Marshall @ 2018-09-07 18:11 UTC (permalink / raw)
To: cgxu519
Cc: jack, Theodore Ts'o, adilger.kernel, jaegeuk, yuchao0,
shaggy, Martin Brandenburg, devel, LKML, Ext4 Developers List,
linux-f2fs-devel, jfs-discussion, Mike Marshall
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 <cgxu519@gmx.com> 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 <cgxu519@gmx.com>
> ---
> 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
>
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [f2fs-dev] [PATCH v2 3/5] f2fs: cache NULL when both default_acl and acl are NULL
2018-09-02 7:55 ` [f2fs-dev] " Chao Yu
@ 2018-09-11 20:12 ` Jaegeuk Kim
0 siblings, 0 replies; 24+ messages in thread
From: Jaegeuk Kim @ 2018-09-11 20:12 UTC (permalink / raw)
To: Chao Yu
Cc: Chengguang Xu, jack, tytso, adilger.kernel, yuchao0, shaggy,
hubcap, martin, jfs-discussion, linux-kernel, linux-f2fs-devel,
linux-ext4, devel
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 <cgxu519@gmx.com>
>
> Acked-by: Chao Yu <yuchao0@huawei.com>
>
> Thanks,
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/5] ext4: cache NULL when both default_acl and acl are NULL
2018-08-31 14:33 ` Chengguang Xu
@ 2018-09-12 15:04 ` cgxu519
-1 siblings, 0 replies; 24+ messages in thread
From: cgxu519 @ 2018-09-12 15:04 UTC (permalink / raw)
To: tytso, adilger.kernel
Cc: jack, jaegeuk, yuchao0, shaggy, hubcap, martin, devel,
linux-kernel, linux-ext4, linux-f2fs-devel, jfs-discussion
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 <cgxu519@gmx.com>
> ---
> 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
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/5] ext4: cache NULL when both default_acl and acl are NULL
@ 2018-09-12 15:04 ` cgxu519
0 siblings, 0 replies; 24+ messages in thread
From: cgxu519 @ 2018-09-12 15:04 UTC (permalink / raw)
To: tytso, adilger.kernel
Cc: shaggy, jfs-discussion, martin, linux-kernel, linux-f2fs-devel,
jack, jaegeuk, linux-ext4, devel, hubcap
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 <cgxu519@gmx.com>
> ---
> 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
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/5] ext4: cache NULL when both default_acl and acl are NULL
2018-09-12 15:04 ` cgxu519
@ 2018-10-07 3:36 ` Theodore Y. Ts'o
-1 siblings, 0 replies; 24+ messages in thread
From: Theodore Y. Ts'o @ 2018-10-07 3:36 UTC (permalink / raw)
To: cgxu519
Cc: adilger.kernel, jack, jaegeuk, yuchao0, shaggy, hubcap, martin,
devel, linux-kernel, linux-ext4, linux-f2fs-devel,
jfs-discussion
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 <cgxu519@gmx.com>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 24+ messages in thread
* Re: [PATCH v2 2/5] ext4: cache NULL when both default_acl and acl are NULL
@ 2018-10-07 3:36 ` Theodore Y. Ts'o
0 siblings, 0 replies; 24+ messages in thread
From: Theodore Y. Ts'o @ 2018-10-07 3:36 UTC (permalink / raw)
To: cgxu519
Cc: shaggy, jfs-discussion, martin, linux-kernel, linux-f2fs-devel,
adilger.kernel, jack, jaegeuk, linux-ext4, devel, hubcap
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 <cgxu519@gmx.com>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 24+ messages in thread
end of thread, other threads:[~2018-10-07 3:37 UTC | newest]
Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-31 14:33 [PATCH v2 1/5] ext2: cache NULL when both default_acl and acl are NULL Chengguang Xu
2018-08-31 14:33 ` Chengguang Xu
2018-08-31 14:33 ` [PATCH v2 2/5] ext4: " Chengguang Xu
2018-08-31 14:33 ` Chengguang Xu
2018-09-03 8:57 ` Jan Kara
2018-09-12 15:04 ` cgxu519
2018-09-12 15:04 ` cgxu519
2018-10-07 3:36 ` Theodore Y. Ts'o
2018-10-07 3:36 ` Theodore Y. Ts'o
2018-08-31 14:33 ` [PATCH v2 3/5] f2fs: " Chengguang Xu
2018-08-31 14:33 ` Chengguang Xu
2018-09-02 7:55 ` [f2fs-dev] " Chao Yu
2018-09-11 20:12 ` Jaegeuk Kim
2018-08-31 14:33 ` [PATCH v2 4/5] jfs: " Chengguang Xu
2018-08-31 14:33 ` Chengguang Xu
2018-09-03 20:34 ` [Jfs-discussion] " Dave Kleikamp
2018-09-03 20:34 ` Dave Kleikamp
2018-09-05 6:13 ` cgxu519
2018-09-05 6:13 ` cgxu519
2018-09-05 12:28 ` Dave Kleikamp
2018-08-31 14:33 ` [PATCH v2 5/5] orangefs: " Chengguang Xu
2018-08-31 14:33 ` Chengguang Xu
2018-09-07 18:11 ` Mike Marshall
2018-09-03 9:03 ` [PATCH v2 1/5] ext2: " Jan Kara
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.