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

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