diff options
author | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-02-29 12:52:06 +0100 |
---|---|---|
committer | Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> | 2024-03-11 11:06:18 +0100 |
commit | f656201188d73cdc2726265f1348f8ffbf7587be (patch) | |
tree | 95b1da3d064b0e15e5ba4fb2f43a8ed101c12059 /mdadm.h | |
parent | mdadm: Add functions for spare criteria verification (diff) | |
download | mdadm-f656201188d73cdc2726265f1348f8ffbf7587be.tar.xz mdadm-f656201188d73cdc2726265f1348f8ffbf7587be.zip |
mdadm: drop get_required_spare_criteria()
Only IMSM implements get_spare_criteria, so load_super() in
get_required_spare_criteria() is dead code. It is moved inside
metadata handler, because only IMSM implements it.
Give possibility to provide devnode to be opened. With that we can hide
load_container() used only to fill spare criteria inside handler
and simplify implementation in generic code.
Add helper function for testing spare criteria in Incremental and
error messages.
File descriptor in get_spare_criteria_imsm() is always opened on purpose.
New functionality added in next patches will require it. For the same
reason, function is moved to other place.
No functional changes.
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1116,10 +1116,9 @@ extern struct superswitch { * Return spare criteria for array: * - minimum disk size can be used in array; * - sector size can be used in array. - * Return values: 0 - for success and -EINVAL on error. */ - int (*get_spare_criteria)(struct supertype *st, - struct spare_criteria *sc); + mdadm_status_t (*get_spare_criteria)(struct supertype *st, char *mddev_path, + struct spare_criteria *sc); /* Find somewhere to put a bitmap - possibly auto-size it - and * update the metadata to record this. The array may be newly * created, in which case data_size may be updated, or it might |