]> git.ipfire.org Git - thirdparty/mdadm.git/commit
mdstat: Rework mdstat external arrays handling
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Fri, 5 Jul 2024 08:49:27 +0000 (10:49 +0200)
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Tue, 30 Jul 2024 14:00:37 +0000 (16:00 +0200)
commit4b3644ab4ce6df8c7f64c189c12b66627ff3e027
treefe1a8996f70da8f1f8f3680c3fc5b7c4c6978402
parent6403f9c77e1f9e0c329b7d58c0a1846ac7080636
mdstat: Rework mdstat external arrays handling

To avoid repeating mdstat_read() in IncrementalRemove(), new function
mdstat_find_by_member_name() has been proposed. With that,
IncrementalRemove() handles own copy of mdstat content and there is no
need to repeat reading for external stop.

Additionally, It proposed few helper to avoid repeating
mdstat_ent->metadata_version checks across code.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
12 files changed:
Assemble.c
Incremental.c
Manage.c
Monitor.c
config.c
mapfile.c
mdadm.h
mdmon.c
mdmon.h
mdstat.c
super-intel.c
util.c