Re: [f2fs-dev] [PATCH v2 2/5] ext4: cache NULL when both default_acl and acl are NULL
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 Honza > > Signed-off-by: Chengguang Xu > --- > 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 SUSE Labs, CR -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH v2 1/5] ext2: cache NULL when both default_acl and acl are NULL
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 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 SUSE Labs, CR -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
[f2fs-dev] [Bug 200951] kernel NULL pointer dereference in update_sit_entry
https://bugzilla.kernel.org/show_bug.cgi?id=200951 --- Comment #12 from vice...@gmail.com --- As stated in the bug description, there is an udev rule to set the provisioning_mode attribute to unmap. When searching for this attribute name, i found this: drivers/scsi/sd.c:749 blk_queue_max_discard_sectors(q, ...); blk_queue_flag_set(QUEUE_FLAG_DISCARD, q); So, it looks like the answer is yes, there is an interface to turn on discard of device in real time. Regards, Vicenç. -- You are receiving this mail because: You are watching the assignee of the bug. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
[f2fs-dev] [Bug 200951] kernel NULL pointer dereference in update_sit_entry
https://bugzilla.kernel.org/show_bug.cgi?id=200951 --- Comment #13 from Chao Yu (c...@kernel.org) --- (In reply to vicencb from comment #12) > As stated in the bug description, there is an udev rule to set Sorry, I missed this one... :( > the provisioning_mode attribute to unmap. When searching for > this attribute name, i found this: > drivers/scsi/sd.c:749 > blk_queue_max_discard_sectors(q, ...); > blk_queue_flag_set(QUEUE_FLAG_DISCARD, q); > > So, it looks like the answer is yes, there is an interface to > turn on discard of device in real time. Alright, let me send one patch to fix this issue. > > Regards, > Vicenç. -- You are receiving this mail because: You are watching the assignee of the bug. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
[f2fs-dev] [Bug 200951] kernel NULL pointer dereference in update_sit_entry
https://bugzilla.kernel.org/show_bug.cgi?id=200951 --- Comment #14 from vice...@gmail.com --- This could explain why it fails on aarch64 but works on x86_64. When this is tested on aarch64, the f2fs is the root FS, and the udev rule is applied after mount because it is stored in the filesystemm itself. Whereas in the x86_64 case, the udev rule is applied when the disk is plugged in, before mounting. All in all, it is a general issue, not an architecture-specific one. -- You are receiving this mail because: You are watching the assignee of the bug. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [Jfs-discussion] [PATCH v2 4/5] jfs: cache NULL when both default_acl and acl are NULL
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 Acked-by: Dave Kleikamp > --- > 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 & 0x) | > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel