lkml.org 
[lkml]   [2019]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 08/19] btrfs: make unmirroed BGs readonly only if we have at least one writable BG
Date
On 2019/06/13 23:09, Josef Bacik wrote:
> On Fri, Jun 07, 2019 at 10:10:14PM +0900, Naohiro Aota wrote:
>> If the btrfs volume has mirrored block groups, it unconditionally makes
>> un-mirrored block groups read only. When we have mirrored block groups, but
>> don't have writable block groups, this will drop all writable block groups.
>> So, check if we have at least one writable mirrored block group before
>> setting un-mirrored block groups read only.
>>
>
> I don't understand why you want this. Thanks,
>
> Josef
>

This is necessary to handle e.g. btrfs/124 case.

When we mount degraded RAID1 FS and write to it, and then
re-mount with full device, the write pointers of corresponding
zones of written BG differ. The patch 07 mark such block group
as "wp_broken" and make it read only. In this situation, we only
have read only RAID1 BGs because of "wp_broken" and un-mirrored BGs
are also marked read only, because we have RAID1 BGs.
As a result, all the BGs are now read only, so that we
cannot even start the rebalance to fix the situation.

\
 
 \ /
  Last update: 2019-06-18 09:43    [W:0.094 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site