Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/4] btrfs: rescue= mount options enhancement to support interrupted csum conversion
Date: Tue, 11 Jun 2024 12:43:08 -0400	[thread overview]
Message-ID: <20240611164308.GA247672@perftesting> (raw)
In-Reply-To: <cover.1718082585.git.wqu@suse.com>

On Tue, Jun 11, 2024 at 02:51:34PM +0930, Qu Wenruo wrote:
> [REPO]
> https://github.com/adam900710/linux/tree/rescue_changes
> 
> [BACKGROUND]
> There is an adventurous user using btrfstune to convert a 32T btrfs
> from crc32c to xxhash.
> 
> However for such huge fs, it takes too long time and the reporter
> canceled the conversion.
> 
> This makes the reporter unable to mount the fs at all.
> 
> [CAUSE]
> First of all, for a half converted fs, we will never allow RW mount, so
> everything must be done in rescue mode.
> 
> There are several different stages of csum conversion, and at different
> stage it requires different handling from kernel:
> 
> - Generationg new data csums
>   At this stage only the super flags (CHANGING_DATA_CSUM flag) is
>   preventing the kernel from mounting.
> 
>   Intrdoce "rescue=ignoresuperflags" to address this.
> 
> - Deleting old data cums
>   The same super flags problem, with possible missing data csums.
> 
>   Despite the new "rescue=ignoresuperflags", end users will also need
>   the existing "rescue=ignoredatacsums" mount option.
> 
> - Renaming the objectid of new data cums
>   The new csums' objectid will be changed to the regular one.
> 
>   During this we can hit data csum mismatch.
>   So the same "rescue=ignoresuperflags:ignoredatacsums" can handle it
>   already.
> 
> - Rewriting metadata csums
>   This part is done in-place (no COW), with a new super flags
>   (CHANGING_META_CSUM).
> 
>   So here introduce a new "rescue=ignoremetacsums" to ignore the
>   metadata checksum verification (and rely on the remaining sanity
>   checks like tree-checkers).
> 
> The first 2 patches are just small cleanups, meanwhile the last two are
> the new "rescue=" mount options to handle interrupted csum change.
> 
> Qu Wenruo (4):
>   btrfs: remove unused Opt enums
>   btrfs: output the unrecognized super flags as hex
>   btrfs: introduce new "rescue=ignoremetacsums" mount option
>   btrfs: introduce new "rescue=ignoresuperflags" mount option
> 

Reviewed-by: Josef Bacik <josef@toxicpanda.com>

Could you update the docs in btrfs-progs/wherever we're keeping the readthedocs
stuff so that these new flags are documented?  Thanks,

Josef

  parent reply	other threads:[~2024-06-11 16:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11  5:21 [PATCH 0/4] btrfs: rescue= mount options enhancement to support interrupted csum conversion Qu Wenruo
2024-06-11  5:21 ` [PATCH 1/4] btrfs: remove unused Opt enums Qu Wenruo
2024-06-12 19:31   ` David Sterba
2024-06-11  5:21 ` [PATCH 2/4] btrfs: output the unrecognized super flags as hex Qu Wenruo
2024-06-11  5:21 ` [PATCH 3/4] btrfs: introduce new "rescue=ignoremetacsums" mount option Qu Wenruo
2024-06-12 19:38   ` David Sterba
2024-06-13 21:28     ` Qu Wenruo
2024-06-16 18:17       ` David Sterba
2024-06-16 21:24         ` Qu Wenruo
2024-06-11  5:21 ` [PATCH 4/4] btrfs: introduce new "rescue=ignoresuperflags" " Qu Wenruo
2024-06-12 19:42   ` David Sterba
2024-06-13 21:46     ` Qu Wenruo
2024-06-11 16:43 ` Josef Bacik [this message]
2024-06-13 21:23   ` [PATCH 0/4] btrfs: rescue= mount options enhancement to support interrupted csum conversion Qu Wenruo

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=20240611164308.GA247672@perftesting \
    --to=josef@toxicpanda.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