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

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