Skip to content

Custom drives policies verification

Mariusz Tkaczyk linux-raid 1 version Applied

Status from this message: Applied!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/13mdadm: Add functions for spare criteria verificationIncremental.c Monitor.c mdadm.h +2 more+67 -710 replies
2/13mdadm: drop get_required_spare_criteria()Incremental.c Monitor.c mdadm.h +1 more+140 -970 replies
3/13Manage: fix check after dereference issueManage.c+12 -140 replies
4/13Manage: implement manage_add_external()Manage.c+86 -610 replies
5/13mdadm: introduce sysfs_get_container_devnm()Create.c Manage.c mdadm.h +1 more+39 -210 replies
6/13mdadm.h: Introduce custom device policiesmdadm.h+36 -180 replies
7/13mdadm: test_and_add device policies implementationmdadm.h policy.c+100 -00 replies
8/13Create: Use device policiesCreate.c+25 -60 replies
9/13Manage: check device policies in manage_add_external()Manage.c+8 -00 replies
10/13Monitor, Incremental: use device policiesIncremental.c Monitor.c mdadm.h +1 more+15 -80 replies
11/13imsm: test_and_add_device_policies() implementationplatform-intel.h super-intel.c+90 -340 replies
12/13mdadm: drop get_disk_controller_domain()mdadm.h policy.c+0 -280 replies
13/13Revert "policy.c: Avoid to take spare without defined domain by imsm"policy.c+0 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/13] Custom drives policies verification

validate_geometry_imsm() over the years became huge and complicated. It is extremely hard to develop or optimize this code now. What the most important, it doesn't address all scenarios. For example if container contains disks under different controllers (spare container), "autolayout" feature allows to create raid array. This code has a lot of dependencies and it is almost impossible to add support of this scenario without breaking something else.

There is also get_disk_controller_domain() which in my understating is a part of validate_geometry_imsm() functionality moved outside, fit ideally to mdmonitor needs.

Drive encryption determining will be added to IMSM soon. The encryption status of the drive will be determined for every drive. There is no simple way to add it.

The solution added in this serie addresses those problems by making one easily extendable api to analyze every disk separately, outside validate_geometry().

First five patches are optimizations with no functional changes. New functionality replaces get_disk_controller_domain(). It should also cover some verifications done in validate_geometry_imsm() and add_to_super_imsm() but to lower regression risk these parts are not removed yet.

Mariusz Tkaczyk (13):
mdadm: Add functions for spare criteria verification
mdadm: drop get_required_spare_criteria()
Manage: fix check after dereference issue
Manage: implement manage_add_external()
mdadm: introduce sysfs_get_container_devnm()
mdadm.h: Introduce custom device policies
mdadm: test_and_add device policies implementation
Create: Use device policies
Manage: check device policies in manage_add_external() Monitor, Incremental: use device policies
imsm: test_and_add_device_policies() implementation
mdadm: drop get_disk_controller_domain()
Revert "policy.c: Avoid to take spare without defined domain by imsm"

 Create.c         |  48 +++++++---
 Incremental.c    |  77 ++++++++++-----
 Manage.c         | 195 +++++++++++++++++++++----------------
 Monitor.c        |  50 ++--------
 mdadm.h          |  90 +++++++++--------
 platform-intel.h |   1 -
 policy.c         | 110 +++++++++++++++++----
 super-intel.c    | 245 ++++++++++++++++++++++++++++++++---------------
 sysfs.c          |  23 +++++
 util.c           | 117 ++++++++++++----------
 10 files changed, 606 insertions(+), 350 deletions(-)
Signature · 1 line
2.35.3