Blame SOURCES/0038-mdadm-md.4-add-the-descriptions-for-bitmap-sysfs-nod.patch

f9a9f5
From e53cb968691d9e40d83caf5570da3bb7b83c64e1 Mon Sep 17 00:00:00 2001
f9a9f5
From: Guoqing Jiang <gqjiang@suse.com>
f9a9f5
Date: Fri, 31 May 2019 10:10:00 +0800
f9a9f5
Subject: [RHEL7.8 PATCH V2 38/47] mdadm/md.4: add the descriptions for bitmap
f9a9f5
 sysfs nodes
f9a9f5
f9a9f5
The sysfs nodes under bitmap are not recorded in md.4,
f9a9f5
add them based on md.rst and kernel source code.
f9a9f5
f9a9f5
Cc: NeilBrown <neilb@suse.com>
f9a9f5
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
f9a9f5
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
f9a9f5
---
f9a9f5
 md.4 | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
f9a9f5
 1 file changed, 69 insertions(+)
f9a9f5
f9a9f5
diff --git a/md.4 b/md.4
f9a9f5
index 3a1d677..e86707a 100644
f9a9f5
--- a/md.4
f9a9f5
+++ b/md.4
f9a9f5
@@ -1101,6 +1101,75 @@ stripe that requires some "prereading".  For fairness this defaults to
f9a9f5
 maximizes sequential-write throughput at the cost of fairness to threads
f9a9f5
 doing small or random writes.
f9a9f5
 
f9a9f5
+.TP
f9a9f5
+.B md/bitmap/backlog
f9a9f5
+The value stored in the file only has any effect on RAID1 when write-mostly
f9a9f5
+devices are active, and write requests to those devices are proceed in the
f9a9f5
+background.
f9a9f5
+
f9a9f5
+This variable sets a limit on the number of concurrent background writes,
f9a9f5
+the valid values are 0 to 16383, 0 means that write-behind is not allowed,
f9a9f5
+while any other number means it can happen.  If there are more write requests
f9a9f5
+than the number, new writes will by synchronous.
f9a9f5
+
f9a9f5
+.TP
f9a9f5
+.B md/bitmap/can_clear
f9a9f5
+This is for externally managed bitmaps, where the kernel writes the bitmap
f9a9f5
+itself, but metadata describing the bitmap is managed by mdmon or similar.
f9a9f5
+
f9a9f5
+When the array is degraded, bits mustn't be cleared. When the array becomes
f9a9f5
+optimal again, bit can be cleared, but first the metadata needs to record
f9a9f5
+the current event count. So md sets this to 'false' and notifies mdmon,
f9a9f5
+then mdmon updates the metadata and writes 'true'.
f9a9f5
+
f9a9f5
+There is no code in mdmon to actually do this, so maybe it doesn't even
f9a9f5
+work.
f9a9f5
+
f9a9f5
+.TP
f9a9f5
+.B md/bitmap/chunksize
f9a9f5
+The bitmap chunksize can only be changed when no bitmap is active, and
f9a9f5
+the value should be power of 2 and at least 512.
f9a9f5
+
f9a9f5
+.TP
f9a9f5
+.B md/bitmap/location
f9a9f5
+This indicates where the write-intent bitmap for the array is stored.
f9a9f5
+It can be "none" or "file" or a signed offset from the array metadata
f9a9f5
+- measured in sectors. You cannot set a file by writing here - that can
f9a9f5
+only be done with the SET_BITMAP_FILE ioctl.
f9a9f5
+
f9a9f5
+Write 'none' to 'bitmap/location' will clear bitmap, and the previous
f9a9f5
+location value must be write to it to restore bitmap.
f9a9f5
+
f9a9f5
+.TP
f9a9f5
+.B md/bitmap/max_backlog_used
f9a9f5
+This keeps track of the maximum number of concurrent write-behind requests
f9a9f5
+for an md array, writing any value to this file will clear it.
f9a9f5
+
f9a9f5
+.TP
f9a9f5
+.B md/bitmap/metadata
f9a9f5
+This can be 'internal' or 'clustered' or 'external'. 'internal' is set
f9a9f5
+by default, which means the metadata for bitmap is stored in the first 256
f9a9f5
+bytes of the bitmap space. 'clustered' means separate bitmap metadata are
f9a9f5
+used for each cluster node. 'external' means that bitmap metadata is managed
f9a9f5
+externally to the kernel.
f9a9f5
+
f9a9f5
+.TP
f9a9f5
+.B md/bitmap/space
f9a9f5
+This shows the space (in sectors) which is available at md/bitmap/location,
f9a9f5
+and allows the kernel to know when it is safe to resize the bitmap to match
f9a9f5
+a resized array. It should big enough to contain the total bytes in the bitmap.
f9a9f5
+
f9a9f5
+For 1.0 metadata, assume we can use up to the superblock if before, else
f9a9f5
+to 4K beyond superblock. For other metadata versions, assume no change is
f9a9f5
+possible.
f9a9f5
+
f9a9f5
+.TP
f9a9f5
+.B md/bitmap/time_base
f9a9f5
+This shows the time (in seconds) between disk flushes, and is used to looking
f9a9f5
+for bits in the bitmap to be cleared.
f9a9f5
+
f9a9f5
+The default value is 5 seconds, and it should be an unsigned long value.
f9a9f5
+
f9a9f5
 .SS KERNEL PARAMETERS
f9a9f5
 
f9a9f5
 The md driver recognised several different kernel parameters.
f9a9f5
-- 
f9a9f5
2.7.5
f9a9f5