summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-02-29 12:52:06 +0100
committerMariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>2024-03-11 11:06:18 +0100
commitf656201188d73cdc2726265f1348f8ffbf7587be (patch)
tree95b1da3d064b0e15e5ba4fb2f43a8ed101c12059 /mdadm.h
parentmdadm: Add functions for spare criteria verification (diff)
downloadmdadm-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.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/mdadm.h b/mdadm.h
index e8abd730..cbc586f5 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -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