Re: [PATCH 06/10] xfs: zeroing already holds invalidate_lock

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

 



On Mon, Sep 23, 2024 at 09:22:49AM -0700, Darrick J. Wong wrote:
> On Mon, Sep 23, 2024 at 05:28:20PM +0200, Christoph Hellwig wrote:
> > All XFS callers of iomap_zero_range already hold invalidate_lock, so we can't
> > take it again in iomap_file_buffered_write_punch_delalloc.
> > 
> > Use the passed in flags argument to detect if we're called from a zeroing
> > operation and don't take the lock again in this case.
> 
> Shouldn't this be a part of the previous patch?  AFAICT taking the
> invalidation lock in xfs_file_write_zero_eof is why we need the change
> to rwsem_assert_held_write here, right?

Most callers of zeroing already hold the lock.  So I can see arguments
for merging the patches now (don't make one case even worse before
fixing) or not (this is really two unrelated changes and easier to
understand).

Or now that the lockig is inside XFS we could even add a private iomap
flag to not do the locking for the eof zeroing, but that would create
even more special cases.





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux