On Wed, Aug 23, 2017 at 04:57:55PM +0900, Qu Wenruo wrote: > The patchset introduce a new framework to do more comprehensive (if not > the most) sanity check when reading out a leaf. > > The new sanity checker will include: > > 1) Key order > Existing code > > 2) Item boundary > Existing code with enhanced checker to ensure item pointer doesn't > overlap with item itself. > > 3) Key type based sanity checker > Only EXTENT_DATA and EXTENT_CSUM checker is implemented yet. > As each checker should go through review and tests, or it can easily > make a valid btrfs failed to be mounted. > So only two checkers are implemented as an example. > > Existing checker like INODE_REF checker can be moved to this > framework easily, and we can centralize all existing checkers, make > the rest of codes more clean. > > Performance wise, it's just iterating a leaf. > And it will only get triggered when reading a leaf, cached leaf will > not go through such checker. > So it won't be a performance breaker. The series looks great, I really like it. Some of the error messages could be more verbose about what exactly went wrong, eg. what is the value that's not expected. I'll reply to the patches with examples what I'd expect. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
