From 9ca39acb3e8bc31811e463d19fae81c5501aea65 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Thu, 28 Nov 2013 15:15:30 +1100 Subject: Incremental: add --export handling. If --export is given with --incremental, then MD_DEVNAME is output which gives the name of the device (in /dev/md) that is the array (or container) that the device would be added to. Also MD_STARTED is set to one of no unsafe yes nothing to indicate if the array was started. IF MD_STARTED=unsafe then it may be appropriate to run mdadm -R /dev/md/$MD_DEVNAME after a timeout to ensure newly degraded array are started. If MD_FOREIGN=yes it might be appropriate to suppress this as the array is probably not critical. Signed-off-by: NeilBrown --- mdadm.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mdadm.h') diff --git a/mdadm.h b/mdadm.h index 7cfdd8fd..c38fdfb9 100644 --- a/mdadm.h +++ b/mdadm.h @@ -1331,7 +1331,11 @@ extern void append_metadata_update(struct supertype *st, void *buf, int len); extern int assemble_container_content(struct supertype *st, int mdfd, struct mdinfo *content, struct context *c, - char *chosen_name); + char *chosen_name, int *result); +#define INCR_NO 1 +#define INCR_UNSAFE 2 +#define INCR_ALREADY 4 +#define INCR_YES 8 extern struct mdinfo *container_choose_spares(struct supertype *st, unsigned long long min_size, struct domainlist *domlist, -- cgit v1.2.3