summaryrefslogtreecommitdiffstats
path: root/mdadm.h
diff options
context:
space:
mode:
authorMateusz Kusiak <mateusz.kusiak@intel.com>2023-01-02 09:35:22 +0100
committerJes Sorensen <jes@trained-monkey.org>2023-01-04 16:20:58 +0100
commit03312b5240438ffc3b63114bdc87e911222f01e5 (patch)
tree6efdf29991cfc40cdbc320f31c33bf158b05fd0f /mdadm.h
parentsuper-intel: refactor the code for enum (diff)
downloadmdadm-03312b5240438ffc3b63114bdc87e911222f01e5.tar.xz
mdadm-03312b5240438ffc3b63114bdc87e911222f01e5.zip
Change update to enum in update_super and update_subarray
Use already existing enum, change update_super and update_subarray update to enum globally. Refactor function references also. Remove code specific options from update_options. Signed-off-by: Mateusz Kusiak <mateusz.kusiak@intel.com> Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
Diffstat (limited to 'mdadm.h')
-rw-r--r--mdadm.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/mdadm.h b/mdadm.h
index 31db25f5..5dc94390 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -1011,7 +1011,7 @@ extern struct superswitch {
* it will resume going in the opposite direction.
*/
int (*update_super)(struct supertype *st, struct mdinfo *info,
- char *update,
+ enum update_opt update,
char *devname, int verbose,
int uuid_set, char *homehost);
@@ -1137,9 +1137,15 @@ extern struct superswitch {
/* Permit subarray's to be deleted from inactive containers */
int (*kill_subarray)(struct supertype *st,
char *subarray_id); /* optional */
- /* Permit subarray's to be modified */
+ /**
+ * update_subarray() - Permit subarray to be modified.
+ * @st: Supertype.
+ * @subarray: Subarray name.
+ * @update: Update option.
+ * @ident: Optional identifiers.
+ */
int (*update_subarray)(struct supertype *st, char *subarray,
- char *update, struct mddev_ident *ident); /* optional */
+ enum update_opt update, struct mddev_ident *ident);
/* Check if reshape is supported for this external format.
* st is obtained from super_by_fd() where st->subarray[0] is
* initialized to indicate if reshape is being performed at the