aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLiu Bo <liubo2009@cn.fujitsu.com>2012-04-02 21:56:53 -0400
committerDavid Sterba <dsterba@suse.cz>2012-04-18 13:22:13 -0400
commit8d082fb727ac11930ea20bf1612e334ea7c2b697 (patch)
tree417f84a4e3743bf0af435e0e339ef3fc54520a68 /fs
parent207a232ccac0a8cb79d304bd17298dbc96e2e082 (diff)
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 <liubo2009@cn.fujitsu.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/disk-io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 20196f411206..b9866f27ebd7 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -2254,9 +2254,9 @@ int open_ctree(struct super_block *sb,
2254 goto fail_sb_buffer; 2254 goto fail_sb_buffer;
2255 } 2255 }
2256 2256
2257 if (sectorsize < PAGE_SIZE) { 2257 if (sectorsize != PAGE_SIZE) {
2258 printk(KERN_WARNING "btrfs: Incompatible sector size " 2258 printk(KERN_WARNING "btrfs: Incompatible sector size(%lu) "
2259 "found on %s\n", sb->s_id); 2259 "found on %s\n", (unsigned long)sectorsize, sb->s_id);
2260 goto fail_sb_buffer; 2260 goto fail_sb_buffer;
2261 } 2261 }
2262 2262