Skip to content

btrfs-progs: Enhance btrfs-image to handle missing device

Qu Wenruo linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3btrfs-progs: disk-io: Fix read_extent_data() error handler for missing devicedisk-io.c+4 -20 replies
2/3btrfs-progs: convert: Fix offset-by-one error in read_data_extent()image/main.c+1 -10 replies
3/3btrfs-progs: tests/misc: Test if btrfs-image can handle RAID1 missing devicetests/misc-tests/030-missing-device-image/test.sh+57 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] btrfs-progs: Enhance btrfs-image to handle missing device

Can be fetched from github:
https://github.com/adam900710/btrfs-progs/tree/btrfs_image_fix

Bug report:
https://github.com/kdave/btrfs-progs/issues/118

In short, the problem is caused by some old code (read_extent_data() from ancient btrfs check code) and offset-by-one from btrfs-image. Which makes btrfs-image can only read from the first stripe of RAID1.

And if device of the first stripe is missing, btrfs-image will fail.

Fix the problem and add test case for it.

Qu Wenruo (3):
btrfs-progs: disk-io: Fix read_extent_data() error handler for missing
device
btrfs-progs: convert: Fix offset-by-one error in read_data_extent()
btrfs-progs: tests/misc: Test if btrfs-image can handle RAID1 missing
device

 disk-io.c                                         |  6 ++-
 image/main.c                                      |  2 +-
 tests/misc-tests/030-missing-device-image/test.sh | 57 +++++++++++++++++++++++
 3 files changed, 62 insertions(+), 3 deletions(-)
 create mode 100755 tests/misc-tests/030-missing-device-image/test.sh
Signature · 1 line
2.16.3