Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d082fb7 authored by Liu Bo's avatar Liu Bo Committed by David Sterba
Browse files

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: default avatarLiu Bo <liubo2009@cn.fujitsu.com>
parent 207a232c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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;
	}