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

Dave Chinner david at fromorbit.com
Sun Mar 28 22:23:40 CDT 2010


On Sun, Mar 28, 2010 at 05:35:41AM -0400, Christoph Hellwig wrote:
> 
> Looks good.
> 
>  
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> 
> > +	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 at fromorbit.com




More information about the xfs mailing list