Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH 0/2] Enhance btrfs_verify_dev_extents() to do more checks on dev extents
@ 2018-10-05  8:25 Qu Wenruo
  2018-10-05  8:25 ` [PATCH 1/2] btrfs: volumes: Make sure there is no overlap dev extents at mount time Qu Wenruo
  2018-10-05  8:25 ` [PATCH 2/2] btrfs: volumes: Make sure no dev extent is beyond device boundary Qu Wenruo
  0 siblings, 2 replies; 8+ messages in thread
From: Qu Wenruo @ 2018-10-05  8:25 UTC (permalink / raw)
  To: linux-btrfs

Inspired by Hans' possible flawed DUP chunk allocator, add the following
dev extents checker:

1) Dev extent overlap check
   Dev extents don't use extent_cache so it can't report dev extents
   overlap.
   So manually check dev extents overlap.
   This check is pretty simple since we're already iterating dev extents
   by its physical offset, we only need to remember previous checked dev
   extents to do such check.

2) Dev extent end check
   No dev extent should go beyond device boundary.

These two checks are pretty cheap so it shouldn't bring any performance
overhead.

Qu Wenruo (2):
  btrfs: volumes: Make sure there is no overlap dev extents at mount
    time
  btrfs: volumes: Make sure no dev extent is beyond device boundary

 fs/btrfs/volumes.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

-- 
2.19.0


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-10-05 17:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-05  8:25 [PATCH 0/2] Enhance btrfs_verify_dev_extents() to do more checks on dev extents Qu Wenruo
2018-10-05  8:25 ` [PATCH 1/2] btrfs: volumes: Make sure there is no overlap dev extents at mount time Qu Wenruo
2018-10-05  8:56   ` Nikolay Borisov
2018-10-05  9:22     ` Qu Wenruo
2018-10-05 17:23       ` David Sterba
2018-10-05  8:25 ` [PATCH 2/2] btrfs: volumes: Make sure no dev extent is beyond device boundary Qu Wenruo
2018-10-05  8:55   ` Nikolay Borisov
2018-10-05  9:17     ` Qu Wenruo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox