linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Christoph Hellwig <hch@infradead.org>,
	xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: do_sync() and XFSQA test 182 failures....
Date: Fri, 31 Oct 2008 18:22:32 -0400	[thread overview]
Message-ID: <20081031222232.GB29761@infradead.org> (raw)
In-Reply-To: <20081031215430.GB19509@disturbed>

On Sat, Nov 01, 2008 at 08:54:30AM +1100, Dave Chinner wrote:
> Effectively, yes. 
> 
> Currently we iterate inodes for data and "metadata" sync, and the
> only other concept is writing superblocks. I think most filesystems
> have more types of metadata than this, so it makes sense for sync to
> work on abstracts sync as data and metadata rather than data, inodes
> and superblocks...

Yes, absolutely.  And for those that have inodes as primary / only
metadata besides superblock we can still provide a generic_sync_inodes
helper that just takes a callback to apply to every inode.  Which we
probably want anyway as XFS is the only intree-filesystem that currently
has a more efficient way to iterate inodes.

> > And as we found out it's not just sync that gets it wrong, it's also
> > fsync (which isn't part of the above picture as it's per-inode) that
> > gets this utterly wrong, as well as all kinds of syncs, not just the
> > unmount one.
> 
> Async writeback (write_inode()) has the same problem as fsync -
> writing the inode before waiting for data I/O to complete - which
> means we've got to jump through hoops in the filesystem to avoid
> blocking on inodes that can't be immediately flushed, and often we
> end up writing the inode multiple times and having to issue log
> forces whenw e shouldn't need to. Effectively we have to tell the
> VFS to "try again later" the entire time data is being flushed
> before we can write the inode and it's exceedingly inefficient.....

Yes, that was the couple of sync functions I meant above as the whole
inode writeback path is extremly convoluted - mostly due to the dirty
data vs metadata mixup mess.

  reply	other threads:[~2008-10-31 22:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-30  8:50 do_sync() and XFSQA test 182 failures Dave Chinner
2008-10-30 22:46 ` Christoph Hellwig
2008-10-31  0:12   ` Dave Chinner
2008-10-31  0:48     ` Dave Chinner
2008-10-31 20:31     ` Christoph Hellwig
2008-10-31 21:54       ` Dave Chinner
2008-10-31 22:22         ` Christoph Hellwig [this message]
2008-10-31  4:02 ` Lachlan McIlroy
2008-10-31 13:06   ` Dave Chinner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081031222232.GB29761@infradead.org \
    --to=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).