public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Qu Wenruo <wqu@suse.com>
Cc: linux-btrfs@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v3 1/3] btrfs: enhance unsupported compat RO flags handling
Date: Mon, 5 Sep 2022 16:53:21 +0200	[thread overview]
Message-ID: <20220905145321.GF13489@twin.jikos.cz> (raw)
In-Reply-To: <1b3011f4b1bf4e60479568fcd3e090ea8b68d253.1660021230.git.wqu@suse.com>

On Tue, Aug 09, 2022 at 01:02:16PM +0800, Qu Wenruo wrote:
> Currently there are two corner cases not handling compat RO flags
> correctly:
> 
> - Remount
>   We can still mount the fs RO with compat RO flags, then remount it RW.
>   We should not allow any write into a fs with unsupported RO flags.
> 
> - Still try to search block group items
>   In fact, behavior/on-disk format change to extent tree should not
>   need a full incompat flag.
> 
>   And since we can ensure fs with unsupported RO flags never got any
>   writes (with above case fixed), then we can even skip block group
>   items search at mount time.
> 
> This patch will enhance the unsupported RO compat flags by:
> 
> - Reject RW remount if there is unsupported RO compat flags
> 
> - Go dummy block group items directly for unsupported RO compat flags
>   In fact, only changes to chunk/subvolume/root/csum trees should go
>   incompat flags.
> 
> The latter part should allow future change to extent tree to be compat
> RO flags.
> 
> Thus this patch also needs to be backported to all stable trees.
> 
> Cc: stable@vger.kernel.org

This applies cleanly only to 5.19, anything else would need a separate
backport. I'm planning to send this patch among 6.0 fixes so this
should give us time to get it to older stable kernels before the block
group tree is released.

  reply	other threads:[~2022-09-05 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09  5:02 [PATCH v3 0/3] btrfs: separate BLOCK_GROUP_TREE feature from extent-tree-v2 Qu Wenruo
2022-08-09  5:02 ` [PATCH v3 1/3] btrfs: enhance unsupported compat RO flags handling Qu Wenruo
2022-09-05 14:53   ` David Sterba [this message]
2022-09-05 22:36     ` Qu Wenruo
2022-08-09  5:02 ` [PATCH v3 2/3] btrfs: don't save block group root into super block Qu Wenruo
2022-08-09  5:02 ` [PATCH v3 3/3] btrfs: separate BLOCK_GROUP_TREE compat RO flag from EXTENT_TREE_V2 Qu Wenruo
2022-09-05 15:01   ` David Sterba
2022-09-05 22:37     ` Qu Wenruo
2022-09-06 16:15       ` David Sterba
2022-08-23 20:01 ` [PATCH v3 0/3] btrfs: separate BLOCK_GROUP_TREE feature from extent-tree-v2 David Sterba
2022-09-06 16:16   ` 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=20220905145321.GF13489@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=stable@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