summaryrefslogtreecommitdiffstats
path: root/super-intel.c
diff options
context:
space:
mode:
Diffstat (limited to 'super-intel.c')
-rw-r--r--super-intel.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/super-intel.c b/super-intel.c
index f55d707..dd69cb1 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -1976,9 +1976,14 @@ static int load_super_imsm_all(struct supertype *st, int fd, void **sbp,
int rv;
int devnum = fd2devnum(fd);
int retry;
+ enum sysfs_read_flags flags;
- /* check if this disk is a member of an active array */
- sra = sysfs_read(fd, 0, GET_LEVEL|GET_VERSION|GET_DEVS|GET_STATE);
+ flags = GET_LEVEL|GET_VERSION|GET_DEVS|GET_STATE;
+ if (mdmon_running(devnum))
+ flags |= SKIP_GONE_DEVS;
+
+ /* check if 'fd' an opened container */
+ sra = sysfs_read(fd, 0, flags);
if (!sra)
return 1;