On Mon, Oct 08, 2018 at 08:30:38PM +0800, Qu Wenruo wrote: > This patchset can be fetch from github: > https://github.com/adam900710/btrfs-progs/tree/dev_extents_check > > Hans van Kranenburg reported a case where btrfs DUP chunk allocator > could allocate invalid dev extents, either overlaps with existing dev > extents or beyond device boundary. > > This patchset enhances the btrfs-progs side to detect such problems. > With hand crafted test image for it. > > Link: https://www.spinics.net/lists/linux-btrfs/msg82370.html > > Changelog: > v2: > Fix a bug in the 1st patch which makes lowmem mode never checks > overlap dev extents. > Fix test case bug which never passes due to wrong script. > v3: > Add btrfs-image fixes to make test cases happy. > > Qu Wenruo (6): > btrfs-progs: image: Use correct device size when restoring > btrfs-progs: lowmem check: Add check for overlapping dev extents > btrfs-progs: original check: Add ability to detect bad dev extents > btrfs-progs: lowmem check: Add dev_item check for used bytes and total > bytes > btrfs-progs: original check: Add dev_item check for used bytes and > total bytes > btrfs-progs: fsck-tests: Add test image for dev extents beyond device > boundary
Added to devel with some fixups, thanks.
