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>,
	Anand Jain <anand.jain@oracle.com>,
	dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3.1 0/7] Chunk level degradable check
Date: Tue, 27 Jun 2017 07:20:06 -0400	[thread overview]
Message-ID: <97b844cd-7637-8df9-e05b-b0e6ff78f6c8@gmail.com> (raw)
In-Reply-To: <0f1ddef7-7d3b-ab2d-da71-a7d6f07d2937@cn.fujitsu.com>

On 2017-06-26 22:49, Qu Wenruo wrote:
> 
> 
> At 06/27/2017 09:59 AM, Anand Jain wrote:
>>
>>
>> On 06/27/2017 09:05 AM, Qu Wenruo wrote:
>>>
>>>
>>> At 06/27/2017 02:59 AM, David Sterba wrote:
>>>> On Thu, Mar 09, 2017 at 09:34:35AM +0800, 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".
>>>>
>>>> I'd like to get this merged to 4.14. The flush bio changes are now 
>>>> done,
>>>> so the base code should be stable. I've read the previous iterations of
>>>> this patchset, the comments and user feedback. The usecase coverage
>>>> seems to be good and what users expect.
>>>
>>> Thank you for the kindly remind.
>>>
>>>>
>>>> There are some bits in the implementation that I do not like, eg.
>>>> reintroducing memory allocation failure to the barrier check, but IIRC
>>>> no fundamental problems. Please refresh the patchset on top of current
>>>> code that's going to 4.13 (equvalent to the current for-next), I'll
>>>> review that and comment. One or more iterations might be needed, but
>>>> 4.14 target is within reach.
>>>
>>> I'll check the new flush infrastructure and figure out if we can 
>>> avoid re-introducing such memory allocation failure with the new 
>>> infrastructure.
>>
>>   As this is going to address the raid1 availability issue, its better to
>>   mark this for the stable. IMO. But I wonder if there is any objection ?
> 
> Not sure if stable maintainers (even normal subsystem maintainers) will 
> like it, as it's quite a large modification, including dev flush 
> infrastructure.
> 
> But since v4.14 will be an LTS kernel, we don't need to rush too much to 
> push this feature to stable, as long as the feature is planned to reach 
> v4.14.
I would personally tend to disagree.  It fixes a pretty severe data loss 
bug that arises from what most people for some reason think is 
acceptable normal usage.  I can understand not going too far back, but I 
do think it should probably be marked for at least 4.9.


  reply	other threads:[~2017-06-27 11:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-09  1:34 [PATCH v3.1 0/7] Chunk level degradable check Qu Wenruo
2017-03-09  1:34 ` [PATCH v3.1 1/7] btrfs: Introduce a function to check if all chunks a OK for degraded rw mount Qu Wenruo
2017-03-13  7:29   ` Anand Jain
2017-03-13  7:25     ` Qu Wenruo
2017-05-01 10:21       ` Dmitrii Tcvetkov
2017-05-02  0:20         ` Qu Wenruo
2017-05-02  2:28           ` Anand Jain
2017-03-09  1:34 ` [PATCH v3.1 2/7] btrfs: Do chunk level rw degrade check at mount time Qu Wenruo
2017-03-09  1:34 ` [PATCH v3.1 3/7] btrfs: Do chunk level degradation check for remount Qu Wenruo
2017-03-09  1:34 ` [PATCH v3.1 4/7] btrfs: Introduce extra_rw_degrade_errors parameter for btrfs_check_rw_degradable Qu Wenruo
2017-03-09  1:34 ` [PATCH v3.1 5/7] btrfs: Allow barrier_all_devices to do chunk level device check Qu Wenruo
2017-03-13  8:00   ` Anand Jain
2017-03-09  1:34 ` [PATCH v3.1 6/7] btrfs: Cleanup num_tolerated_disk_barrier_failures Qu Wenruo
2017-03-09  1:34 ` [PATCH v3.1 7/7] btrfs: Enhance missing device kernel message Qu Wenruo
2017-06-26 18:59 ` [PATCH v3.1 0/7] Chunk level degradable check David Sterba
2017-06-27  1:05   ` Qu Wenruo
2017-06-27  1:59     ` Anand Jain
2017-06-27  2:49       ` Qu Wenruo
2017-06-27 11:20         ` Austin S. Hemmelgarn [this message]
2017-06-27 12:20           ` David Sterba

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=97b844cd-7637-8df9-e05b-b0e6ff78f6c8@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=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).