Re: [PATCH 4/4] xfs: implement freezing by emptying the AIL

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

 



On Sat, Mar 24, 2012 at 01:06:18PM -0400, Christoph Hellwig wrote:
> On Thu, Mar 22, 2012 at 10:57:38AM +1100, Dave Chinner wrote:
> > > +	 * threshold.
> > > +	 */
> > > +	if (atomic_read(&ailp->xa_wait_empty))
> > > +		target = xfs_ail_max(ailp)->li_lsn;
> > 
> > I don't think this is safe - we may have finished pushing the AIL to
> > empty, but the waiter that decrements xa_wait_empty may not have run
> > yet and we can race with that. In that case, xfs_ail_max() will
> > return NULL as the AIL is empty.
> 
> True - I'll add a check for that.

Actually - we do the xfs_trans_ail_cursor_first check just above - if
the AIL is empty we'll already exit after that and never reach this
code, so we should be fine.

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs


[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux