Re: [PATCH 1/8] xfs: aborting inodes on shutdown may need buffer lock

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

 



On Fri, Apr 01, 2022 at 04:47:15AM -0700, Christoph Hellwig wrote:
> On Wed, Mar 30, 2022 at 12:10:41PM +1100, Dave Chinner wrote:
> > xfs_iflush_abort() can be called without the buffer lock being held
> > resulting in inodes being removed from the buffer list while other
> > list operations are occurring. This causes problems with corrupted
> > bp->b_io_list inode lists during filesystem shutdown, leading to
> > traversals that never end, double removals from the AIL, etc.
> > 
> > Fix this by passing the buffer to xfs_iflush_abort() if we have
> > it locked. If the inode is attached to the buffer, we're going to
> > have to remove it from the buffer list and we'd have to get the
> > buffer off the inode log item to do that anyway.
> 
> There is not buffer passed to xfs_iflush_abort.  I think this now
> needs to say

Ah, left over from the original patch and I forgot to update it when
I split the buffer/no buffer aborts into two functions because it
was cleaner than trying to do it conditionally in
xfs_iflush_abort().

> "Fix this by ensuring the inode buffer is locked when calling 
> xfs_iflush_abort if the inode is attached to a buffer."

*nod*

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[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