Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Anand Jain <anand.jain@oracle.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 2/2] btrfs: handle volume split brain condition for dynamically reappearing device
Date: Wed, 20 Dec 2017 11:30:33 +0200	[thread overview]
Message-ID: <3b2b817f-fe6f-defc-c78c-9e26faddf95a@suse.com> (raw)
In-Reply-To: <20171220080403.12702-2-anand.jain@oracle.com>



On 20.12.2017 10:04, Anand Jain wrote:
> When the missing device reappears and joins the RAID group, and if there
> are no more missing device at the volume level, then reset the
> BTRFS_SUPER_FLAG_VOL_MOVED_ON flag.

You should rename the flag here as well. Also I believe the changelog
can be simplified:

When the last missing device in a RAID group joins we know the split
brain situation is resolved and we reset the SUPER_FLAG_DEGRADED.

> 
> This patch is on top of the patch [1] in the ML.
> [1] btrfs: handle dynamically reappearing missing device
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---
> On top of misc-next kdave.
> v2:
>  Rename to BTRFS_SUPER_FLAG_DEGRADED.
> 
>  fs/btrfs/volumes.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index 65d10f38dd99..32571f4fa72b 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -858,6 +858,10 @@ static noinline int device_list_add(const char *path,
>  
>  			fs_devices->missing_devices--;
>  			clear_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state);
> +			if (!fs_devices->missing_devices)
> +				btrfs_set_super_flags(fs_info->super_copy,
> +						      fs_info->super_copy->flags &
> +						      ~BTRFS_SUPER_FLAG_DEGRADED);
>  
>  			if (test_bit(BTRFS_DEV_STATE_WRITEABLE,
>  				     &device->dev_state) &&
> 

  reply	other threads:[~2017-12-20  9:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20  8:04 [PATCH v2 1/2] btrfs: handle volume split brain scenario Anand Jain
2017-12-20  8:04 ` [PATCH v2 2/2] btrfs: handle volume split brain condition for dynamically reappearing device Anand Jain
2017-12-20  9:30   ` Nikolay Borisov [this message]
2017-12-20  9:37 ` [PATCH v2 1/2] btrfs: handle volume split brain scenario Nikolay Borisov

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=3b2b817f-fe6f-defc-c78c-9e26faddf95a@suse.com \
    --to=nborisov@suse.com \
    --cc=anand.jain@oracle.com \
    --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