Re: [PATCH 6/9] xfs: only free posteof blocks on first close

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 09, 2024 at 08:36:33AM +1000, Dave Chinner wrote:
> > diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
> > index 60424e64230743..30b553ac8f56bb 100644
> > --- a/fs/xfs/xfs_file.c
> > +++ b/fs/xfs/xfs_file.c
> > @@ -1204,15 +1204,21 @@ xfs_file_release(
> >  	 * exposed to that problem.
> >  	 */
> >  	if (xfs_iflags_test_and_clear(ip, XFS_ITRUNCATED)) {
> > -		xfs_iflags_clear(ip, XFS_IDIRTY_RELEASE);
> > +		xfs_iflags_clear(ip, XFS_EOFBLOCKS_RELEASED);
> >  		if (ip->i_delayed_blks > 0)
> >  			filemap_flush(inode->i_mapping);
> >  	}
> 
> This should probably be open coded to minimise lock cycles and lock
> contention on the flags lock when concurrent open/sync write/close 
> cycles are run on the file (as recently reported by Mateusz). i.e:

Let's do that as a separate patch on top of the series, as that
is unrelated.





[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux