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

2020-12-07 Thread Hao Li
If DCACHE_REFERENCED is set, fast_dput() will return true, and then retain_dentry() have no chance to check DCACHE_DONTCACHE. As a result, the dentry won't be killed and the corresponding inode can't be evicted. In the following example, the DAX policy can't take effects unless we do a drop_caches

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

2020-11-09 Thread Hao Li
If DCACHE_REFERENCED is set, fast_dput() will return true, and then retain_dentry() have no chance to check DCACHE_DONTCACHE. As a result, the dentry won't be killed and the corresponding inode can't be evicted. In the following example, the DAX policy can't take effects unless we do a drop_caches

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

2020-08-31 Thread Li, Hao
On 2020/8/31 8:34, Dave Chinner wrote: > On Fri, Aug 28, 2020 at 05:04:14PM +0800, Li, Hao wrote: > > On 2020/8/28 8:35, Dave Chinner wrote: > > > On Thu, Aug 27, 2020 at 05:58:07PM +0800, Li, Hao wrote: > > > > On 2020/8/27 14:37, Dave Chinner wrote: > > > > > On Fri, Aug 21, 2020 at 09:59:53AM +0

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

2020-08-30 Thread Dave Chinner
On Fri, Aug 28, 2020 at 05:04:14PM +0800, Li, Hao wrote: > On 2020/8/28 8:35, Dave Chinner wrote: > > On Thu, Aug 27, 2020 at 05:58:07PM +0800, Li, Hao wrote: > >> On 2020/8/27 14:37, Dave Chinner wrote: > >>> On Fri, Aug 21, 2020 at 09:59:53AM +0800, Hao Li wrote: > Currently, DCACHE_REFERENC

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

2020-08-28 Thread Li, Hao
On 2020/8/28 8:35, Dave Chinner wrote: > On Thu, Aug 27, 2020 at 05:58:07PM +0800, Li, Hao wrote: >> On 2020/8/27 14:37, Dave Chinner wrote: >>> On Fri, Aug 21, 2020 at 09:59:53AM +0800, Hao Li wrote: Currently, DCACHE_REFERENCED prevents the dentry with DCACHE_DONTCACHE set from being ki

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

2020-08-27 Thread Dave Chinner
On Thu, Aug 27, 2020 at 05:58:07PM +0800, Li, Hao wrote: > On 2020/8/27 14:37, Dave Chinner wrote: > > On Fri, Aug 21, 2020 at 09:59:53AM +0800, Hao Li wrote: > >> Currently, DCACHE_REFERENCED prevents the dentry with DCACHE_DONTCACHE > >> set from being killed, so the corresponding inode can't be

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

2020-08-27 Thread Li, Hao
On 2020/8/27 14:37, Dave Chinner wrote: > On Fri, Aug 21, 2020 at 09:59:53AM +0800, Hao Li wrote: >> Currently, DCACHE_REFERENCED prevents the dentry with DCACHE_DONTCACHE >> set from being killed, so the corresponding inode can't be evicted. If >> the DAX policy of an inode is changed, we can't ma

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

2020-08-26 Thread Dave Chinner
On Fri, Aug 21, 2020 at 09:59:53AM +0800, Hao Li wrote: > Currently, DCACHE_REFERENCED prevents the dentry with DCACHE_DONTCACHE > set from being killed, so the corresponding inode can't be evicted. If > the DAX policy of an inode is changed, we can't make policy changing > take effects unless drop

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

2020-08-26 Thread Li, Hao
Hello, CC to Dave, darrick.wong and xfs/nvdimm list to get more discussions. Thanks. Hao Li On 2020/8/24 14:17, Li, Hao wrote: > On 2020/8/23 14:54, Ira Weiny wrote: >> On Fri, Aug 21, 2020 at 10:40:41AM -0700, 'Ira Weiny' wrote: >>> On Fri, Aug 21, 2020 at 09:59:53AM +0800, Hao Li wrote: C

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

2020-08-23 Thread Li, Hao
On 2020/8/23 14:54, Ira Weiny wrote: > On Fri, Aug 21, 2020 at 10:40:41AM -0700, 'Ira Weiny' wrote: >> On Fri, Aug 21, 2020 at 09:59:53AM +0800, Hao Li wrote: >>> Currently, DCACHE_REFERENCED prevents the dentry with DCACHE_DONTCACHE >>> set from being killed, so the corresponding inode can't be ev

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

2020-08-22 Thread Ira Weiny
On Fri, Aug 21, 2020 at 10:40:41AM -0700, 'Ira Weiny' wrote: > On Fri, Aug 21, 2020 at 09:59:53AM +0800, Hao Li wrote: > > Currently, DCACHE_REFERENCED prevents the dentry with DCACHE_DONTCACHE > > set from being killed, so the corresponding inode can't be evicted. If > > the DAX policy of an inode

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

2020-08-21 Thread Ira Weiny
On Fri, Aug 21, 2020 at 09:59:53AM +0800, Hao Li wrote: > Currently, DCACHE_REFERENCED prevents the dentry with DCACHE_DONTCACHE > set from being killed, so the corresponding inode can't be evicted. If > the DAX policy of an inode is changed, we can't make policy changing > take effects unless drop

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

2020-08-20 Thread Hao Li
Currently, DCACHE_REFERENCED prevents the dentry with DCACHE_DONTCACHE set from being killed, so the corresponding inode can't be evicted. If the DAX policy of an inode is changed, we can't make policy changing take effects unless dropping caches manually. This patch fixes this problem and flushes