From: Anand Jain <anand.jain@oracle.com>
To: Zhaolei <zhaolei@cn.fujitsu.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] btrfs: Show detail information when mount failed on missing devices
Date: Tue, 21 Jul 2015 18:13:36 +0800 [thread overview]
Message-ID: <55AE1B50.6030905@oracle.com> (raw)
In-Reply-To: <afa8fe22bb5c6e18046b6a950cea399d31ab5407.1437386077.git.zhaolei@cn.fujitsu.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
On 07/20/2015 05:55 PM, Zhaolei wrote:
> From: Zhao Lei <zhaolei@cn.fujitsu.com>
>
> When mount failed because missing device, we can see following
> dmesg:
> [ 1060.267743] BTRFS: too many missing devices, writeable mount is not allowed
> [ 1060.273158] BTRFS: open_ctree failed
>
> This patch add missing_device_number and tolerated_missing_device_number
> to above output, to let user know what really happened, and helps
> bug-report and debug.
>
> dmesg after patch:
> [ 127.050367] BTRFS: missing devices(1) exceeds the limit(0), writeable mount is not allowed
> [ 127.056099] BTRFS: open_ctree failed
>
> Changelog v1->v2:
> 1: Changed to more clear description, suggested-by:
> Anand Jain <anand.jain@oracle.com>
>
> Suggested-by: Anand Jain <anand.jain@oracle.com>
> Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
> ---
> fs/btrfs/disk-io.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
> index 2eda03b..5b44e02 100644
> --- a/fs/btrfs/disk-io.c
> +++ b/fs/btrfs/disk-io.c
> @@ -2950,8 +2950,9 @@ retry_root_backup:
> if (fs_info->fs_devices->missing_devices >
> fs_info->num_tolerated_disk_barrier_failures &&
> !(sb->s_flags & MS_RDONLY)) {
> - printk(KERN_WARNING "BTRFS: "
> - "too many missing devices, writeable mount is not allowed\n");
> + pr_warn("BTRFS: missing devices(%llu) exceeds the limit(%d), writeable mount is not allowed\n",
> + fs_info->fs_devices->missing_devices,
> + fs_info->num_tolerated_disk_barrier_failures);
> goto fail_sysfs;
> }
>
>
prev parent reply other threads:[~2015-07-21 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-20 9:54 [PATCH] btrfs: Show detail information when mount failed on missing devices Zhaolei
2015-07-21 10:13 ` Anand Jain [this message]
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=55AE1B50.6030905@oracle.com \
--to=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=zhaolei@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).