xfs
[Top] [All Lists]

Re: [PATCH 07/13] xfs: xfs_sync_data is redundant.

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 07/13] xfs: xfs_sync_data is redundant.
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 3 Sep 2012 16:08:57 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120901232456.GB31634@xxxxxxxxxxxxx>
References: <1346328017-2795-1-git-send-email-david@xxxxxxxxxxxxx> <1346328017-2795-8-git-send-email-david@xxxxxxxxxxxxx> <20120901232456.GB31634@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Sat, Sep 01, 2012 at 07:24:56PM -0400, Christoph Hellwig wrote:
> On Thu, Aug 30, 2012 at 10:00:11PM +1000, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > We don't do any data writeback from XFS any more - the VFS is
> > completely responsible for that, including for freeze. We can
> > replace the remaining caller with the VFS level function that
> > achieves the same thing, but without conflicting with current
> > writeback work - writeback_inodes_sb_if_idle().
> > 
> > This means we can remove the flush_work and xfs_flush_inodes() - the
> > VFS functionality completely replaces the internal flush queue for
> > doing this writeback work in a separate context to avoid stack
> > overruns..
> 
> Are the lock ordering issues with writeback_inodes_sb_if_idle sorted out
> by now?  IIRC it still needs to be switch to a trylock.

It never gets called from unmount or freeze context, so I can't see
how it would deadlock in these use cases. It's only when we call
writeback_inodes_sb_if_idle() from a context that already holds
s_umount that the locking it has matters - that's where btrfs and
ext4 have been getting into trouble with this.

> > -                   xfs_flush_inodes(ip);
> > +                   writeback_inodes_sb_if_idle(VFS_I(ip)->i_sb,
> > +                                               WB_REASON_FS_FREE_SPACE);
> 
> I'd prefer to still keep a wrapper for an ugly call like this if we can.

OK, I'll add an inline function to do this.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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