From: Josef Bacik <jbacik@fusionio.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Josef Bacik <jbacik@fusionio.com>, Mark Fasheh <mfasheh@suse.de>,
<viro@ZenIV.linux.org.uk>, <linux-fsdevel@vger.kernel.org>,
<linux-btrfs@vger.kernel.org>,
Chris Mason <chris.mason@fusionio.com>,
Andrew Vagin <avagin@gmail.com>
Subject: Re: [PATCH][RESEND] vfs: allow /proc/PID/maps to get device from stat
Date: Thu, 8 Aug 2013 11:31:37 -0400 [thread overview]
Message-ID: <20130808153137.GE16712@localhost.localdomain> (raw)
In-Reply-To: <20130808134805.GB24181@infradead.org>
On Thu, Aug 08, 2013 at 06:48:05AM -0700, Christoph Hellwig wrote:
> On Thu, Aug 08, 2013 at 09:02:07AM -0400, Josef Bacik wrote:
> > This won't work, try having 10000 subvolumes with dirty inodes and do sync then
> > go skiing, you'll have time :). Thanks,
>
> Why would the dirty inodes make any difference? If you share the bdi
> between the subvolumes the sync workflow should be exactly the same
> still.
>
The inodes are in the per-sb list, so we may start all the writing but we don't
wait all at once, so in the case of btrfs we will write all the dirty inodes,
and then wait on the ones in whatever sb we have, and then sync, which will
commit the transaction. Then we go to the next sb and wait on those inodes
which will dirty metadata which means we'll have another transaction and we'll
commit the transaction and so on and so forth. This means we write the
superblock 10000 times for one sync when we could have just done it once.
Now we could probably get around this by having ->sync_fs wait itself for all of
the inodes to complete and then commit the transaction once, but we're still
going to get called the 99999 times for the same damned file system that has
already had everything done.
And this is just one example, IIRC there were a few other issues that popped up
because we assume sb == completely separate file system, freeze I think is one
of those things. I'm sure there were other ones but the last time I tried to do
this was 2010/2011 and many brain cells have died since then. Thanks,
Josef
next prev parent reply other threads:[~2013-08-08 15:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 19:57 [PATCH][RESEND] vfs: allow /proc/PID/maps to get device from stat Mark Fasheh
2013-08-07 20:18 ` Christoph Hellwig
2013-08-07 20:51 ` Josef Bacik
2013-08-08 12:13 ` Christoph Hellwig
2013-08-08 13:02 ` Josef Bacik
2013-08-08 13:48 ` Christoph Hellwig
2013-08-08 15:31 ` Josef Bacik [this message]
2013-08-08 15:44 ` Josef Bacik
2013-08-12 11:47 ` Christoph Hellwig
2013-09-10 15:36 ` Mark Fasheh
2013-09-10 15:56 ` Josef Bacik
2013-09-10 21:21 ` Jeff Mahoney
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=20130808153137.GE16712@localhost.localdomain \
--to=jbacik@fusionio.com \
--cc=avagin@gmail.com \
--cc=chris.mason@fusionio.com \
--cc=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mfasheh@suse.de \
--cc=viro@ZenIV.linux.org.uk \
/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).