]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE
authorLiu Bo <liubo2009@cn.fujitsu.com>
Tue, 3 Apr 2012 01:56:53 +0000 (09:56 +0800)
committerDavid Sterba <dsterba@suse.cz>
Wed, 18 Apr 2012 17:22:13 +0000 (19:22 +0200)
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

index 20196f41120698f5d7efd7c6be5c56415bd44651..b9866f27ebd7da0700220a0fe4d244e60ba3363b 100644 (file)
@@ -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;
        }