* [PATCH] Grow: block -n on external volumes.
@ 2022-05-19 7:16 Mateusz Kusiak
2022-05-23 16:11 ` Coly Li
2022-06-09 22:13 ` Jes Sorensen
0 siblings, 2 replies; 3+ messages in thread
From: Mateusz Kusiak @ 2022-05-19 7:16 UTC (permalink / raw)
To: linux-raid; +Cc: jes, colyli
Performing --raid-devices on external metadata volume should be blocked
as it causes unwanted behaviour.
Eg. Performing
mdadm -G /dev/md/volume -l10 -n4
on r0_d2 inside 4 disk container, returns
mdadm: Need 2 spares to avoid degraded array, only have 0.
Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
---
Grow.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Grow.c b/Grow.c
index 8a242b0f..f6efbc48 100644
--- a/Grow.c
+++ b/Grow.c
@@ -1892,6 +1892,14 @@ int Grow_reshape(char *devname, int fd,
if (retval) {
pr_err("Cannot read superblock for %s\n", devname);
+ close(cfd);
+ free(subarray);
+ return 1;
+ }
+
+ if (s->raiddisks && subarray) {
+ pr_err("--raid-devices operation can be performed on a container only\n");
+ close(cfd);
free(subarray);
return 1;
}
--
2.26.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Grow: block -n on external volumes.
2022-05-19 7:16 [PATCH] Grow: block -n on external volumes Mateusz Kusiak
@ 2022-05-23 16:11 ` Coly Li
2022-06-09 22:13 ` Jes Sorensen
1 sibling, 0 replies; 3+ messages in thread
From: Coly Li @ 2022-05-23 16:11 UTC (permalink / raw)
To: Mateusz Kusiak; +Cc: jes, linux-raid
On 5/19/22 3:16 PM, Mateusz Kusiak wrote:
> Performing --raid-devices on external metadata volume should be blocked
> as it causes unwanted behaviour.
>
> Eg. Performing
> mdadm -G /dev/md/volume -l10 -n4
> on r0_d2 inside 4 disk container, returns
> mdadm: Need 2 spares to avoid degraded array, only have 0.
>
> Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
> ---
> Grow.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Grow.c b/Grow.c
> index 8a242b0f..f6efbc48 100644
> --- a/Grow.c
> +++ b/Grow.c
> @@ -1892,6 +1892,14 @@ int Grow_reshape(char *devname, int fd,
>
> if (retval) {
> pr_err("Cannot read superblock for %s\n", devname);
> + close(cfd);
> + free(subarray);
> + return 1;
> + }
> +
> + if (s->raiddisks && subarray) {
> + pr_err("--raid-devices operation can be performed on a container only\n");
> + close(cfd);
> free(subarray);
> return 1;
> }
Hi Mateusz,
It seems the above patch has some both-modified part with a previous
posted patch "Grow: Split Grow_reshape into helper function."
I will skip this patch and test/review rested patches. Once them are all
done, could you please post a rebased version again then?
Thanks.
Coly Li
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Grow: block -n on external volumes.
2022-05-19 7:16 [PATCH] Grow: block -n on external volumes Mateusz Kusiak
2022-05-23 16:11 ` Coly Li
@ 2022-06-09 22:13 ` Jes Sorensen
1 sibling, 0 replies; 3+ messages in thread
From: Jes Sorensen @ 2022-06-09 22:13 UTC (permalink / raw)
To: Mateusz Kusiak, linux-raid; +Cc: colyli
On 5/19/22 03:16, Mateusz Kusiak wrote:
> Performing --raid-devices on external metadata volume should be blocked
> as it causes unwanted behaviour.
>
> Eg. Performing
> mdadm -G /dev/md/volume -l10 -n4
> on r0_d2 inside 4 disk container, returns
> mdadm: Need 2 spares to avoid degraded array, only have 0.
>
> Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com>
> ---
> Grow.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
Applied!
Thanks,
Jes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-09 22:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-19 7:16 [PATCH] Grow: block -n on external volumes Mateusz Kusiak
2022-05-23 16:11 ` Coly Li
2022-06-09 22:13 ` Jes Sorensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.