Before this patchset, btrfs-progs will overall ignore the superblock checksum and continue the routine. Sometimes this may cause disasters like checking a btrfs with corrupted superblock will lead to crash in btrfs-progs. This patch introduces superblock checksum check into btrfs_read_dev_super(), making btrfs-progs much more restricted and robust. To allow super-recover to open devices, add options to scan all 3 superblocks when using super-recover. Also updated the related error string and fix a bug in chunk-recover that will not be triggered until superblock csum is calculated. Qu Wenruo (4): btrfs-progs: Check superblock's checsum when read dev super btrfs-progs: Allow btrfs_read_dev_super() to read all 3 super for super_recover. btrfs-progs: Add more meaningful return value for btrfs_read_dev_super() and corresponding error string. btrfs-progs: Fix size for malloc for superblock checksum. btrfs-find-root.c | 9 ++++-- chunk-recover.c | 18 +++++++---- cmds-filesystem.c | 9 ++++-- disk-io.c | 91 +++++++++++++++++++++++++++++++++++++------------------ disk-io.h | 5 +-- super-recover.c | 2 +- utils.c | 16 ++++++---- volumes.c | 8 ++--- volumes.h | 2 +- 9 files changed, 104 insertions(+), 56 deletions(-) -- 2.0.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html