btrfs-progs: tune: add resume support for csum conversion
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | btrfs-progs: tune: implement resume support for metadata checksumtune/ | +81 | 0 replies | |
| 2/7 | btrfs-progs: tune: implement resume support for generating new data csumtune/ | +193 | 0 replies | |
| 3/7 | btrfs-progs: tune: implement resume support for csum tree without any new csum itemtune/ | +102 | 0 replies | |
| 4/7 | btrfs-progs: tune: implement resume support for empty csum treetune/ | +7 | 0 replies | |
| 5/7 | btrfs-progs: tune: implement resume support for half deleted old csumstune/ | +10 | 0 replies | |
| 6/7 | btrfs-progs: tune: implement resume support for data csum objectid changetune/ | +21 | 0 replies | |
| 7/7 | btrfs-progs: tune: reject csum change if the fs is already using the target csum typetune/ | +8 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/7] btrfs-progs: tune: add resume support for csum conversion
[RESUME SUPPORT]
This patchset adds the resume support for "btrfstune --csum".
The main part is in resume for data csum change, as we have 4 different status during data csum conversion.
Thankfully for data csum conversion, everything is protected by metadata COW and we can detect the current status by the existence of both old and new csum items, and their coverage.
For resume of metadata conversion, there is nothing we can really do but go through all the tree blocks and verify them against both new and old csum type.
[TESTING]
For the tests, currently errors are injected after every possible transaction commit, and then resume from that interrupted status. So far the patchset passes all above tests.
But I'm not sure what's the better way to craft the test case.
Should we go log-writes? Or use pre-built images?
[TODO]
- Test cases for resume
- Support for revert if errors are found
If we hit data csum mismatch and can not repair from any copy, then we should revert back to the old csum.
- Support for pre-cautious metadata check
We'd better read and very metadata before rewriting them.
- Performance tuning
We want to take a balance between too frequent commit transaction and too large transaction.
This is especially true for data csum objectid change and maybe old data csum deletion.
- UI enhancement
A btrfs-convert like UI would be better.
Qu Wenruo (7):
btrfs-progs: tune: implement resume support for metadata checksum
btrfs-progs: tune: implement resume support for generating new data
csum
btrfs-progs: tune: implement resume support for csum tree without any
new csum item
btrfs-progs: tune: implement resume support for empty csum tree
btrfs-progs: tune: implement resume support for half deleted old csums
btrfs-progs: tune: implement resume support for data csum objectid
change
btrfs-progs: tune: reject csum change if the fs is already using the
target csum type
tune/change-csum.c | 461 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 418 insertions(+), 43 deletions(-)
Signature · 1 line
2.40.1