On Thu, Mar 17, 2022 at 4:12 PM Jan Kara <jack@xxxxxxx> wrote: > > On Mon 07-03-22 17:57:36, Amir Goldstein wrote: > > Jan, > > > > Following RFC discussion [1], following are the volatile mark patches. > > > > Tested both manually and with this LTP test [2]. > > I was struggling with this test for a while because drop caches > > did not get rid of the un-pinned inode when test was run with > > ext2 or ext4 on my test VM. With xfs, the test works fine for me, > > but it may not work for everyone. > > > > Perhaps you have a suggestion for a better way to test inode eviction. > > Drop caches does not evict dirty inodes. The inode is likely dirty because > you have chmodded it just before drop caches. So I think calling sync or > syncfs before dropping caches should fix your problems with ext2 / ext4. I > suspect this has worked for XFS only because it does its private inode > dirtiness tracking and keeps the inode behind VFS's back. I did think of that and tried to fsync which did not help, but maybe I messed it up somehow. Thanks, Amir.