xfs
[Top] [All Lists]

Re: [PATCH] xfs: Always update the log tail on disk in sync

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: Always update the log tail on disk in sync
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 29 Mar 2010 14:23:40 +1100
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20100328093541.GA11654@xxxxxxxxxxxxx>
References: <1269493671-11034-1-git-send-email-david@xxxxxxxxxxxxx> <20100328093541.GA11654@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Sun, Mar 28, 2010 at 05:35:41AM -0400, Christoph Hellwig wrote:
> 
> Looks good.
> 
>  
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> 
> > +   switch (log->l_covered_state) {
> > +   case XLOG_STATE_COVER_NEED:
> > +   case XLOG_STATE_COVER_NEED2:
> > +           if (!xfs_trans_ail_tail(log->l_ailp) &&
> > +               xlog_iclogs_empty(log)) {
> > +                   if (log->l_covered_state == XLOG_STATE_COVER_NEED)
> > +                           log->l_covered_state = XLOG_STATE_COVER_DONE;
> > +                   else {
> > +                           ASSERT(log->l_covered_state == 
> > XLOG_STATE_COVER_NEED2);
> 
> Moving this assert into the switch introduces an overly long line.
> But it's rather pintless anyway, so we can just drop it.
> 
> Together with reordering the switch statement for slightly better
> readability we might get something like the version below:

Yeah, that looks better. I'll run it through cycle and repost when
done.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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