mkfs/rootdir: refactor and enhancements, part 1
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs-progs: rename logical bytenr parameter for add_file_item_extent()kernel-shared/ mkfs/ | +18 | 0 replies | |
| 2/3 | btrfs: mkfs/rootdir: refactor the last block handlingmkfs/ | +63 | 0 replies | |
| 3/3 | btrfs-progs: mkfs-tests: add a new one for '--reflink' optiontests/ | +57 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] mkfs/rootdir: refactor and enhancements, part 1
We have "--reflink" option introduced for mkfs for a while, and recently the new get_csums ioctl is also introduced, making add_file_item_extent() much larger and harder to maintain.
I have some concerns about the larger and larger add_file_item_extent(), and will address some of them in the series:
- Minor mismatches on some parameter/variable names Use more commonly used names to replace them.
- Duplicated partial block handling
Which not only makes add_file_item_extent() larger but also harder to read/maintain.
To remove those duplicated partial block handling, the idea is to shrink the range to block boundary when possible.
If we can not shrink the range anymore, disable reflink/get_csums.
So that we do not need to handle partial blocks for reflink/get_csums. All the duplicated code can be removed.
- No test case for --reflink nor the latest get_csums option A new test case, to verify all above mentioned cases.
Qu Wenruo (3):
btrfs-progs: rename logical bytenr parameter for
add_file_item_extent()
btrfs: mkfs/rootdir: refactor the last block handling
btrfs-progs: mkfs-tests: add a new one for '--reflink' option
kernel-shared/extent_io.c | 10 +- mkfs/rootdir.c | 175 ++++++++----------- tests/mkfs-tests/043-rootdir-reflink/test.sh | 57 ++++++ 3 files changed, 135 insertions(+), 107 deletions(-) create mode 100755 tests/mkfs-tests/043-rootdir-reflink/test.sh
--
2.54.0