Skip to content

Commit

Permalink
btrfs: document BTRFS_MAX_MIRRORS
Browse files Browse the repository at this point in the history
The real meaning of that constant is not clear from the context due to
the target device inclusion.

Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
David Sterba committed Jul 2, 2019
1 parent a07e8a4 commit 71a9c48
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@ struct btrfs_ref;

#define BTRFS_MAGIC 0x4D5F53665248425FULL /* ascii _BHRfS_M, no null */

#define BTRFS_MAX_MIRRORS 3
/*
* Maximum number of mirrors that can be available for all profiles counting
* the target device of dev-replace as one. During an active device replace
* procedure, the target device of the copy operation is a mirror for the
* filesystem data as well that can be used to read data in order to repair
* read errors on other disks.
*
* Current value is derived from RAID1 with 2 copies.
*/
#define BTRFS_MAX_MIRRORS (2 + 1)

#define BTRFS_MAX_LEVEL 8

Expand Down

0 comments on commit 71a9c48

Please sign in to comment.