[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100727172437.GE6820@quack.suse.cz>
Date: Tue, 27 Jul 2010 19:24:38 +0200
From: Jan Kara <jack@...e.cz>
To: Christoph Hellwig <hch@...radead.org>
Cc: Jan Kara <jack@...e.cz>, LKML <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/3] bdi: Use parent filesystem BDI for inodes not
capable of writeback
On Tue 27-07-10 13:09:03, Christoph Hellwig wrote:
> > +static struct backing_dev_info *inode_to_bdi(struct inode *inode)
> > +{
> > + struct backing_dev_info *bdi = inode->i_mapping->backing_dev_info;
> > +
> > + /*
> > + * This is a hack but it solves a problem with device inode
> > + * for e.g. /dev/zero getting dirty (via touch or so) and confusing
> > + * writeback code. In such cases we return the "parent" filesystem's
> > + * bdi.
> > + */
> > + if (bdi_cap_writeback_dirty(bdi))
> > + return bdi;
> > + return inode->i_sb->s_bdi;
>
> When do we ever have a writeback-capable bdi that sits inside another
> filesystem? I think just always using inode->i_sb->s_bdi is the right
> thing here.
Always returning inode->i_sb->s_bdi wouldn't be a right thing IMHO.
That would file inode for /dev/sda to BDI list of tmpfs mounted on /dev/
which isn't what you want...
> And btw, having a BDI_CAP_NO_WRITEBACK instead of a BDI_CAP_WRITEBACK
> is rather dumb, we'd better fix it up while we're at it.
Yes, that seems reasonable. I'm just not sure how many places one has
to change to fix this and how to find them... Maybe grepping for BDI_CAP_
will be enough but I'm not sure.
Honza
--
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists