On Tue, Mar 13, 2018 at 11:06:37PM +0800, Anand Jain wrote: > We aren't checking the SB csum when the device scanned, > instead we do that when mounting the device, and if the > csum fails we fail the mount. How if we check the csum > when the device is scanned, I can't see any reason for > why not? any idea?
I think we should do some minimal checks of the sb also during scanning, as btrfs_open_one_device accesses a few items from unchecked 'disk_super' directly. So at least magic number and checksum plus validate the checksum type. -- 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