From: Anand Jain <anand.jain@oracle.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Cc: dsterba@suse.cz
Subject: Re: [PATCH] btrfs-progs: btrfstune: Register new UUIDs after uuid change
Date: Mon, 10 Oct 2016 18:54:08 +0800 [thread overview]
Message-ID: <d74cdd9e-ad05-3d33-111e-92308c7b9775@oracle.com> (raw)
In-Reply-To: <20161010092101.469-1-quwenruo@cn.fujitsu.com>
On 10/10/16 17:21, Qu Wenruo wrote:
> For multi-device btrfs, after UUID change we should info kernel, or new
> fs can't be mounted due to false alert on missing devices.
>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> ---
> btrfstune.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/btrfstune.c b/btrfstune.c
> index 15dde90..23d06ce 100644
> --- a/btrfstune.c
> +++ b/btrfstune.c
> @@ -369,6 +369,15 @@ static int change_uuid(struct btrfs_fs_info *fs_info, const char *new_fsid_str)
> fs_info->new_fsid = NULL;
> fs_info->new_chunk_tree_uuid = NULL;
> printf("Fsid change finished\n");
> +
> + /*
> + * Register new devices, or multi-volume btrfs can't be mounted until
> + * device scan happens.
> + * Ignore any error, as such register is optional.
> + */
> + printf("Register new UUIDs(error can be ignored)\n");
Whats the error in particular in this context. ?
> + btrfs_register_all_devices();
That means after a reboot -> change uuid it will register the devices
though the devices weren't registered to the kernel before.
Its fair enough just remind user to run dev scan so that kernel can
see them.
Thanks, Anand
> +
> out:
> return ret;
> }
>
next prev parent reply other threads:[~2016-10-10 10:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 9:21 [PATCH] btrfs-progs: btrfstune: Register new UUIDs after uuid change Qu Wenruo
2016-10-10 10:54 ` Anand Jain [this message]
2016-10-10 11:08 ` David Sterba
2016-10-10 13:58 ` Anand Jain
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=d74cdd9e-ad05-3d33-111e-92308c7b9775@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=quwenruo@cn.fujitsu.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).