Skip to content

Commit

Permalink
Btrfs: do not mount when we have a sectorsize unequal to PAGE_SIZE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liu Bo authored and David Sterba committed Apr 18, 2012
1 parent 207a232 commit 8d082fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8d082fb

Please sign in to comment.