* [PATCH] imsm: do not activate spares for uninitialized member arrays
@ 2016-09-15 7:53 Artur Paszkiewicz
2016-09-15 16:16 ` Jes Sorensen
0 siblings, 1 reply; 2+ messages in thread
From: Artur Paszkiewicz @ 2016-09-15 7:53 UTC (permalink / raw)
To: jes.sorensen; +Cc: linux-raid, Artur Paszkiewicz
This fixes some issues when a member array is created with "missing"
devices in a container that has more devices than used in the member
array.
Reported-by: Yi Zhang <yizhan@redhat.com>
Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
---
super-intel.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/super-intel.c b/super-intel.c
index 92817e9..032ef00 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7789,6 +7789,11 @@ static struct mdinfo *imsm_activate_spare(struct active_array *a,
IMSM_T_STATE_DEGRADED)
return NULL;
+ if (get_imsm_map(dev, MAP_0)->map_state == IMSM_T_STATE_UNINITIALIZED) {
+ dprintf("imsm: No spare activation allowed. Volume is not initialized.\n");
+ return NULL;
+ }
+
/*
* If there are any failed disks check state of the other volume.
* Block rebuild if the another one is failed until failed disks
--
2.10.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] imsm: do not activate spares for uninitialized member arrays
2016-09-15 7:53 [PATCH] imsm: do not activate spares for uninitialized member arrays Artur Paszkiewicz
@ 2016-09-15 16:16 ` Jes Sorensen
0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2016-09-15 16:16 UTC (permalink / raw)
To: Artur Paszkiewicz; +Cc: linux-raid
Artur Paszkiewicz <artur.paszkiewicz@intel.com> writes:
> This fixes some issues when a member array is created with "missing"
> devices in a container that has more devices than used in the member
> array.
>
> Reported-by: Yi Zhang <yizhan@redhat.com>
> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
> ---
> super-intel.c | 5 +++++
> 1 file changed, 5 insertions(+)
Applied!
Thanks,
Jes
> diff --git a/super-intel.c b/super-intel.c
> index 92817e9..032ef00 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -7789,6 +7789,11 @@ static struct mdinfo *imsm_activate_spare(struct active_array *a,
> IMSM_T_STATE_DEGRADED)
> return NULL;
>
> + if (get_imsm_map(dev, MAP_0)->map_state == IMSM_T_STATE_UNINITIALIZED) {
> + dprintf("imsm: No spare activation allowed. Volume is not initialized.\n");
> + return NULL;
> + }
> +
> /*
> * If there are any failed disks check state of the other volume.
> * Block rebuild if the another one is failed until failed disks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-15 16:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-15 7:53 [PATCH] imsm: do not activate spares for uninitialized member arrays Artur Paszkiewicz
2016-09-15 16:16 ` 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.