linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Qu Wenruo <quwenruo@cn.fujitsu.com>,
	linux-btrfs@vger.kernel.org, anand.jain@oracle.com,
	kilobyte@angband.pl, demfloro@demfloro.ru
Subject: Re: [PATCH v3 0/7] Chunk level degradable check
Date: Wed, 8 Mar 2017 07:25:50 -0500	[thread overview]
Message-ID: <ffde6cef-d1a7-b96f-c0cd-7fa06094a4cd@gmail.com> (raw)
In-Reply-To: <20170308024124.16899-1-quwenruo@cn.fujitsu.com>

On 2017-03-07 21:41, Qu Wenruo wrote:
> Btrfs currently uses num_tolerated_disk_barrier_failures to do global
> check for tolerated missing device.
>
> Although the one-size-fit-all solution is quite safe, it's too strict
> if data and metadata has different duplication level.
>
> For example, if one use Single data and RAID1 metadata for 2 disks, it
> means any missing device will make the fs unable to be degraded
> mounted.
>
> But in fact, some times all single chunks may be in the existing
> device and in that case, we should allow it to be rw degraded mounted.
>
> Such case can be easily reproduced using the following script:
>  # mkfs.btrfs -f -m raid1 -d sing /dev/sdb /dev/sdc
>  # wipefs -f /dev/sdc
>  # mount /dev/sdb -o degraded,rw
>
> If using btrfs-debug-tree to check /dev/sdb, one should find that the
> data chunk is only in sdb, so in fact it should allow degraded mount.
>
> This patchset will introduce a new per-chunk degradable check for
> btrfs, allow above case to succeed, and it's quite small anyway.
>
> And enhance kernel error message for missing device, at least kernel
> can know what's making mount failed, other than meaningless
> "failed to read system chunk/chunk tree -5".
>
> v2:
>   Update after almost 2 years.
>   Add the last patch to enhance the kernel output, so user can know
>   it's missing devices prevent btrfs to mount.
> v3:
>   Remove one duplicated missing device output
>   Use the advice from Anand Jain, not to add new members in btrfs_device,
>   but use a new structure extra_rw_degrade_errors, to record error when
>   sending down/waiting device.
>
> Sorry Dmitrii Tcvetkov and Adam Borowski, I'm afraid I can't add your
> tested-by tags in v3, as the 4th and 4th patches have quite a big change,
> so you may need to retest the new patchset.
> Sorry for the trouble.
>
> Qu Wenruo (7):
>   btrfs: Introduce a function to check if all chunks a OK for degraded
>     rw mount
>   btrfs: Do chunk level rw degrade check at mount time
>   btrfs: Do chunk level degradation check for remount
>   btrfs: Introduce extra_rw_degrade_errors parameter for
>     btrfs_check_rw_degradable
>   btrfs: Allow barrier_all_devices to do chunk level device check
>   btrfs: Cleanup num_tolerated_disk_barrier_failures
>   btrfs: Enhance missing device kernel message
>
>  fs/btrfs/ctree.h   |   2 -
>  fs/btrfs/disk-io.c |  87 ++++++------------------------
>  fs/btrfs/disk-io.h |   2 -
>  fs/btrfs/super.c   |   5 +-
>  fs/btrfs/volumes.c | 156 ++++++++++++++++++++++++++++++++++++++++++++---------
>  fs/btrfs/volumes.h |  37 +++++++++++++
>  6 files changed, 188 insertions(+), 101 deletions(-)
>
Everything appears to work as advertised here, so for the patcheset as a 
whole, you can add:

Tested-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>

Also, I've added a couple of specific cases to my automated test scripts 
to make sure this keeps working, so going forwards we'll have some 
regression testing for this.

  parent reply	other threads:[~2017-03-08 12:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-08  2:41 [PATCH v3 0/7] Chunk level degradable check Qu Wenruo
2017-03-08  2:41 ` [PATCH v3 1/7] btrfs: Introduce a function to check if all chunks a OK for degraded rw mount Qu Wenruo
2017-03-08  2:41 ` [PATCH v3 2/7] btrfs: Do chunk level rw degrade check at mount time Qu Wenruo
2017-03-08  2:41 ` [PATCH v3 3/7] btrfs: Do chunk level degradation check for remount Qu Wenruo
2017-03-08  2:41 ` [PATCH v3 4/7] btrfs: Introduce extra_rw_degrade_errors parameter for btrfs_check_rw_degradable Qu Wenruo
2017-03-08  2:41 ` [PATCH v3 5/7] btrfs: Allow barrier_all_devices to do chunk level device check Qu Wenruo
2017-03-08  2:41 ` [PATCH v3 6/7] btrfs: Cleanup num_tolerated_disk_barrier_failures Qu Wenruo
2017-03-08  2:41 ` [PATCH v3 7/7] btrfs: Enhance missing device kernel message Qu Wenruo
2017-03-08  5:26   ` Andrei Borzenkov
2017-03-08  5:43     ` Qu Wenruo
2017-03-08  6:47 ` [PATCH v3 0/7] Chunk level degradable check Adam Borowski
2017-03-08  7:39   ` Qu Wenruo
2017-03-08 18:40     ` Anand Jain
2017-03-08 19:01     ` Anand Jain
2017-03-08  8:00 ` Dmitrii Tcvetkov
2017-03-08 12:25 ` Austin S. Hemmelgarn [this message]
2017-03-08 18:31 ` Anand Jain
2017-03-08 21:08 ` Goffredo Baroncelli

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=ffde6cef-d1a7-b96f-c0cd-7fa06094a4cd@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=anand.jain@oracle.com \
    --cc=demfloro@demfloro.ru \
    --cc=kilobyte@angband.pl \
    --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).