linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] vfs/inode: For none-block-based filesystems default to sb->s_bdi
@ 2010-10-04 21:46 Boaz Harrosh
  2010-10-04 22:02 ` Boaz Harrosh
  0 siblings, 1 reply; 10+ messages in thread
From: Boaz Harrosh @ 2010-10-04 21:46 UTC (permalink / raw)
  To: Jan Kara, Christoph Hellwig, Al Viro, linux-fsdevel
  Cc: Trond Myklebust, Benny Halevy


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


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-10-06 20:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-04 21:46 [RFC] vfs/inode: For none-block-based filesystems default to sb->s_bdi Boaz Harrosh
2010-10-04 22:02 ` 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

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).