Re: [PATCH 3/6] xfs: don't stall cowblocks scan if we can't take locks

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

 



On Mon, Jan 18, 2021 at 11:37:18AM -0800, Darrick J. Wong wrote:
> Ah, I see, you're asking why don't I make xfs_inode_walk responsible for
> deciding what to do about EAGAIN, instead of open-coding that in the
> ->execute function.  That would be a nice cleanup since the walk
> function already has special casing for EFSCORRUPTED.
> 
> If I read you correctly, the relevant part of xfs_inode_walk becomes:
> 
> 	error = execute(batch[i]...);
> 	xfs_irele(batch[i]);
> 	if (error == -EAGAIN) {
> 		if (args->flags & EOF_SYNC)
> 			skipped++;
> 		continue;
> 	}
> 
> and the relevant part of xfs_inode_free_eofblocks becomes:
> 
> 	if (!xfs_ilock_nowait(ip, XFS_IOLOCK_EXCL))
> 		return -EAGAIN;
> 
> I think that would work, and afaict it won't cause any serious problems
> with the deferred inactivation series.

Exactly!



[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