btrfs-progs: mkfs/rootdir: add hole detection
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | btrfs-progs: mkfs/rootdir: add hole detectionmkfs/ | +33 | 0 replies | |
| 2/2 | btrfs-progs: mkfs-tests: add a test case for mkfs hole detectiontests/ | +70 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/2] btrfs-progs: mkfs/rootdir: add hole detection
This patchset is already submitted as a github PR, this is mostly for tracking purposes:
https://github.com/kdave/btrfs-progs/pull/1097
Currently mkfs.btrfs --rootdir will always read out the content from rootdir, and write them into the target fs.
This is IO consuming as we need to read out the data from host fs, and write them into the target btrfs, and also CPU consuming as we need to generate the data checksum.
With hole detection we can not only skip the IO and csum generation, but also result less space usage for the target fs.
The first patch is implementing the new hole detection, and the second one is the test case for it.
There is a small note for the test case. As I mentioned the 2GiB hole size problem in the first place, I should put the test case to include a huge hole (>=2GiB), but unfortunately that will greatly slow down the test case since md5sum doesn't have any shortcut to handle large holes.
Considering the CI machine time increase, I intentionally limited the hole size in the test case.
If one day we're not limited by the free machine time from github CI or have a local CI worker, I'm definitely fine to add a new large hole into the test case.
Qu Wenruo (2):
btrfs-progs: mkfs/rootdir: add hole detection
btrfs-progs: mkfs-tests: add a test case for mkfs hole detection
mkfs/rootdir.c | 36 ++++++++++- tests/mkfs-tests/041-hole-detection/test.sh | 70 +++++++++++++++++++++ 2 files changed, 103 insertions(+), 3 deletions(-) create mode 100755 tests/mkfs-tests/041-hole-detection/test.sh
--
2.53.0