]> git.hungrycats.org Git - linux/commit
btrfs: Add raid56 support for updating
authorZhao Lei <zhaolei@cn.fujitsu.com>
Wed, 19 Aug 2015 07:54:15 +0000 (15:54 +0800)
committerZygo Blaxell <zblaxell@thirteen.furryterror.org>
Sat, 17 Oct 2015 03:12:39 +0000 (23:12 -0400)
commit3a0fd7b3a7279d2a50a57169e9d9d5c6e7299029
treefbc57deda610a28d155c255443c8d5aebf20a43f
parentec90861a3df5c2efcecd98686b16f729ede9cdb2
btrfs: Add raid56 support for updating
 num_tolerated_disk_barrier_failures in btrfs_balance

Code for updating fs_info->num_tolerated_disk_barrier_failures in
btrfs_balance() lacks raid56 support.

Reason:
 Above code was wroten in 2012-08-01, together with
 btrfs_calc_num_tolerated_disk_barrier_failures()'s first version.

 Then, btrfs_calc_num_tolerated_disk_barrier_failures() got updated
 later to support raid56, but code in btrfs_balance() was not
 updated together.

Fix:
 Merge above similar code to a common function:
 btrfs_get_num_tolerated_disk_barrier_failures()
 and make it support both case.

 It can fix this bug with a bonus of cleanup, and make these code
 never in above no-sync state from now on.

Suggested-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
(cherry picked from commit 943c6e9925d90dc80207322b5799d95fb90ffec0)
(cherry picked from commit 0b8888f3e17627d981ee236af1c79e0212ef50e5)
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/volumes.c