On Fri, Mar 30, 2018 at 08:09:16AM +0800, Anand Jain wrote: > v3->v4: > Update changelog and signoff. > Reintroduce explicit check for '-EUCLEAN' > at Patch 2/8 and 5/8. > > v2->v3: > Squash > 4/8 btrfs: make btrfs_check_super_csum() non static > to > 6/8 btrfs: verify superblock checksum during scan > As in the individual patch mentioned > > v1->v2: > Various changes suggested by Nicokay. Thanks. For specific changes > pls ref to the patch. > > Patch 1-4/8 are preparatory patches adds cleanups and nonstatic requisites. > > Patch 5/8 makes sure that all copies of the superblock have the same fsid > when we scan the device.
This is IMO too strict and the need of workaround puts the burden on the user while it's not necessary and scan or mount can continue as long as the first superblock is valid. > Patch 6/8 verifies superblock csum when we read it in the scan context. This was the main intention, as I read the discussion in the thread under the RFC patch. The semantics of scanning is not exactly defined, in the current code it's "pick any device that has the right magic and sb offset", so adding the csum check would add some validation but otherwise it's fine. All the work is left to mount and all reported errors can be examined immediatelly. Wiping the magic either manually or by wipefs will not touch the csum, so we don't change the behaviour. Reporting errors on each scan is a usability no-go. Patches 1-4 look ok, I'll have to think more about 5. -- 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