[PATCH] fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set

2020-08-20 Thread Hao Li
roblem and flushes the inode to disk to prepare for evicting it. Signed-off-by: Hao Li --- fs/dcache.c | 3 ++- fs/inode.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index ea0485861d93..486c7409dc82 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -79

[PATCH] fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode()

2020-12-07 Thread Hao Li
.ge12...@dread.disaster.area/ Fixes: dae2f8ed7992 ("fs: Lift XFS_IDONTCACHE to the VFS layer") Signed-off-by: Hao Li Reviewed-by: Dave Chinner Reviewed-by: Ira Weiny --- This patch may have been forgotten. Original patch: https://lore.kernel.org/linux-fsdevel/20200904075939.176366-1-lihao2018.f...@cn.fu

[PATCH] fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set

2020-12-07 Thread Hao Li
ake effects automatically after this file is closed by all processes. I also add some comments to make the code more clear. Signed-off-by: Hao Li Reviewed-by: Jan Kara Reviewed-by: Ira Weiny --- This patch may have been forgotten. Original patch: https://lore.kernel.org/linux-fsdevel

[PATCH] Documentation/dax: Update description of DAX policy changing

2021-01-03 Thread Hao Li
After commit 77573fa310d9 ("fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set"), changes to DAX policy will take effect as soon as all references to this file are gone. Update the documentation accordingly. Signed-off-by: Hao Li --- Documentation/filesystems/da

[PATCH v2] Documentation/dax: Update description of DAX policy changing

2021-01-05 Thread Hao Li
After commit 77573fa310d9 ("fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set"), changes to DAX policy will take effect as soon as all references to this file are gone. Update the documentation accordingly. Signed-off-by: Hao Li --- Changes in v2: * simplify sentenc

[PATCH v2] fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode()

2020-09-04 Thread Hao Li
.ge12...@dread.disaster.area/ Fixes: dae2f8ed7992 ("fs: Lift XFS_IDONTCACHE to the VFS layer") Signed-off-by: Hao Li --- Changes in v2: - Adjust code format - Add Fixes tag in commit message fs/inode.c | 4 +++- include/linux/fs.h | 3 +-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --g

[PATCH] fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode()

2020-08-31 Thread Hao Li
.ge12...@dread.disaster.area/ Signed-off-by: Hao Li --- fs/inode.c | 3 ++- include/linux/fs.h | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/inode.c b/fs/inode.c index 72c4c347afb7..4e45d5ea3d0f 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -1625,7 +1625,8 @@ static void iput_final(s

[PATCH] fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode()

2020-11-09 Thread Hao Li
.ge12...@dread.disaster.area/ Fixes: dae2f8ed7992 ("fs: Lift XFS_IDONTCACHE to the VFS layer") Signed-off-by: Hao Li Reviewed-by: Dave Chinner Reviewed-by: Ira Weiny --- This patch may have been forgotten. Original patch: https://lore.kernel.org/linux-fsdevel/20200904075939.176366-1-lihao2018.f...@cn.fu

[PATCH] fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set

2020-11-09 Thread Hao Li
ake effects automatically after this file is closed by all processes. I also add some comments to make the code more clear. Signed-off-by: Hao Li Reviewed-by: Jan Kara Reviewed-by: Ira Weiny --- This patch may have been forgotten. Original patch: https://lore.kernel.org/linux-fsdevel

[PATCH] dax: Fix wrong error-number passed into xas_set_err()

2020-07-28 Thread Hao Li
The error-number passed into xas_set_err() should be negative. Otherwise, the xas_error() will return 0, and grab_mapping_entry() will return the found entry instead of a SIGBUS error when the entry is not a value. And then, the subsequent code path would be wrong. Signed-off-by: Hao Li --- fs

Re: [PATCH v2] fs: Handle I_DONTCACHE in iput_final() instead of generic_drop_inode()

2020-09-21 Thread Hao Li
On Mon, Sep 07, 2020 at 07:40:02AM +1000, Dave Chinner wrote: > On Fri, Sep 04, 2020 at 03:59:39PM +0800, Hao Li wrote: > > If generic_drop_inode() returns true, it means iput_final() can evict > > this inode regardless of whether it is dirty or not. If we check >

[PATCH v2] fs: Kill DCACHE_DONTCACHE dentry even if DCACHE_REFERENCED is set

2020-09-23 Thread Hao Li
ake effects automatically after this file is closed by all processes. I also add some comments to make the code more clear. Signed-off-by: Hao Li --- v1 is split into two standalone patch as discussed in [1], and the first patch has been reviewed in [2]. This is the second patch. [1]: h