diff options
author | Xiao Ni <xni@redhat.com> | 2024-09-11 10:54:25 +0200 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-09-23 10:48:32 +0200 |
commit | cd94b9adf7d53457d86cdc39b983b18713f24032 (patch) | |
tree | 51efa3c535cb8c3632ab1640ae5114b9810b2c18 | |
parent | mdadm/Grow: Update reshape_progress to need_back after reshape finishes (diff) | |
download | mdadm-cd94b9adf7d53457d86cdc39b983b18713f24032.tar.xz mdadm-cd94b9adf7d53457d86cdc39b983b18713f24032.zip |
mdadm/Grow: Can't open raid when running --grow --continue
It passes 'array' as devname in Grow_continue. So it fails to
open raid device. Use mdinfo to open raid device.
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
-rw-r--r-- | Grow.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -3694,9 +3694,12 @@ started: set_array_size(st, info, info->text_version); if (info->new_level != reshape.level) { - if (fd < 0) - fd = open(devname, O_RDONLY); - impose_level(fd, info->new_level, devname, verbose); + fd = open_dev(sra->sys_name); + if (fd < 0) { + pr_err("Can't open %s\n", sra->sys_name); + goto out; + } + impose_level(fd, info->new_level, sra->sys_name, verbose); close(fd); if (info->new_level == 0) st->update_tail = NULL; |