xfs
[Top] [All Lists]

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

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 09/14] xfs: introduce new locks for the log grant ticket wait queues
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Thu, 2 Dec 2010 13:10:31 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20101201131208.GA22455@xxxxxxxxxxxxx>
References: <1290994712-21376-1-git-send-email-david@xxxxxxxxxxxxx> <1290994712-21376-10-git-send-email-david@xxxxxxxxxxxxx> <20101201131208.GA22455@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
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()...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>