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>
This commit is contained in:
parent
019ca1e1da
commit
6f38d7ae10
|
@ -875,6 +875,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]);
|
||||
|
|
Loading…
Reference in New Issue