xfs
[Top] [All Lists]

Re: XFS write cache flush policy

To: Matthias Schniedermeyer <ms@xxxxxxx>
Subject: Re: XFS write cache flush policy
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 19 Dec 2012 07:29:14 +1100
Cc: Lin Li <sdeber@xxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20121218003438.GB30736@xxxxxxx>
References: <20121210091239.GA21114@xxxxxxx> <50C64C17.9080206@xxxxxxxxxxx> <20121214111924.GA4762@xxxxxxx> <20121215221622.GF9806@dastard> <20121216103025.GA14880@xxxxxxx> <20121216111046.GA16756@xxxxxxx> <20121216204847.GN9806@dastard> <20121216232251.GA20370@xxxxxxx> <20121217232441.GA5031@dastard> <20121218003438.GB30736@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Dec 18, 2012 at 01:34:38AM +0100, Matthias Schniedermeyer wrote:
> On 18.12.2012 10:24, Dave Chinner wrote:
> > 
> > diff --git a/fs/xfs/xfs_sync.c b/fs/xfs/xfs_sync.c
> > index 9500caf..7bf85e8 100644
> > --- a/fs/xfs/xfs_sync.c
> > +++ b/fs/xfs/xfs_sync.c
> > @@ -400,7 +400,7 @@ xfs_sync_worker(
> >      * cancel_delayed_work_sync on this work queue before tearing down
> >      * the ail and the log in xfs_log_unmount.
> >      */
> > -   if (!(mp->m_super->s_flags & MS_ACTIVE) &&
> > +   if ((mp->m_super->s_flags & MS_ACTIVE) &&
> >         !(mp->m_flags & XFS_MOUNT_RDONLY)) {
> >             /* dgc: errors ignored here */
> >             if (mp->m_super->s_writers.frozen == SB_UNFROZEN &&
> > 
> > 
> 
> This also appears to fix the other case.
> When the activity ceases sharply and the log is still not written after 
> minutes.
> 
> After writing 10 files, waiting a minute, yanking ... all 10 files where 
> there.
> So the OP-case MIGHT have been this same error.
> But that's the amateuer talking again.

I kinda deserved that, didn't I? ;)

But now I understand the problem, I agree with you that the OP was
probably seeing the same bug. I understand the cause, and can
explain exactly how it would cause both sets of symptoms reported...

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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