]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
btrfs: document BTRFS_MAX_MIRRORS
authorDavid Sterba <dsterba@suse.com>
Fri, 31 May 2019 15:22:59 +0000 (17:22 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 2 Jul 2019 10:30:49 +0000 (12:30 +0200)
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>
fs/btrfs/ctree.h

index fb74355334781d2c1fa7b20fb1099c244acb3029..31198499f175a456daafdadc5c091d667ea13e84 100644 (file)
@@ -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