Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: fdmanana@kernel.org, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: fix removal of raid[56|1c34} incompat flags after removing block group
Date: Sat, 21 Mar 2020 09:43:21 +0800	[thread overview]
Message-ID: <8107ef53-5317-327c-674e-d5bd1b9d1e4d@gmx.com> (raw)
In-Reply-To: <20200320184348.845248-1-fdmanana@kernel.org>


[-- Attachment #1.1: Type: text/plain, Size: 1468 bytes --]



On 2020/3/21 上午2:43, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
> 
> We are incorrectly dropping the raid56 and raid1c34 incompat flags when
> there are still raid56 and raid1c34 block groups, not when we do not any
> of those anymore. The logic just got unintentionally broken after adding
> the support for the raid1c34 modes.
> 
> Fix this by clear the flags only if we do not have block groups with the
> respective profiles.
> 
> Fixes: 9c907446dce3 ("btrfs: drop incompat bit for raid1c34 after last block group is gone")
> Signed-off-by: Filipe Manana <fdmanana@suse.com>

The fix is OK.

Reviewed-by: Qu Wenruo <wqu@suse.com>

Just interesting do we really need to remove such flags?
To me, keep the flag is completely sane.

Thanks,
Qu
> ---
>  fs/btrfs/block-group.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
> index 7b003a2df79e..b8f39a679064 100644
> --- a/fs/btrfs/block-group.c
> +++ b/fs/btrfs/block-group.c
> @@ -856,9 +856,9 @@ static void clear_incompat_bg_bits(struct btrfs_fs_info *fs_info, u64 flags)
>  				found_raid1c34 = true;
>  			up_read(&sinfo->groups_sem);
>  		}
> -		if (found_raid56)
> +		if (!found_raid56)
>  			btrfs_clear_fs_incompat(fs_info, RAID56);
> -		if (found_raid1c34)
> +		if (!found_raid1c34)
>  			btrfs_clear_fs_incompat(fs_info, RAID1C34);
>  	}
>  }
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2020-03-21  1:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20 18:43 [PATCH] Btrfs: fix removal of raid[56|1c34} incompat flags after removing block group fdmanana
2020-03-20 20:27 ` David Sterba
2020-03-21  1:43 ` Qu Wenruo [this message]
2020-03-21 17:45   ` David Sterba
2020-03-22  0:42     ` Qu Wenruo
2020-03-23 19:28       ` David Sterba
2020-03-24  7:03         ` 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=8107ef53-5317-327c-674e-d5bd1b9d1e4d@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=fdmanana@kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    /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