Re: [PATCH 09/14] xfs: introduce new locks for the log grant ticket wait queues

Christoph Hellwig
2010-12-02T11:46:23Z

On Thu, Dec 02, 2010 at 01:10:31PM +1100, Dave Chinner wrote:
> On Wed, Dec 01, 2010 at 08:12:08AM -0500, Christoph Hellwig wrote:
> > > + /* co-ordinate with xfs_log_force_shutdown */
> > > + if (XLOG_FORCED_SHUTDOWN(log)) {
> > > + spin_unlock(&log->l_grant_reserve_lock);
> > > + goto error_return;
> > > + }
> >
> > Where is this coming from? Otherwise the patch looks good to me.
>
> To handles the race condition between xfs_log_force_shutdown() clearing
> all the tickets off the queue and a racing log reserve that had
> already checked the shutdown flag and was spinning waiting for the
> reserve lock to add the ticket to the queue. The race condition is
> documented in xfs_log_force_shutdown()...

Ok. Please add something like that to the patch description.