summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Radtke <jakub.radtke@intel.com>2021-01-15 00:46:58 -0500
committerJes Sorensen <jsorensen@fb.com>2021-03-09 17:17:55 -0500
commitdc95f821ec58be8bccffc0858edca2d12fecef72 (patch)
tree2e3ff10a0a97630bab49663fb7dc5a7f170a01a7
parent69d40de44b6b90c498323490b7310399a6833d0d (diff)
downloadmdadm-dc95f821ec58be8bccffc0858edca2d12fecef72.tar.gz
Add "bitmap" to allowed command-line values
Currently, the sysfs interface allows bitmap setup only when volume is in an inactive state. For external metadata to add bitmap to existing volume instead of GROW, the UPDATE operation can be done. The patch adds a "bitmap" argument to the allowed values for UPDATE. Signed-off-by: Jakub Radtke <jakub.radtke@intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
-rw-r--r--mdadm.8.in13
-rw-r--r--mdadm.c4
2 files changed, 14 insertions, 3 deletions
diff --git a/mdadm.8.in b/mdadm.8.in
index 34a93a8f..c89d901e 100644
--- a/mdadm.8.in
+++ b/mdadm.8.in
@@ -2408,9 +2408,11 @@ or
.B \-\-update=
option. The supported options are
.BR name ,
-.B ppl
+.BR ppl ,
+.BR no\-ppl ,
+.BR bitmap
and
-.BR no\-ppl .
+.BR no\-bitmap .
The
.B name
@@ -2428,6 +2430,13 @@ and
options enable and disable PPL in the metadata. Currently supported only for
IMSM subarrays.
+The
+.B bitmap
+and
+.B no\-bitmap
+options enable and disable write-intent bitmap in the metadata. Currently supported only for
+IMSM subarrays.
+
.TP
.B \-\-examine
The device should be a component of an md array.
diff --git a/mdadm.c b/mdadm.c
index 493d70e4..9a4317d5 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -779,6 +779,8 @@ int main(int argc, char *argv[])
continue;
if (strcmp(c.update, "devicesize") == 0)
continue;
+ if (strcmp(c.update, "bitmap") == 0)
+ continue;
if (strcmp(c.update, "no-bitmap") == 0)
continue;
if (strcmp(c.update, "bbl") == 0)
@@ -827,7 +829,7 @@ int main(int argc, char *argv[])
fprintf(outf, "Valid --update options are:\n"
" 'sparc2.2', 'super-minor', 'uuid', 'name', 'nodes', 'resync',\n"
" 'summaries', 'homehost', 'home-cluster', 'byteorder', 'devicesize',\n"
- " 'no-bitmap', 'metadata', 'revert-reshape'\n"
+ " 'bitmap', 'no-bitmap', 'metadata', 'revert-reshape'\n"
" 'bbl', 'no-bbl', 'force-no-bbl', 'ppl', 'no-ppl'\n"
" 'layout-original', 'layout-alternate', 'layout-unspecified'\n"
);