Skip to content

mkfs: Fix minimal device check so that reported

Qu Wenruo linux-btrfs 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v4 Latest4 patches 6 repliesApplied

Changes in v4 from the cover letter

Further split run_mustfail_stdout() and prepare_test_dev() modification into separate patch.
Include the real mkfs fix into patchset, to prevent possible test failure.
Use suggestion from David to use run_check_mount_test_dev() and run_check_umount_test_dev().
Add "-b $good_size" to mkfs command line, so we can see the size in test result, to help further debugging.

Patches in v4 Applied

#Subject and filesSizeRepliesApplied
1/4btrfs-progs: mkfs: Enhance minimal device size calculation to fix mkfs failure on small filemkfs/common.c mkfs/common.h mkfs/main.c+65 -103 replies
2/4btrfs-progs: test/common: Introduce run_mustfail_stdouttests/common+52 -01 reply
3/4btrfs-progs: test/common: Enhance prepare_test_dev to reset device sizetests/common+5 -11 reply
4/4btrfs-progs: test/mkfs: Test if the minimal device size is validtests/mkfs-tests/010-small-image/test.sh+49 -01 reply

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchLu Fengqi
1/4R-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/4] mkfs: Fix minimal device check so that reported

Original reported by Wesley AC:
https://github.com/kdave/btrfs-progs/issues/70

Fix it by taking data/meta profile and minimal chunk size into consideration.

Also introduce a test case for that.

Changelog:
v2:
Refactor test_minimum_size() to take @min_dev_size directly. Refactor patch already in devel branch.
v3:
Split test/common modification into separate patch.
v4:
Further split run_mustfail_stdout() and prepare_test_dev() modification into separate patch.
Include the real mkfs fix into patchset, to prevent possible test failure.
Use suggestion from David to use run_check_mount_test_dev() and run_check_umount_test_dev().
Add "-b $good_size" to mkfs command line, so we can see the size in test result, to help further debugging.

Qu Wenruo (4):
btrfs-progs: mkfs: Enhance minimal device size calculation to fix mkfs
failure on small file
btrfs-progs: test/common: Introduce run_mustfail_stdout
btrfs-progs: test/common: Enhance prepare_test_dev to reset device
size
btrfs-progs: test/mkfs: Test if the minimal device size is valid

 mkfs/common.c                            | 68 ++++++++++++++++++++++++++++----
 mkfs/common.h                            |  4 +-
 mkfs/main.c                              |  3 +-
 tests/common                             | 58 ++++++++++++++++++++++++++-
 tests/mkfs-tests/010-small-image/test.sh | 49 +++++++++++++++++++++++
 5 files changed, 171 insertions(+), 11 deletions(-)
 create mode 100755 tests/mkfs-tests/010-small-image/test.sh
Signature · 1 line
2.14.3