diff options
author | Gui Hecheng <guihc.fnst@cn.fujitsu.com> | 2014-06-25 18:04:17 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-08-22 14:43:11 +0200 |
commit | ad70b55b66b516d0d8271a8f16bee7192c556987 (patch) | |
tree | 519852a425c4f237a92960edba8b9a1179a47e6b /chunk-recover.c | |
parent | 70e3a85e9e6384f8876a4c1af5910a682786adbb (diff) |
btrfs-progs: replace BTRFS_NUM_MIRRORS with BTRFS_MAX_MIRRORS
The chunk-recover.c/BTRFS_NUM_MIRRORS in the userspace means
the same thing as ctree.h/BTRFS_MAX_MIRRORS in the kernelspace,
so to stay consistent with the kernelspace, just make this movement
in the userspace:
chunk-recover.c/BTRFS_NUM_MIRRORS
===>
ctree.h/BTRFS_MAX_MIRRORS
This provides convenience for future use.
Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'chunk-recover.c')
-rw-r--r-- | chunk-recover.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/chunk-recover.c b/chunk-recover.c index 8bc5bc30..b638ada6 100644 --- a/chunk-recover.c +++ b/chunk-recover.c @@ -42,8 +42,6 @@ #include "btrfsck.h" #include "commands.h" -#define BTRFS_NUM_MIRRORS 3 - struct recover_control { int verbose; int yes; @@ -71,8 +69,8 @@ struct extent_record { struct cache_extent cache; u64 generation; u8 csum[BTRFS_CSUM_SIZE]; - struct btrfs_device *devices[BTRFS_NUM_MIRRORS]; - u64 offsets[BTRFS_NUM_MIRRORS]; + struct btrfs_device *devices[BTRFS_MAX_MIRRORS]; + u64 offsets[BTRFS_MAX_MIRRORS]; int nmirrors; }; @@ -128,7 +126,7 @@ again: memcmp(exist->csum, rec->csum, BTRFS_CSUM_SIZE)) { ret = -EEXIST; } else { - BUG_ON(exist->nmirrors >= BTRFS_NUM_MIRRORS); + BUG_ON(exist->nmirrors >= BTRFS_MAX_MIRRORS); exist->devices[exist->nmirrors] = device; exist->offsets[exist->nmirrors] = offset; exist->nmirrors++; |