From: Liu Bo Date: Tue, 3 Apr 2012 01:56:53 +0000 (+0800) Subject: Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE X-Git-Tag: v3.4-rc5~6^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8d082fb727ac11930ea20bf1612e334ea7c2b697;p=platform%2Fkernel%2Flinux-3.10.git Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE 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 --- 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; }