On Fri, Apr 12, 2013 at 03:55:06PM +0800, Anand Jain wrote: > If one of the copy of the superblock is zero it does not > confirm to us that btrfs isn't there on that disk. When > we are having more than one copy of superblock we should > rather let the for loop to continue to check other copies. > > the following test case and results would justify the > fix > > mkfs.btrfs /dev/sdb /dev/sdc -f > mount /dev/sdb /btrfs > dd if=/dev/zero bs=1 count=8 of=/dev/sdc seek=$((64*1024+64)) > ~/before/btrfs-select-super -s 1 /dev/sdc > using SB copy 1, bytenr 67108864 > > here btrfs-select-super just wrote superblock to a mounted btrfs
Why does not check_mounted() catch this in the first place? Ie. based on the status in /proc/mounts not on random bytes in the superblock. david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html