diff options
author | Jakub Radtke <jakub.radtke@intel.com> | 2021-01-15 06:46:54 +0100 |
---|---|---|
committer | Jes Sorensen <jsorensen@fb.com> | 2021-03-09 23:17:39 +0100 |
commit | b090e910756ea1165be5ac879746ab4bb83a2f91 (patch) | |
tree | b50fb1db0288b4762d05977b6bf44150867596d8 /mdstat.c | |
parent | It should be FAILED when raid has not enough active disks (diff) | |
download | mdadm-b090e910756ea1165be5ac879746ab4bb83a2f91.tar.xz mdadm-b090e910756ea1165be5ac879746ab4bb83a2f91.zip |
Modify mdstat parsing for volumes with the bitmap
Current mdstat read functionality is not working correctly
for the volumes with the write-intent bitmap.
It affects rebuild and reshape use cases.
Signed-off-by: Jakub Radtke <jakub.radtke@intel.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'mdstat.c')
-rw-r--r-- | mdstat.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -191,6 +191,12 @@ struct mdstat_ent *mdstat_read(int hold, int start) else if (strcmp(w, "inactive") == 0) { ent->active = 0; in_devs = 1; + } else if (strcmp(w, "bitmap:") == 0) { + /* We need to stop parsing here; + * otherwise, ent->raid_disks will be + * overwritten by the wrong value. + */ + break; } else if (ent->active > 0 && ent->level == NULL && w[0] != '(' /*readonly*/) { |