summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.h
diff options
context:
space:
mode:
authorZhao Lei <zhaolei@cn.fujitsu.com>2015-08-19 10:54:15 +0300
committerChris Mason <clm@fb.com>2015-08-31 21:45:48 +0300
commit943c6e9925d90dc80207322b5799d95fb90ffec0 (patch)
tree69a7b06454f007c6788d665274de93708ea3a394 /fs/btrfs/disk-io.h
parent2c4580454fffbf184fdb9292aa19ab1ffc224add (diff)
downloadlinux-943c6e9925d90dc80207322b5799d95fb90ffec0.tar.xz
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>
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r--fs/btrfs/disk-io.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h
index d4cbfeeeedd4..bdfb479ea859 100644
--- a/fs/btrfs/disk-io.h
+++ b/fs/btrfs/disk-io.h
@@ -139,6 +139,7 @@ struct btrfs_root *btrfs_create_tree(struct btrfs_trans_handle *trans,
u64 objectid);
int btree_lock_page_hook(struct page *page, void *data,
void (*flush_fn)(void *));
+int btrfs_get_num_tolerated_disk_barrier_failures(u64 flags);
int btrfs_calc_num_tolerated_disk_barrier_failures(
struct btrfs_fs_info *fs_info);
int __init btrfs_end_io_wq_init(void);