import mdadm-4.2-7.el8

This commit is contained in:
CentOS Sources 2023-05-16 06:14:50 +00:00 committed by root
parent 2412c4acce
commit 5ec1ce78ee
86 changed files with 4992 additions and 306 deletions

View File

@ -1,7 +1,7 @@
From f1cc8ab9ab6a92c3cd94ab7590b46285e214681e Mon Sep 17 00:00:00 2001
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Date: Tue, 15 Mar 2022 09:30:30 +0100
Subject: [PATCH 01/12] Unify error message.
Subject: [PATCH 01/83] Unify error message.
Provide the same error message for the same error that can occur in Grow.c and super-intel.c.
@ -43,5 +43,5 @@ index d5fad102..5ffa7636 100644
}
}
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 5ce5a15f0bf007e850e15259bba4f53736605fb2 Mon Sep 17 00:00:00 2001
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Date: Fri, 25 Mar 2022 12:48:59 +0100
Subject: [PATCH 02/12] mdadm: Fix double free
Subject: [PATCH 02/83] mdadm: Fix double free
If there was a size mismatch after creation it would get fixed on grow
in imsm_fix_size_mismatch(), but due to double free "double free or corruption (fasttop)"
@ -29,5 +29,5 @@ index 5ffa7636..6ff336ee 100644
ret_val = 0;
exit:
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From fea026b4849182fc8413014c81456e7215af28d9 Mon Sep 17 00:00:00 2001
From: Mateusz Kusiak <mateusz.kusiak@intel.com>
Date: Wed, 23 Mar 2022 15:05:19 +0100
Subject: [PATCH 03/12] Grow_reshape: Add r0 grow size error message and update
Subject: [PATCH 03/83] Grow_reshape: Add r0 grow size error message and update
man
Grow size on r0 is not supported for imsm and native metadata.
@ -79,5 +79,5 @@ index be902dba..e2a42425 100644
.BR \-Z ", " \-\-array\-size=
This is only meaningful with
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From cf9a109209aad285372b67306d54118af6fc522b Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Date: Fri, 14 Jan 2022 16:44:33 +0100
Subject: [PATCH 04/12] udev: adapt rules to systemd v247
Subject: [PATCH 04/83] udev: adapt rules to systemd v247
New events have been added in kernel 4.14 ("bind" and "unbind").
Systemd maintainer suggests to modify "add|change" branches.
@ -63,5 +63,5 @@ index 12bdcaa8..2e185cee 100644
ENV{MD_LEVEL}=="raid[1-9]*", \
TEST=="/sys/block/$parent/device/timeout", \
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 83a379cfbd283b387919fe05d44eb4c49e155ad6 Mon Sep 17 00:00:00 2001
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Date: Mon, 21 Feb 2022 13:05:20 +0100
Subject: [PATCH 05/12] Replace error prone signal() with sigaction()
Subject: [PATCH 05/83] Replace error prone signal() with sigaction()
Up to this date signal() was used which implementation could vary [1].
Sigaction() call is preferred. This commit introduces replacement
@ -248,5 +248,5 @@ index 3d05d074..cc94f96e 100644
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From e9dd5644843e2013a7dd1a8a5da2b9fa35837416 Mon Sep 17 00:00:00 2001
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Date: Fri, 18 Mar 2022 09:26:04 +0100
Subject: [PATCH 06/12] mdadm: Respect config file location in man
Subject: [PATCH 06/83] mdadm: Respect config file location in man
Default config file location could differ depending on OS (e.g. Debian family).
This patch takes default config file into consideration when creating mdadm.man
@ -1529,5 +1529,5 @@ index 00000000..83edd008
+.BR mdadm (8),
+.BR md (4).
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From c23400377bb3d8e98e810cd92dba478dac1dff82 Mon Sep 17 00:00:00 2001
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Date: Fri, 18 Mar 2022 09:26:05 +0100
Subject: [PATCH 07/12] mdadm: Update ReadMe
Subject: [PATCH 07/83] mdadm: Update ReadMe
Instead of hardcoded config file path give reference to config manual.
@ -44,5 +44,5 @@ index 81399765..8f873c48 100644
;
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 24e075c659d0a8718aabefe5af4c97195a188af7 Mon Sep 17 00:00:00 2001
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Date: Fri, 18 Mar 2022 09:26:06 +0100
Subject: [PATCH 08/12] mdadm: Update config man regarding default files and
Subject: [PATCH 08/83] mdadm: Update config man regarding default files and
multi-keyword behavior
Simplify default and alternative config file and directory location references
@ -199,5 +199,5 @@ index 83edd008..dd331a6a 100644
.SH EXAMPLE
DEVICE /dev/sd[bcdjkl]1
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From c33bbda5b0e127bb161fd4ad44bcfaa2a5daf153 Mon Sep 17 00:00:00 2001
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Date: Fri, 18 Mar 2022 09:26:07 +0100
Subject: [PATCH 09/12] mdadm: Update config manual
Subject: [PATCH 09/83] mdadm: Update config manual
Add missing HOMECLUSTER keyword description.
@ -41,5 +41,5 @@ index dd331a6a..cd4e6a9d 100644
.B AUTO
A list of names of metadata format can be given, each preceded by a
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 913f07d1db4a0078acc26d6ccabe1c315cf9273c Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Date: Thu, 20 Jan 2022 13:18:32 +0100
Subject: [PATCH 10/12] Create, Build: use default_layout()
Subject: [PATCH 10/83] Create, Build: use default_layout()
This code is duplicated for Build mode so make default_layout() extern
and use it. Simplify the function structure.
@ -149,5 +149,5 @@ index 26e7e5cd..cd72e711 100644
extern int parse_layout_10(char *layout);
extern int parse_layout_faulty(char *layout);
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 5f21d67472ad08c1e96b4385254adba79aa1c467 Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Date: Thu, 20 Jan 2022 13:18:33 +0100
Subject: [PATCH 11/12] mdadm: add map_num_s()
Subject: [PATCH 11/83] mdadm: add map_num_s()
map_num() returns NULL if key is not defined. This patch adds
alternative, non NULL version for cases where NULL is not expected.
@ -378,5 +378,5 @@ index 2995713d..0d98a65f 100644
info->consistency_policy = CONSISTENCY_POLICY_RESYNC;
}
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 1066ab83dbe9a4cc20f7db44a40aa2cbb9d5eed6 Mon Sep 17 00:00:00 2001
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Date: Fri, 13 May 2022 09:19:42 +0200
Subject: [PATCH 13/52] mdmon: Stop parsing duplicate options
Subject: [PATCH 13/83] mdmon: Stop parsing duplicate options
Introduce new function is_duplicate_opt() to check if given option
was already used and prevent setting it again along with an error
@ -118,5 +118,5 @@ index 5570574b..c057da63 100644
struct mdstat_ent *mdstat, *e;
int container_len = strlen(container_name);
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 20e114e334ed6ed3280c37a9a08fb95578393d1a Mon Sep 17 00:00:00 2001
From: Mateusz Kusiak <mateusz.kusiak@intel.com>
Date: Thu, 19 May 2022 09:16:08 +0200
Subject: [PATCH 14/52] Grow: block -n on external volumes.
Subject: [PATCH 14/83] Grow: block -n on external volumes.
Performing --raid-devices on external metadata volume should be blocked
as it causes unwanted behaviour.
@ -37,5 +37,5 @@ index 8a242b0f..f6efbc48 100644
return 1;
}
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From de064c93e3819d72720e4fba6575265ba10e1553 Mon Sep 17 00:00:00 2001
From: Mateusz Grzonka <mateusz.grzonka@intel.com>
Date: Mon, 13 Jun 2022 12:11:25 +0200
Subject: [PATCH 15/52] Incremental: Fix possible memory and resource leaks
Subject: [PATCH 15/83] Incremental: Fix possible memory and resource leaks
map allocated through map_by_uuid() is not freed if mdfd is invalid.
In addition mdfd is not closed, and mdinfo list is not freed too.
@ -86,5 +86,5 @@ index a57fc323..4d0cd9d6 100644
static void run_udisks(char *arg1, char *arg2)
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From e702f392959d1c2ad2089e595b52235ed97b4e18 Mon Sep 17 00:00:00 2001
From: Kinga Tanska <kinga.tanska@intel.com>
Date: Mon, 6 Jun 2022 12:32:12 +0200
Subject: [PATCH 16/52] Mdmonitor: Fix segfault
Subject: [PATCH 16/83] Mdmonitor: Fix segfault
Mdadm with "--monitor" parameter requires md device
as an argument to be monitored. If given argument is
@ -94,5 +94,5 @@ index 245be537..d18c9319 100644
{
static char devnm[32];
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From f5ff2988761625b43eb15555993f2797af29f166 Mon Sep 17 00:00:00 2001
From: Kinga Tanska <kinga.tanska@intel.com>
Date: Mon, 6 Jun 2022 12:32:13 +0200
Subject: [PATCH 17/52] Mdmonitor: Improve logging method
Subject: [PATCH 17/83] Mdmonitor: Improve logging method
Change logging, and as a result, mdmonitor in verbose
mode will report its configuration.
@ -57,5 +57,5 @@ index 4e5802b5..6ca1ebe5 100644
info.mailaddr = mailaddr;
info.mailfrom = mailfrom;
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 626bc45396c4959f2c4685c2faa7c4f553f4efdf Mon Sep 17 00:00:00 2001
From: Mateusz Grzonka <mateusz.grzonka@intel.com>
Date: Mon, 13 Jun 2022 11:59:34 +0200
Subject: [PATCH 18/52] Fix possible NULL ptr dereferences and memory leaks
Subject: [PATCH 18/83] Fix possible NULL ptr dereferences and memory leaks
In Assemble there was a NULL check for sra variable,
which effectively didn't stop the execution in every case.
@ -69,5 +69,5 @@ index 8cda23a7..abbc8b09 100644
}
vc->phys_refnum[i_prim] = ddf->phys->entries[dl->pdnum].refnum;
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 756a15f32338fdf0c562678694bc8991ad6afb90 Mon Sep 17 00:00:00 2001
From: Mateusz Grzonka <mateusz.grzonka@intel.com>
Date: Mon, 13 Jun 2022 12:00:09 +0200
Subject: [PATCH 19/52] imsm: Remove possibility for get_imsm_dev to return
Subject: [PATCH 19/83] imsm: Remove possibility for get_imsm_dev to return
NULL
Returning NULL from get_imsm_dev or __get_imsm_dev will cause segfault.
@ -297,5 +297,5 @@ index ba3bd41f..3788feb9 100644
}
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 190dc029b141c423e724566cbed5d5afbb10b05a Mon Sep 17 00:00:00 2001
From: Nigel Croxon <ncroxon@redhat.com>
Date: Mon, 18 Apr 2022 13:44:23 -0400
Subject: [PATCH 20/52] Revert "mdadm: fix coredump of mdadm --monitor -r"
Subject: [PATCH 20/83] Revert "mdadm: fix coredump of mdadm --monitor -r"
This reverts commit 546047688e1c64638f462147c755b58119cabdc8.
@ -81,5 +81,5 @@ index 8f873c48..bec1be9a 100644
struct option long_options[] = {
{"manage", 0, 0, ManageOpt},
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 953cc7e5a485a91ddec7312c7a5d7779749fad5f Mon Sep 17 00:00:00 2001
From: Kinga Tanska <kinga.tanska@intel.com>
Date: Tue, 21 Jun 2022 00:10:39 +0800
Subject: [PATCH 21/52] util: replace ioctl use with function
Subject: [PATCH 21/83] util: replace ioctl use with function
Replace using of ioctl calling to get md array info with
special function prepared to it.
@ -27,5 +27,5 @@ index cc94f96e..38f0420e 100644
return !ret;
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 63902857b98c37c8ac4b837bb01d006b327a4532 Mon Sep 17 00:00:00 2001
From: Heming Zhao <heming.zhao@suse.com>
Date: Tue, 21 Jun 2022 00:10:40 +0800
Subject: [PATCH 22/52] mdadm/super1: restore commit 45a87c2f31335 to fix
Subject: [PATCH 22/83] mdadm/super1: restore commit 45a87c2f31335 to fix
clustered slot issue
Commit 9d67f6496c71 ("mdadm:check the nodes when operate clustered
@ -106,5 +106,5 @@ index e3e2f954..3a0c69fd 100644
* Since the nodes num is not increased, no
* need to check the space enough or not,
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 76c152ca9851e9fcdf52e8f6e7e6c09b936bdd14 Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Date: Tue, 21 Jun 2022 00:10:41 +0800
Subject: [PATCH 23/52] imsm: introduce get_disk_slot_in_dev()
Subject: [PATCH 23/83] imsm: introduce get_disk_slot_in_dev()
The routine was added to remove unnecessary get_imsm_dev() and
get_imsm_map() calls, used only to determine disk slot.
@ -118,5 +118,5 @@ index 3788feb9..cd1f1e3d 100644
}
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 6d4d9ab295de165e57b5c30e044028dbffb8f297 Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Date: Tue, 21 Jun 2022 00:10:42 +0800
Subject: [PATCH 24/52] imsm: use same slot across container
Subject: [PATCH 24/83] imsm: use same slot across container
Autolayout relies on drives order on super->disks list, but
it is not quaranted by readdir() in sysfs_read(). As a result
@ -248,5 +248,5 @@ index cd1f1e3d..deef7c87 100644
*/
max_size = 0;
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 9a7df595bbe360132cb37c8b39aa1fd9ac24b43f Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Date: Tue, 21 Jun 2022 00:10:43 +0800
Subject: [PATCH 25/52] imsm: block changing slots during creation
Subject: [PATCH 25/83] imsm: block changing slots during creation
If user specifies drives for array creation, then slot order across
volumes is not preserved.
@ -118,5 +118,5 @@ index ff5d2093..00000000
-offset=$((offset+size+4096))
-imsm_check member $member4 $num_disks $level $size 1024 $offset
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 70f1ff4291b0388adca1f4c91918ce1175e8b360 Mon Sep 17 00:00:00 2001
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Date: Wed, 15 Jun 2022 14:28:39 +0200
Subject: [PATCH 26/52] mdadm: block update=ppl for non raid456 levels
Subject: [PATCH 26/83] mdadm: block update=ppl for non raid456 levels
Option ppl should be used only for raid levels 4, 5 and 6. Cancel update
for other levels.
@ -173,5 +173,5 @@ index 3a0c69fd..71af860c 100644
__le64_to_cpu(sb->reshape_position);
reshape_chunk = __le32_to_cpu(sb->new_chunk);
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 42e02e613fb0b4a2c0c0d984b9e6e2933875bb44 Mon Sep 17 00:00:00 2001
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Date: Fri, 22 Jul 2022 08:43:47 +0200
Subject: [PATCH 27/52] mdadm: Fix array size mismatch after grow
Subject: [PATCH 27/83] mdadm: Fix array size mismatch after grow
imsm_fix_size_mismatch() is invoked to fix the problem, but it couldn't
proceed due to migration check. This patch allows for intended behavior.
@ -26,5 +26,5 @@ index 8ffe485c..76b947f5 100644
/* There is a difference, confirm that imsm_dev_size is
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 751757620afb25a4c02746bf8368a7b5f22352ec Mon Sep 17 00:00:00 2001
From: Lukasz Florczak <lukasz.florczak@linux.intel.com>
Date: Fri, 22 Jul 2022 08:43:48 +0200
Subject: [PATCH 28/52] mdadm: Remove dead code in imsm_fix_size_mismatch
Subject: [PATCH 28/83] mdadm: Remove dead code in imsm_fix_size_mismatch
imsm_create_metadata_update_for_size_change() that returns u_size value
could return 0 in the past. As its behavior changed, and returned value
@ -30,5 +30,5 @@ index 76b947f5..4ddfcf94 100644
if (st->update_tail) {
append_metadata_update(st, update, u_size);
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From c8d1c398505b62d9129a4e711f17e4469f4327ff Mon Sep 17 00:00:00 2001
From: Kinga Tanska <kinga.tanska@intel.com>
Date: Thu, 14 Jul 2022 09:02:10 +0200
Subject: [PATCH 29/52] Monitor: use devname as char array instead of pointer
Subject: [PATCH 29/83] Monitor: use devname as char array instead of pointer
Device name wasn't filled properly due to incorrect use of strcpy.
Strcpy was used twice. Firstly to fill devname with "/dev/md/"
@ -36,5 +36,5 @@ index 6ca1ebe5..a5b11ae2 100644
if (!is_mddev(mdlist->devname))
return 1;
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 84d969be8f6d8a345b75f558fad26e4f62a558f6 Mon Sep 17 00:00:00 2001
From: Kinga Tanska <kinga.tanska@intel.com>
Date: Thu, 14 Jul 2022 09:02:11 +0200
Subject: [PATCH 30/52] Monitor: use snprintf to fill device name
Subject: [PATCH 30/83] Monitor: use snprintf to fill device name
Safe string functions are propagated in Monitor.c.
@ -129,5 +129,5 @@ index a5b11ae2..93f36ac0 100644
*sl = 0;
} else
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 14ae4c37bce9a53da08d59d6c2d7e0946e9c9f47 Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 22 Jun 2022 14:25:06 -0600
Subject: [PATCH 31/52] Makefile: Don't build static build with everything and
Subject: [PATCH 31/83] Makefile: Don't build static build with everything and
everything-test
Running the test suite requires building everything, but it seems to be
@ -38,5 +38,5 @@ index bf126033..ec1f99ed 100644
# mdadm.uclibc doesn't work on x86-64
# mdadm.tcc doesn't work..
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 679bd9508a30b2a0a1baecc9a21dd6c7d8d8d7dc Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 22 Jun 2022 14:25:07 -0600
Subject: [PATCH 32/52] DDF: Cleanup validate_geometry_ddf_container()
Subject: [PATCH 32/83] DDF: Cleanup validate_geometry_ddf_container()
Move the function up so that the function declaration is not necessary
and remove the unused arguments to the function.
@ -137,5 +137,5 @@ index abbc8b09..9d867f69 100644
int level, int layout, int raiddisks,
int *chunk, unsigned long long size,
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 2b93288a5650bb811932836f67f30d63c5ddcfbd Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 22 Jun 2022 14:25:08 -0600
Subject: [PATCH 33/52] DDF: Fix NULL pointer dereference in
Subject: [PATCH 33/83] DDF: Fix NULL pointer dereference in
validate_geometry_ddf()
A relatively recent patch added a call to validate_geometry() in
@ -45,5 +45,5 @@ index 9d867f69..949e7d15 100644
mdu_array_info_t array = {
.level = level,
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 548e9b916f86c06e2cdb50d8f49633f9bec66c7e Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 22 Jun 2022 14:25:09 -0600
Subject: [PATCH 34/52] mdadm/Grow: Fix use after close bug by closing after
Subject: [PATCH 34/83] mdadm/Grow: Fix use after close bug by closing after
fork
The test 07reshape-grow fails most of the time. But it succeeds around
@ -81,5 +81,5 @@ index 8c520d42..97f22c75 100644
* reshape will wait for them. This would mean that
* the first section that we suspend will stay suspended
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 9ae62977b51dab0f4bb46b1c8ea5ebd1705b2f4d Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 22 Jun 2022 14:25:10 -0600
Subject: [PATCH 35/52] monitor: Avoid segfault when calling NULL
Subject: [PATCH 35/83] monitor: Avoid segfault when calling NULL
get_bad_blocks
Not all struct superswitch implement a get_bad_blocks() function,
@ -32,5 +32,5 @@ index b877e595..820a93d0 100644
* Get a list of bad blocks for an array, then read list of
* acknowledged bad blocks from kernel and compare it against metadata
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 6c9d9260633f2c8491985b0782cf0fbd7e51651b Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 22 Jun 2022 14:25:11 -0600
Subject: [PATCH 36/52] mdadm: Fix mdadm -r remove option regression
Subject: [PATCH 36/83] mdadm: Fix mdadm -r remove option regression
The commit noted below globally adds a parameter to the -r option but missed
the fact that -r is used for another purpose: --remove.
@ -74,5 +74,5 @@ index 974415b9..163f4a49 100644
extern char short_bitmap_auto_options[];
extern struct option long_options[];
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 41edf6f45895193f4a523cb0a08d639c9ff9ccc9 Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 22 Jun 2022 14:25:12 -0600
Subject: [PATCH 37/52] mdadm: Fix optional --write-behind parameter
Subject: [PATCH 37/83] mdadm: Fix optional --write-behind parameter
The commit noted below changed the behaviour of --write-behind to
require an argument. This broke the 06wrmostly test with the error:
@ -38,5 +38,5 @@ index d0c5e6de..56722ed9 100644
optarg);
exit(2);
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 7539254342bc591717b0051734cc6c09c1b88640 Mon Sep 17 00:00:00 2001
From: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>
Date: Wed, 22 Jun 2022 14:25:13 -0600
Subject: [PATCH 38/52] tests/00raid0: add a test that validates raid0 with
Subject: [PATCH 38/83] tests/00raid0: add a test that validates raid0 with
layout fails for 0.9
329dfc28debb disallows the creation of raid0 with layouts for 0.9
@ -34,5 +34,5 @@ index 8bc18985..e6b21cc4 100644
# now with no superblock
mdadm -B $md0 -l0 -n5 $dev0 $dev1 $dev2 $dev3 $dev4
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 14c2161edb77d7294199e8aa7daa9f9d1d0ad5d7 Mon Sep 17 00:00:00 2001
From: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>
Date: Wed, 22 Jun 2022 14:25:14 -0600
Subject: [PATCH 39/52] tests: fix raid0 tests for 0.90 metadata
Subject: [PATCH 39/83] tests: fix raid0 tests for 0.90 metadata
Some of the test cases fail because raid0 creation fails with the error,
"0.90 metadata does not support layouts for RAID0" added by commit,
@ -95,5 +95,5 @@ index 232fc1ff..08c14af7 100644
s=${ls#*/} l=${ls%/*}
mdadm -CR --assume-clean -e 0.90 $md0 --level $l -n 4 -c 64 $dlist
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From de045db607b1ac4b70fc2a8878463e029c2ab1dc Mon Sep 17 00:00:00 2001
From: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>
Date: Wed, 22 Jun 2022 14:25:15 -0600
Subject: [PATCH 40/52] tests/04update-metadata: avoid passing chunk size to
Subject: [PATCH 40/83] tests/04update-metadata: avoid passing chunk size to
raid1
'04update-metadata' test fails with error, "specifying chunk size is
@ -35,5 +35,5 @@ index 08c14af7..2b72a303 100644
mdadm -S $md0
mdadm -A $md0 --update=metadata $dlist
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From a2c832465fc75202e244327b2081231dfa974617 Mon Sep 17 00:00:00 2001
From: Sudhakar Panneerselvam <sudhakar.panneerselvam@oracle.com>
Date: Wed, 22 Jun 2022 14:25:16 -0600
Subject: [PATCH 41/52] tests/02lineargrow: clear the superblock at every
Subject: [PATCH 41/83] tests/02lineargrow: clear the superblock at every
iteration
This fixes 02lineargrow test as prior metadata causes --add operation
@ -27,5 +27,5 @@ index e05c219d..595bf9f2 100644
+ mdadm --zero /dev/loop3
done
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From a7bfcc716e235664dfb3b6c5a9590273e611ac72 Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 22 Jun 2022 14:25:17 -0600
Subject: [PATCH 42/52] mdadm/test: Add a mode to repeat specified tests
Subject: [PATCH 42/83] mdadm/test: Add a mode to repeat specified tests
Many tests fail infrequently or rarely. To help find these, add
an option to run the tests multiple times by specifying --loop=N.
@ -84,5 +84,5 @@ index 711a3c7a..da6db5e0 100755
}
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 28520bf114b3b0515a48ff44fff4ecbe9ed6dfad Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 22 Jun 2022 14:25:18 -0600
Subject: [PATCH 43/52] mdadm/test: Mark and ignore broken test failures
Subject: [PATCH 43/83] mdadm/test: Mark and ignore broken test failures
Add functionality to continue if a test marked as broken fails.
@ -116,5 +116,5 @@ index da6db5e0..61d9ee83 100755
fi
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From daa86d6634761796ada1f535c13e47fdd3cc95eb Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 22 Jun 2022 14:25:19 -0600
Subject: [PATCH 44/52] tests: Add broken files for all broken tests
Subject: [PATCH 44/83] tests: Add broken files for all broken tests
Each broken file contains the rough frequency of brokeness as well
as a brief explanation of what happens when it breaks. Estimates
@ -443,5 +443,5 @@ index 00000000..e91a1425
+
+ "should detect errors"
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 239b3cc0b5da87e966746533b1873c439db54b16 Mon Sep 17 00:00:00 2001
From: Mateusz Grzonka <mateusz.grzonka@intel.com>
Date: Fri, 12 Aug 2022 16:36:02 +0200
Subject: [PATCH 45/52] mdadm: Replace obsolete usleep with nanosleep
Subject: [PATCH 45/83] mdadm: Replace obsolete usleep with nanosleep
According to POSIX.1-2001, usleep is considered obsolete.
Replace it with a wrapper that uses nanosleep, as recommended in man.
@ -312,5 +312,5 @@ index 38f0420e..ca48d976 100644
+ } while (!wake_after_interrupt && errno == EINTR);
+}
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 39b381252c32275079344d30de18b76fda4bba26 Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 27 Jul 2022 15:52:45 -0600
Subject: [PATCH 46/52] tests/00readonly: Run udevadm settle before setting ro
Subject: [PATCH 46/83] tests/00readonly: Run udevadm settle before setting ro
In some recent kernel versions, 00readonly fails with:
@ -32,5 +32,5 @@ index 39202487..afe243b3 100644
check readonly
state=$(cat /sys/block/md0/md/array_state)
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From b7671c82010ffc04dfaecff2dd19ef8b2283e2b6 Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Date: Tue, 19 Jul 2022 14:48:21 +0200
Subject: [PATCH 47/52] tests: add test for names
Subject: [PATCH 47/83] tests: add test for names
Current behavior is not documented and tested. This test is a base for
future improvements. It is enough to test it only with native metadata,
@ -115,5 +115,5 @@ index 00000000..64b81b92
+_verify "/dev/md0" "empty" "name"
+mdadm -S "/dev/md0"
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From e4a030a0d3a953b8e74c118200e58dc83c2fc608 Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Date: Tue, 19 Jul 2022 14:48:22 +0200
Subject: [PATCH 48/52] mdadm: remove symlink option
Subject: [PATCH 48/83] mdadm: remove symlink option
The option is not used. Remove it from code.
@ -172,5 +172,5 @@ index add9c0b6..93e72786 100644
Waitclean,
DetailPlatform,
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From ae5dfc56b7a96805d5a0b50eaf93b9fec8604298 Mon Sep 17 00:00:00 2001
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Date: Tue, 19 Jul 2022 14:48:23 +0200
Subject: [PATCH 49/52] mdadm: move data_offset to struct shape
Subject: [PATCH 49/83] mdadm: move data_offset to struct shape
Data offset is a shape property so move it there to remove additional
parameter from some functions.
@ -228,5 +228,5 @@ index 93e72786..adb7cdaa 100644
extern int Detail(char *dev, struct context *c);
extern int Detail_Platform(struct superswitch *ss, int scan, int verbose, int export, char *controller_path);
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 27ad4900501c615b7c6b266bf23948e5606dba53 Mon Sep 17 00:00:00 2001
From: Logan Gunthorpe <logang@deltatee.com>
Date: Wed, 27 Jul 2022 15:52:46 -0600
Subject: [PATCH 50/52] mdadm: Don't open md device for CREATE and ASSEMBLE
Subject: [PATCH 50/83] mdadm: Don't open md device for CREATE and ASSEMBLE
The mdadm command tries to open the md device for most modes, first
thing, no matter what. When running to create or assemble an array,
@ -158,5 +158,5 @@ index adb7cdaa..8208b81e 100644
extern void udev_block(char *devnm);
extern void udev_unblock(void);
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 7211116c295ba1f9e1fcbdc2dd2d3762855062e1 Mon Sep 17 00:00:00 2001
From: Mateusz Kusiak <mateusz.kusiak@intel.com>
Date: Thu, 28 Jul 2022 20:20:53 +0800
Subject: [PATCH 51/52] Grow: Split Grow_reshape into helper function
Subject: [PATCH 51/83] Grow: Split Grow_reshape into helper function
Grow_reshape should be split into helper functions given its size.
- Add helper function for preparing reshape on external metadata.
@ -227,5 +227,5 @@ index ca48d976..26ffdcea 100644
{
/* like 'open', but if 'dev' matches %d:%d, create a temp
--
2.31.1
2.38.1

View File

@ -1,7 +1,7 @@
From 5c3c3df646dd3b7e8df81152f08e9ac4ddccc671 Mon Sep 17 00:00:00 2001
From: Kinga Tanska <kinga.tanska@intel.com>
Date: Fri, 19 Aug 2022 02:55:46 +0200
Subject: [PATCH 52/52] Assemble: check if device is container before
Subject: [PATCH 52/83] Assemble: check if device is container before
scheduling force-clean update
Up to now using assemble with force flag making each array as clean.
@ -32,5 +32,5 @@ index be2160b4..1dd82a8c 100644
devices[chosen_drive].devname, c->verbose,
0, NULL);
--
2.31.1
2.38.1

View File

@ -0,0 +1,112 @@
From 171e9743881edf2dfb163ddff483566fbf913ccd Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.de>
Date: Fri, 26 Aug 2022 08:55:56 +1000
Subject: [PATCH 53/83] super1: report truncated device
When the metadata is at the start of the device, it is possible that it
describes a device large than the one it is actually stored on. When
this happens, report it loudly in --examine.
....
Unused Space : before=1968 sectors, after=-2047 sectors DEVICE TOO SMALL
State : clean TRUNCATED DEVICE
....
Also report in --assemble so that the failure which the kernel will
report will be explained.
mdadm: Device /dev/sdb is not large enough for data described in superblock
mdadm: no RAID superblock on /dev/sdb
mdadm: /dev/sdb has no superblock - assembly aborted
Scenario can be demonstrated as follows:
mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=0.90
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md/test started.
mdadm: stopped /dev/md/test
Unused Space : before=1968 sectors, after=-2047 sectors DEVICE TOO SMALL
State : clean TRUNCATED DEVICE
Unused Space : before=1968 sectors, after=-2047 sectors DEVICE TOO SMALL
State : clean TRUNCATED DEVICE
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
super1.c | 35 ++++++++++++++++++++++++++++-------
1 file changed, 28 insertions(+), 7 deletions(-)
diff --git a/super1.c b/super1.c
index 71af860c..58345e68 100644
--- a/super1.c
+++ b/super1.c
@@ -406,12 +406,18 @@ static void examine_super1(struct supertype *st, char *homehost)
st->ss->getinfo_super(st, &info, NULL);
if (info.space_after != 1 &&
- !(__le32_to_cpu(sb->feature_map) & MD_FEATURE_NEW_OFFSET))
- printf(" Unused Space : before=%llu sectors, after=%llu sectors\n",
- info.space_before, info.space_after);
-
- printf(" State : %s\n",
- (__le64_to_cpu(sb->resync_offset)+1)? "active":"clean");
+ !(__le32_to_cpu(sb->feature_map) & MD_FEATURE_NEW_OFFSET)) {
+ printf(" Unused Space : before=%llu sectors, ",
+ info.space_before);
+ if (info.space_after < INT64_MAX)
+ printf("after=%llu sectors\n", info.space_after);
+ else
+ printf("after=-%llu sectors DEVICE TOO SMALL\n",
+ UINT64_MAX - info.space_after);
+ }
+ printf(" State : %s%s\n",
+ (__le64_to_cpu(sb->resync_offset)+1) ? "active":"clean",
+ (info.space_after > INT64_MAX) ? " TRUNCATED DEVICE" : "");
printf(" Device UUID : ");
for (i=0; i<16; i++) {
if ((i&3)==0 && i != 0)
@@ -2206,6 +2212,7 @@ static int load_super1(struct supertype *st, int fd, char *devname)
tst.ss = &super1;
for (tst.minor_version = 0; tst.minor_version <= 2;
tst.minor_version++) {
+ tst.ignore_hw_compat = st->ignore_hw_compat;
switch(load_super1(&tst, fd, devname)) {
case 0: super = tst.sb;
if (bestvers == -1 ||
@@ -2312,7 +2319,6 @@ static int load_super1(struct supertype *st, int fd, char *devname)
free(super);
return 2;
}
- st->sb = super;
bsb = (struct bitmap_super_s *)(((char*)super)+MAX_SB_SIZE);
@@ -2322,6 +2328,21 @@ static int load_super1(struct supertype *st, int fd, char *devname)
if (st->data_offset == INVALID_SECTORS)
st->data_offset = __le64_to_cpu(super->data_offset);
+ if (st->minor_version >= 1 &&
+ st->ignore_hw_compat == 0 &&
+ (dsize < (__le64_to_cpu(super->data_offset) +
+ __le64_to_cpu(super->size))
+ ||
+ dsize < (__le64_to_cpu(super->data_offset) +
+ __le64_to_cpu(super->data_size)))) {
+ if (devname)
+ pr_err("Device %s is not large enough for data described in superblock\n",
+ devname);
+ free(super);
+ return 2;
+ }
+ st->sb = super;
+
/* Now check on the bitmap superblock */
if ((__le32_to_cpu(super->feature_map)&MD_FEATURE_BITMAP_OFFSET) == 0)
return 0;
--
2.38.1

View File

@ -0,0 +1,616 @@
From 1a386f804d8392b849b3362da6b0157b0db83091 Mon Sep 17 00:00:00 2001
From: Mateusz Grzonka <mateusz.grzonka@intel.com>
Date: Fri, 12 Aug 2022 16:52:12 +0200
Subject: [PATCH 54/83] mdadm: Correct typos, punctuation and grammar in man
Signed-off-by: Mateusz Grzonka <mateusz.grzonka@intel.com>
Reviewed-by: Wol <anthony@youngman.org.uk>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
---
mdadm.8.in | 178 ++++++++++++++++++++++++++---------------------------
1 file changed, 88 insertions(+), 90 deletions(-)
diff --git a/mdadm.8.in b/mdadm.8.in
index f2736226..70c79d1e 100644
--- a/mdadm.8.in
+++ b/mdadm.8.in
@@ -158,7 +158,7 @@ adding new spares and removing faulty devices.
.B Misc
This is an 'everything else' mode that supports operations on active
arrays, operations on component devices such as erasing old superblocks, and
-information gathering operations.
+information-gathering operations.
.\"This mode allows operations on independent devices such as examine MD
.\"superblocks, erasing old superblocks and stopping active arrays.
@@ -231,12 +231,12 @@ mode to be assumed.
.TP
.BR \-h ", " \-\-help
-Display general help message or, after one of the above options, a
+Display a general help message or, after one of the above options, a
mode-specific help message.
.TP
.B \-\-help\-options
-Display more detailed help about command line parsing and some commonly
+Display more detailed help about command-line parsing and some commonly
used options.
.TP
@@ -266,7 +266,7 @@ the exact meaning of this option in different contexts.
.TP
.BR \-c ", " \-\-config=
-Specify the config file or directory. If not specified, default config file
+Specify the config file or directory. If not specified, the default config file
and default conf.d directory will be used. See
.BR mdadm.conf (5)
for more details.
@@ -379,7 +379,7 @@ When creating an array, the
.B homehost
will be recorded in the metadata. For version-1 superblocks, it will
be prefixed to the array name. For version-0.90 superblocks, part of
-the SHA1 hash of the hostname will be stored in the later half of the
+the SHA1 hash of the hostname will be stored in the latter half of the
UUID.
When reporting information about an array, any array which is tagged
@@ -388,7 +388,7 @@ for the given homehost will be reported as such.
When using Auto-Assemble, only arrays tagged for the given homehost
will be allowed to use 'local' names (i.e. not ending in '_' followed
by a digit string). See below under
-.BR "Auto Assembly" .
+.BR "Auto-Assembly" .
The special name "\fBany\fP" can be used as a wild card. If an array
is created with
@@ -403,7 +403,7 @@ When
.I mdadm
needs to print the name for a device it normally finds the name in
.B /dev
-which refers to the device and is shortest. When a path component is
+which refers to the device and is the shortest. When a path component is
given with
.B \-\-prefer
.I mdadm
@@ -478,9 +478,9 @@ still be larger than any replacement.
This option can be used with
.B \-\-create
-for determining initial size of an array. For external metadata,
+for determining the initial size of an array. For external metadata,
it can be used on a volume, but not on a container itself.
-Setting initial size of
+Setting the initial size of
.B RAID 0
array is only valid for external metadata.
@@ -545,20 +545,20 @@ Clustered arrays do not support this parameter yet.
.TP
.BR \-c ", " \-\-chunk=
-Specify chunk size of kilobytes. The default when creating an
+Specify chunk size in kilobytes. The default when creating an
array is 512KB. To ensure compatibility with earlier versions, the
default when building an array with no persistent metadata is 64KB.
This is only meaningful for RAID0, RAID4, RAID5, RAID6, and RAID10.
RAID4, RAID5, RAID6, and RAID10 require the chunk size to be a power
-of 2. In any case it must be a multiple of 4KB.
+of 2, with minimal chunk size being 4KB.
A suffix of 'K', 'M', 'G' or 'T' can be given to indicate Kilobytes,
Megabytes, Gigabytes or Terabytes respectively.
.TP
.BR \-\-rounding=
-Specify rounding factor for a Linear array. The size of each
+Specify the rounding factor for a Linear array. The size of each
component will be rounded down to a multiple of this size.
This is a synonym for
.B \-\-chunk
@@ -655,7 +655,8 @@ option to set subsequent failure modes.
and "flush" will clear any persistent faults.
The layout options for RAID10 are one of 'n', 'o' or 'f' followed
-by a small number. The default is 'n2'. The supported options are:
+by a small number signifying the number of copies of each datablock.
+The default is 'n2'. The supported options are:
.I 'n'
signals 'near' copies. Multiple copies of one data block are at
@@ -673,7 +674,7 @@ signals 'far' copies
(multiple copies have very different offsets).
See md(4) for more detail about 'near', 'offset', and 'far'.
-The number is the number of copies of each datablock. 2 is normal, 3
+As for the number of copies of each data block, 2 is normal, 3
can be useful. This number can be at most equal to the number of
devices in the array. It does not need to divide evenly into that
number (e.g. it is perfectly legal to have an 'n2' layout for an array
@@ -684,7 +685,7 @@ A bug introduced in Linux 3.14 means that RAID0 arrays
started using a different layout. This could lead to
data corruption. Since Linux 5.4 (and various stable releases that received
backports), the kernel will not accept such an array unless
-a layout is explictly set. It can be set to
+a layout is explicitly set. It can be set to
.RB ' original '
or
.RB ' alternate '.
@@ -760,13 +761,13 @@ or by selecting a different consistency policy with
.TP
.BR \-\-bitmap\-chunk=
-Set the chunksize of the bitmap. Each bit corresponds to that many
+Set the chunk size of the bitmap. Each bit corresponds to that many
Kilobytes of storage.
-When using a file based bitmap, the default is to use the smallest
-size that is at-least 4 and requires no more than 2^21 chunks.
+When using a file-based bitmap, the default is to use the smallest
+size that is at least 4 and requires no more than 2^21 chunks.
When using an
.B internal
-bitmap, the chunksize defaults to 64Meg, or larger if necessary to
+bitmap, the chunk size defaults to 64Meg, or larger if necessary to
fit the bitmap into the available space.
A suffix of 'K', 'M', 'G' or 'T' can be given to indicate Kilobytes,
@@ -840,7 +841,7 @@ can be used with that command to avoid the automatic resync.
.BR \-\-backup\-file=
This is needed when
.B \-\-grow
-is used to increase the number of raid-devices in a RAID5 or RAID6 if
+is used to increase the number of raid devices in a RAID5 or RAID6 if
there are no spare devices available, or to shrink, change RAID level
or layout. See the GROW MODE section below on RAID\-DEVICES CHANGES.
The file must be stored on a separate device, not on the RAID array
@@ -879,7 +880,7 @@ When creating an array,
.B \-\-data\-offset
can be specified as
.BR variable .
-In the case each member device is expected to have a offset appended
+In the case each member device is expected to have an offset appended
to the name, separated by a colon. This makes it possible to recreate
exactly an array which has varying data offsets (as can happen when
different versions of
@@ -943,7 +944,7 @@ Insist that
.I mdadm
accept the geometry and layout specified without question. Normally
.I mdadm
-will not allow creation of an array with only one device, and will try
+will not allow the creation of an array with only one device, and will try
to create a RAID5 array with one missing drive (as this makes the
initial resync work faster). With
.BR \-\-force ,
@@ -1004,7 +1005,7 @@ number added, e.g.
If the md device name is in a 'standard' format as described in DEVICE
NAMES, then it will be created, if necessary, with the appropriate
device number based on that name. If the device name is not in one of these
-formats, then a unused device number will be allocated. The device
+formats, then an unused device number will be allocated. The device
number will be considered unused if there is no active array for that
number, and there is no entry in /dev for that number and with a
non-standard name. Names that are not in 'standard' format are only
@@ -1032,25 +1033,25 @@ then
.B \-\-add
can be used to add some extra devices to be included in the array.
In most cases this is not needed as the extra devices can be added as
-spares first, and then the number of raid-disks can be changed.
-However for RAID0, it is not possible to add spares. So to increase
+spares first, and then the number of raid disks can be changed.
+However, for RAID0 it is not possible to add spares. So to increase
the number of devices in a RAID0, it is necessary to set the new
number of devices, and to add the new devices, in the same command.
.TP
.BR \-\-nodes
-Only works when the array is for clustered environment. It specifies
+Only works when the array is created for a clustered environment. It specifies
the maximum number of nodes in the cluster that will use this device
simultaneously. If not specified, this defaults to 4.
.TP
.BR \-\-write-journal
Specify journal device for the RAID-4/5/6 array. The journal device
-should be a SSD with reasonable lifetime.
+should be an SSD with a reasonable lifetime.
.TP
.BR \-k ", " \-\-consistency\-policy=
-Specify how the array maintains consistency in case of unexpected shutdown.
+Specify how the array maintains consistency in the case of an unexpected shutdown.
Only relevant for RAID levels with redundancy.
Currently supported options are:
.RS
@@ -1058,7 +1059,7 @@ Currently supported options are:
.TP
.B resync
Full resync is performed and all redundancy is regenerated when the array is
-started after unclean shutdown.
+started after an unclean shutdown.
.TP
.B bitmap
@@ -1067,8 +1068,8 @@ Resync assisted by a write-intent bitmap. Implicitly selected when using
.TP
.B journal
-For RAID levels 4/5/6, journal device is used to log transactions and replay
-after unclean shutdown. Implicitly selected when using
+For RAID levels 4/5/6, the journal device is used to log transactions and replay
+after an unclean shutdown. Implicitly selected when using
.BR \-\-write\-journal .
.TP
@@ -1237,7 +1238,7 @@ This can be useful if
reports a different "Preferred Minor" to
.BR \-\-detail .
In some cases this update will be performed automatically
-by the kernel driver. In particular the update happens automatically
+by the kernel driver. In particular, the update happens automatically
at the first write to an array with redundancy (RAID level 1 or
greater) on a 2.6 (or later) kernel.
@@ -1277,7 +1278,7 @@ For version-1 superblocks, this involves updating the name.
The
.B home\-cluster
option will change the cluster name as recorded in the superblock and
-bitmap. This option only works for clustered environment.
+bitmap. This option only works for a clustered environment.
The
.B resync
@@ -1390,10 +1391,10 @@ This option should be used with great caution.
.TP
.BR \-\-freeze\-reshape
-Option is intended to be used in start-up scripts during initrd boot phase.
-When array under reshape is assembled during initrd phase, this option
-stops reshape after reshape critical section is being restored. This happens
-before file system pivot operation and avoids loss of file system context.
+This option is intended to be used in start-up scripts during the initrd boot phase.
+When the array under reshape is assembled during the initrd phase, this option
+stops the reshape after the reshape-critical section has been restored. This happens
+before the file system pivot operation and avoids loss of filesystem context.
Losing file system context would cause reshape to be broken.
Reshape can be continued later using the
@@ -1437,9 +1438,9 @@ re\-add a device that was previously removed from an array.
If the metadata on the device reports that it is a member of the
array, and the slot that it used is still vacant, then the device will
be added back to the array in the same position. This will normally
-cause the data for that device to be recovered. However based on the
+cause the data for that device to be recovered. However, based on the
event count on the device, the recovery may only require sections that
-are flagged a write-intent bitmap to be recovered or may not require
+are flagged by a write-intent bitmap to be recovered or may not require
any recovery at all.
When used on an array that has no metadata (i.e. it was built with
@@ -1447,13 +1448,12 @@ When used on an array that has no metadata (i.e. it was built with
it will be assumed that bitmap-based recovery is enough to make the
device fully consistent with the array.
-When used with v1.x metadata,
.B \-\-re\-add
-can be accompanied by
+can also be accompanied by
.BR \-\-update=devicesize ,
.BR \-\-update=bbl ", or"
.BR \-\-update=no\-bbl .
-See the description of these option when used in Assemble mode for an
+See descriptions of these options when used in Assemble mode for an
explanation of their use.
If the device name given is
@@ -1480,7 +1480,7 @@ Add a device as a spare. This is similar to
except that it does not attempt