diff options
author | Piergiorgio Sartor <piergiorgio.sartor@nexgo.de> | 2011-03-22 00:09:38 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-23 01:09:29 +0100 |
commit | b306624e2bfd061339641295ed5cb52d40ab7ae3 (patch) | |
tree | db6979b05151350eee80b55afba8174d0b90c822 | |
parent | Assemble: improve efficacy of -Af in assembling degraded dirty arrays. (diff) | |
download | mdadm-b306624e2bfd061339641295ed5cb52d40ab7ae3.tar.xz mdadm-b306624e2bfd061339641295ed5cb52d40ab7ae3.zip |
restripe: allow test code to have an offset on each device.
If device name ends :number, e.g.
/dev/sda0:1234
then assume the RAID data starts that many sectors from start of
device.
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | restripe.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -777,6 +777,14 @@ main(int argc, char *argv[]) exit(3); } for (i=0; i<raid_disks; i++) { + char *p; + p = strchr(argv[9+i], ':'); + + if(p != NULL) { + *p++ = '\0'; + offsets[i] = atoll(p) * 512; + } + fds[i] = open(argv[9+i], O_RDWR); if (fds[i] < 0) { perror(argv[9+i]); |