All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE
@ 2012-04-03  1:56 Liu Bo
  2012-04-03  8:06 ` Karel Zak
  0 siblings, 1 reply; 4+ messages in thread
From: Liu Bo @ 2012-04-03  1:56 UTC (permalink / raw)
  To: linux-btrfs

Our code is not ready to cope with a sectorsize that's not equal to PAGE_SIZE.
It will lead to hanging-on while writing something.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
---
 fs/btrfs/disk-io.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 20196f4..b9866f2 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2254,9 +2254,9 @@ int open_ctree(struct super_block *sb,
 		goto fail_sb_buffer;
 	}
 
-	if (sectorsize < PAGE_SIZE) {
-		printk(KERN_WARNING "btrfs: Incompatible sector size "
-		       "found on %s\n", sb->s_id);
+	if (sectorsize != PAGE_SIZE) {
+		printk(KERN_WARNING "btrfs: Incompatible sector size(%lu) "
+		       "found on %s\n", (unsigned long)sectorsize, sb->s_id);
 		goto fail_sb_buffer;
 	}
 
-- 
1.6.5.2


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

end of thread, other threads:[~2012-04-03 13:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-03  1:56 [PATCH] Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE Liu Bo
2012-04-03  8:06 ` Karel Zak
2012-04-03  8:35   ` Liu Bo
2012-04-03 13:18     ` David Sterba

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.