diff options
author | Pawel Piatkowski <pawel.piatkowski@intel.com> | 2023-10-19 16:35:24 +0200 |
---|---|---|
committer | Jes Sorensen <jes@trained-monkey.org> | 2023-10-26 23:51:55 +0200 |
commit | 4dde420fc3e24077ab926f79674eaae1b71de10b (patch) | |
tree | f4430507a06a8f4c7e73078ebc831c6d6092150b /super-intel.c | |
parent | mdadm/super1: Add MD_FEATURE_RAID0_LAYOUT if kernel>=5.4 (diff) | |
download | mdadm-4dde420fc3e24077ab926f79674eaae1b71de10b.tar.xz mdadm-4dde420fc3e24077ab926f79674eaae1b71de10b.zip |
mdadm: remove container_enough logic
Arrays without enough disk count will be assembled but not
started.
Now RAIDs will be assembled always (even if they are failed).
RAID devices in all states will be assembled and exposed
to mdstat.
This change affects only IMSM (for ddf it wasn't used,
container_enough was set to true always).
Removed this logic from incremental_container as well with
runstop checking because runstop condition is being verified
in assemble_container_content function.
Signed-off-by: Pawel Piatkowski <pawel.piatkowski@intel.com>
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
Diffstat (limited to 'super-intel.c')
-rw-r--r-- | super-intel.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/super-intel.c b/super-intel.c index 05d3b056..6bdd5c4c 100644 --- a/super-intel.c +++ b/super-intel.c @@ -3806,7 +3806,6 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info, char * struct intel_super *super = st->sb; struct imsm_disk *disk; int map_disks = info->array.raid_disks; - int max_enough = -1; int i; struct imsm_super *mpb; @@ -3848,12 +3847,9 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info, char * for (i = 0; i < mpb->num_raid_devs; i++) { struct imsm_dev *dev = get_imsm_dev(super, i); - int failed, enough, j, missing = 0; + int j = 0; struct imsm_map *map; - __u8 state; - failed = imsm_count_failed(super, dev, MAP_0); - state = imsm_check_degraded(super, dev, failed, MAP_0); map = get_imsm_map(dev, MAP_0); /* any newly missing disks? @@ -3868,36 +3864,10 @@ static void getinfo_super_imsm(struct supertype *st, struct mdinfo *info, char * if (!(ord & IMSM_ORD_REBUILD) && get_imsm_missing(super, idx)) { - missing = 1; break; } } - - if (state == IMSM_T_STATE_FAILED) - enough = -1; - else if (state == IMSM_T_STATE_DEGRADED && - (state != map->map_state || missing)) - enough = 0; - else /* we're normal, or already degraded */ - enough = 1; - if (is_gen_migration(dev) && missing) { - /* during general migration we need all disks - * that process is running on. - * No new missing disk is allowed. - */ - max_enough = -1; - enough = -1; - /* no more checks necessary - */ - break; - } - /* in the missing/failed disk case check to see - * if at least one array is runnable - */ - max_enough = max(max_enough, enough); } - dprintf("enough: %d\n", max_enough); - info->container_enough = max_enough; if (super->disks) { __u32 reserved = imsm_reserved_sectors(super, super->disks); |