diff options
author | NeilBrown <neilb@suse.de> | 2012-10-04 16:34:21 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-10-04 16:34:21 +1000 |
commit | 40c9a66a5c1a89d621daa2184888e66952b06a71 (patch) | |
tree | bf7dae47d213cc7629f112880a9c18cb509d8415 /Grow.c | |
parent | 83cd1e97cbc0c4749561b72864dbaaed3a014123 (diff) |
Add --data-offset flag for Create and Grow
This can be used to over-ride the automatic assignment of
data offset.
For --create, it is useful to re-create old arrays where different
defaults applied.
For --grow it may be able to force a reshape in the reverse direction.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Grow.c')
-rw-r--r-- | Grow.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1440,6 +1440,7 @@ static int reshape_container(char *container, char *devname, int Grow_reshape(char *devname, int fd, struct mddev_dev *devlist, + unsigned long long data_offset, struct context *c, struct shape *s) { /* Make some changes in the shape of an array. @@ -1476,6 +1477,11 @@ int Grow_reshape(char *devname, int fd, struct mdinfo info; struct mdinfo *sra; + if (data_offset != INVALID_SECTORS) { + fprintf(stderr, Name ": --grow --data-offset not yet supported\n"); + return 1; + } + if (ioctl(fd, GET_ARRAY_INFO, &array) < 0) { pr_err("%s is not an active md array - aborting\n", devname); |