diff options
author | Mateusz Kusiak <mateusz.kusiak@intel.com> | 2024-01-18 11:30:18 +0100 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-02-20 14:05:19 +0100 |
commit | ea2ca7ed3dbbf881ce08d80fe371f2aaf05011c3 (patch) | |
tree | b8b743210911875f4fde6e57641f3196b6f869ce | |
parent | fdb7e802f4cf64d067c3abaafa35056e2bc1ed43 (diff) | |
download | mdadm-ea2ca7ed3dbbf881ce08d80fe371f2aaf05011c3.tar.gz |
Grow: Move update_tail assign to Grow_reshape()
Due to e919fb0af245 ("FIX: Enable metadata updates for raid0") code
can't enter super-intel.c:3415, resulting in checkpoint not being
saved to metadata for second volume in matrix raid array.
This results in checkpoint being stuck at last value for the
first volume.
Move st->update_tail to Grow_reshape() so it is assigned for each
volume.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
-rw-r--r-- | Grow.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -2085,9 +2085,10 @@ int Grow_reshape(char *devname, int fd, if (!mdmon_running(st->container_devnm)) start_mdmon(st->container_devnm); ping_monitor(container); - if (mdmon_running(st->container_devnm) && - st->update_tail == NULL) - st->update_tail = &st->updates; + if (mdmon_running(st->container_devnm) == false) { + pr_err("No mdmon found. Grow cannot continue.\n"); + goto release; + } } if (s->size == MAX_SIZE) @@ -3048,6 +3049,8 @@ static int reshape_array(char *container, int fd, char *devname, dprintf("Cannot get array information.\n"); goto release; } + if (st->update_tail == NULL) + st->update_tail = &st->updates; if (array.level == 0 && info->component_size == 0) { get_dev_size(fd, NULL, &array_size); info->component_size = array_size / array.raid_disks; @@ -5152,9 +5155,7 @@ int Grow_continue_command(char *devname, int fd, start_mdmon(container); ping_monitor(container); - if (mdmon_running(container)) - st->update_tail = &st->updates; - else { + if (mdmon_running(container) == false) { pr_err("No mdmon found. Grow cannot continue.\n"); ret_val = 1; goto Grow_continue_command_exit; |