diff options
Diffstat (limited to 'Incremental.c')
-rw-r--r-- | Incremental.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/Incremental.c b/Incremental.c index ace80c4..5fdf509 100644 --- a/Incremental.c +++ b/Incremental.c @@ -909,7 +909,7 @@ int IncrementalNewDisk(char *devname, int verbose, int export) domain = conf_get_domain(devname); if (!domain) return 0; - if ((domain->action & action_mask) <= incremental) + if (action(domain) <= incremental) /* Nothing to do. We only get called in the case that there * is no current superblock on the device in question, and * since our matching domain says we should either ignore or @@ -917,19 +917,8 @@ int IncrementalNewDisk(char *devname, int verbose, int export) * superblock. Since we don't, we're done. */ return 0; - if (domain->action == partition) { - /* Special case. Basically, we can only put this action on - * whole disk devices, and since we are partitioning them, - * the whole device necessarily won't ever be part of an - * array, so we will never have any arrays in our domain, ever. - * As such, we have to figure out what to do from other - * hints. - */ - /* We haven't filled this out yet */ - return 0; - } - mdstat = arrays_in_domain(devname, domain); - if (!mdstat) { + if (action(domain) != partition && + (mdstat = arrays_in_domain(devname, domain)) == NULL) { /* As a technical design decision, we *must* have at least one * array in our domain that we can add this device to or else * we simply can't do anything with this device. |