From: Boaz Harrosh <bharrosh@panasas.com>
To: Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@infradead.org>,
Al Viro <viro@ZenIV.linux.org.uk>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
Benny Halevy <bhalevy@panasas.com>
Subject: [RFC] vfs/inode: For none-block-based filesystems default to sb->s_bdi
Date: Mon, 04 Oct 2010 17:46:05 -0400 [thread overview]
Message-ID: <4CAA4B1D.1010904@panasas.com> (raw)
In alloc_inode (inode_init_always) in the case that sb->s_bdev
is NULL. Should we not use sb->s_bdi as the default
mapping->backing_dev_info?
This fixes my none-block-based filesystem recent WARN_ON
at fs/fs-writeback.c:87 inode_to_bdi()
If not done here I'll need to do this in 5 different cases
in FS code. (OK the code could enjoy some re-factoring).
It does look logical the question is how many FSs will now
get broken?
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
fs/inode.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/inode.c b/fs/inode.c
index 8646433..200314f 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -181,6 +181,8 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
bdi = sb->s_bdev->bd_inode->i_mapping->backing_dev_info;
mapping->backing_dev_info = bdi;
+ } else {
+ mapping->backing_dev_info = sb->s_bdi;
}
inode->i_private = NULL;
inode->i_mapping = mapping;
--
1.7.2
next reply other threads:[~2010-10-04 21:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 21:46 Boaz Harrosh [this message]
2010-10-04 22:02 ` [RFC] vfs/inode: For none-block-based filesystems default to sb->s_bdi Boaz Harrosh
2010-10-05 8:32 ` Jan Kara
2010-10-05 13:53 ` Boaz Harrosh
2010-10-05 13:54 ` Boaz Harrosh
2010-10-05 15:12 ` Jan Kara
2010-10-05 15:09 ` Jan Kara
2010-10-05 15:29 ` Boaz Harrosh
2010-10-05 15:50 ` Jan Kara
2010-10-06 8:55 ` Christoph Hellwig
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=4CAA4B1D.1010904@panasas.com \
--to=bharrosh@panasas.com \
--cc=Trond.Myklebust@netapp.com \
--cc=bhalevy@panasas.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.