linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/7] btrfs-progs: tune: add resume support for csum conversion
Date: Wed, 24 May 2023 16:42:11 +0800	[thread overview]
Message-ID: <838e827b-c0eb-0ed6-7414-c2aeef5a4298@oracle.com> (raw)
In-Reply-To: <cover.1684913599.git.wqu@suse.com>



Why not use the generation numbers "From" and "To" for converting
to the new checksum and keeping track of the generation number of
the most recent successful conversion?

Thanks, Anand


On 24/05/2023 15:41, Qu Wenruo wrote:
> [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(-)
> 


  parent reply	other threads:[~2023-05-24  8:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Anand Jain [this message]
2023-05-24  8:48   ` [PATCH 0/7] btrfs-progs: tune: add resume support for csum conversion Qu Wenruo
2023-05-24 15:55 ` David Sterba
2023-05-24 22:24   ` Qu Wenruo
2023-08-09 15:50     ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838e827b-c0eb-0ed6-7414-c2aeef5a4298@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).