linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] btrfs-progs: tune: add resume support for csum conversion
@ 2023-05-24  7:41 Qu Wenruo
  2023-05-24  7:41 ` [PATCH 1/7] btrfs-progs: tune: implement resume support for metadata checksum Qu Wenruo
                   ` (8 more replies)
  0 siblings, 9 replies; 13+ messages in thread
From: Qu Wenruo @ 2023-05-24  7:41 UTC (permalink / raw)
  To: linux-btrfs

[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(-)

-- 
2.40.1


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-08-09 15:50 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-24  7:41 [PATCH 0/7] btrfs-progs: tune: add resume support for csum conversion Qu Wenruo
2023-05-24  7:41 ` [PATCH 1/7] btrfs-progs: tune: implement resume support for metadata checksum Qu Wenruo
2023-05-24  7:41 ` [PATCH 2/7] btrfs-progs: tune: implement resume support for generating new data csum Qu Wenruo
2023-05-24  7:41 ` [PATCH 3/7] btrfs-progs: tune: implement resume support for csum tree without any new csum item Qu Wenruo
2023-05-24  7:41 ` [PATCH 4/7] btrfs-progs: tune: implement resume support for empty csum tree Qu Wenruo
2023-05-24  7:41 ` [PATCH 5/7] btrfs-progs: tune: implement resume support for half deleted old csums Qu Wenruo
2023-05-24  7:41 ` [PATCH 6/7] btrfs-progs: tune: implement resume support for data csum objectid change Qu Wenruo
2023-05-24  7:41 ` [PATCH 7/7] btrfs-progs: tune: reject csum change if the fs is already using the target csum type Qu Wenruo
2023-05-24  8:42 ` [PATCH 0/7] btrfs-progs: tune: add resume support for csum conversion Anand Jain
2023-05-24  8:48   ` Qu Wenruo
2023-05-24 15:55 ` David Sterba
2023-05-24 22:24   ` Qu Wenruo
2023-08-09 15:50     ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).