]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix minimum number of chunk errors for DUP
authorDavid Sterba <dsterba@suse.com>
Fri, 17 May 2019 09:43:13 +0000 (11:43 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:34:55 +0000 (13:34 +0200)
commit578a4fc6d6a10e9675159b0b4c56e0aff56b7015
treeab6c7bdaef632514955494089c83762abcb4cb96
parentf07097c6e5c132429d34730530e514a16e83fed1
btrfs: fix minimum number of chunk errors for DUP

The list of profiles in btrfs_chunk_max_errors lists DUP as a profile
DUP able to tolerate 1 device missing. Though this profile is special
with 2 copies, it still needs the device, unlike the others.

Looking at the history of changes, thre's no clear reason why DUP is
there, functions were refactored and blocks of code merged to one
helper.

698621f58ee02 Btrfs: fix writing data into the seed filesystem
  - factor code to a helper

e848277e9b163 Btrfs: don't pre-allocate btrfs bio
  - unrelated change, DUP still in the list with max errors 1

a236aed14ccb0 Btrfs: Deal with failed writes in mirrored configurations
  - introduced the max errors, leaves DUP and RAID1 in the same group

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c