dcavalca / rpms / mdadm

Forked from rpms/mdadm 3 years ago
Clone

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

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