* Re: Dirtiable inode bdi default != sb bdi btrfs
[not found] ` <20100929141006.GB7439@lst.de>
@ 2010-09-29 23:38 ` Jan Kara
2010-09-30 0:06 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2010-09-29 23:38 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Jens Axboe, Jan Kara, kernel, Jens Axboe, linux-kernel,
Micha?? Piotrowski, linux-mtd, Chris Mason, Chuck Ebbert,
linux-fsdevel, Andrew Morton, linux-btrfs, David Woodhouse,
stable, Cesar Eduardo Barros, Alexander Viro
On Wed 29-09-10 16:10:06, Christoph Hellwig wrote:
> On Wed, Sep 29, 2010 at 02:18:08PM +0200, Jan Kara wrote:
> > On Wed 29-09-10 10:19:36, Christoph Hellwig wrote:
> > > ---
> > > From: Christoph Hellwig <hch@lst.de>
> > > Subject: [PATCH] writeback: always use sb->s_bdi for writeback purposes
> > >
> > ...
> > > The one exception for now is the block device filesystem which really
> > > wants different writeback contexts for it's different (internal) inodes
> > > to handle the writeout more efficiently. For now we do this with
> > > a hack in fs-writeback.c because we're so late in the cycle, but in
> > > the future I plan to replace this with a superblock method that allows
> > > for multiple writeback contexts per filesystem.
> > Another exception I know about is mtd_inodefs filesystem
> > (drivers/mtd/mtdchar.c).
>
> No, it's not. MTD only has three different backing_dev_info instances
> which have different flags in the mapping-relevant portion of the
> backing_dev.
In the end I agree I was probably wrong but it's not that simple ;)
> > So at least here you'd need also add a similar exception for
> > "mtd_inodefs".
>
> No. For one thing we don't need any exception for correctnes alone -
> even the block device variant would work fine with the default case.
Here I don't agree. If you don't have some kind of exception, sb->s_bdi
for both "block" and "mtd_inodefs" filesystems points to
noop_backing_dev_info and you get no writeback for that one. So it isn't
just a performance issue but also a correctness one.
Regarding mtd_inodefs I now looked in more detail what MTD actually does
and it seems to me that MTD device inodes do not seem to carry any
cached state that flusher threads could write back. So returning
noop_backing_dev_info might be the right thing for them after all...
(added David Woodhouse and MTD list to CC so that they can shout if it's
not the case). Coming to this conclusion, I'm happy with your patch going
in as is...
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Dirtiable inode bdi default != sb bdi btrfs
2010-09-29 23:38 ` Dirtiable inode bdi default != sb bdi btrfs Jan Kara
@ 2010-09-30 0:06 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2010-09-30 0:06 UTC (permalink / raw)
To: Jan Kara
Cc: Jens Axboe, kernel, Jens Axboe, linux-kernel, stable,
Micha?? Piotrowski, linux-mtd, Cesar Eduardo Barros, Chuck Ebbert,
linux-fsdevel, Andrew Morton, linux-btrfs, David Woodhouse,
Christoph Hellwig, Chris Mason, Alexander Viro
On Thu, Sep 30, 2010 at 01:38:07AM +0200, Jan Kara wrote:
> > No. For one thing we don't need any exception for correctnes alone -
> > even the block device variant would work fine with the default case.
> Here I don't agree. If you don't have some kind of exception, sb->s_bdi
> for both "block" and "mtd_inodefs" filesystems points to
> noop_backing_dev_info and you get no writeback for that one. So it isn't
> just a performance issue but also a correctness one.
Indeed - for internal filesystems that require writeback the change
causes trouble if they haven't registered a s_bdi. But for all user
visible filesystems that doesn't happen as we require s_bdi for
sync or even unmounts to work.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-30 0:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4C9AA546.6050201@cesarb.net>
[not found] ` <20100923123849.8975fe47.akpm@linux-foundation.org>
[not found] ` <20100927222548.GG3610@quack.suse.cz>
[not found] ` <20100927225452.GG4270@think>
[not found] ` <20100929081936.GA23322@lst.de>
[not found] ` <20100929121808.GB3290@quack.suse.cz>
[not found] ` <20100929141006.GB7439@lst.de>
2010-09-29 23:38 ` Dirtiable inode bdi default != sb bdi btrfs Jan Kara
2010-09-30 0:06 ` Christoph Hellwig
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).