summaryrefslogtreecommitdiff
path: root/mdadm.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2013-05-21 16:40:23 +1000
committerNeilBrown <neilb@suse.de>2013-05-22 12:26:35 +1000
commit8192902ff75725e40e1b3d7d39452fd949f2d705 (patch)
treeb56b50bb82dc34d7e9d63b91716d6ec6966d10d3 /mdadm.c
parent9ad2a640fe8579659455ef51b1fa40ea532e865f (diff)
Grow: --backup-file and --data-offset are incompatible.
So report if both are given, and if --backup-file is given, don't try to update data-offset. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.c')
-rw-r--r--mdadm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mdadm.c b/mdadm.c
index 1b272848..b0742381 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -1266,6 +1266,11 @@ int main(int argc, char *argv[])
c.require_homehost = 0;
}
+ if (c.backup_file && data_offset != INVALID_SECTORS) {
+ pr_err("--backup-file and --data-offset are incompatible\n");
+ exit(2);
+ }
+
if ((mode == MISC && devmode == 'E')
|| (mode == MONITOR && spare_sharing == 0))
/* Anyone may try this */;