summaryrefslogtreecommitdiffstats
path: root/Grow.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-12-14 20:14:59 +1100
committerNeil Brown <neilb@suse.de>2007-12-14 20:14:59 +1100
commit7e0f69790c47b21c4aa7636a4b05925687c80a6e (patch)
treedd297e3cbc3d53075e2f0ee4c76a6aa071dc3d4d /Grow.c
parent06c7f68e40134cbef3186426ebf63c4f6d4e30f5 (diff)
downloadmdadm-7e0f69790c47b21c4aa7636a4b05925687c80a6e.tar.gz
mdadm-7e0f69790c47b21c4aa7636a4b05925687c80a6e.tar.xz
mdadm-7e0f69790c47b21c4aa7636a4b05925687c80a6e.zip
Replace sysarray with mdinfo
Sure, mdinfo is bigger, but having a uniform structure for lots of things will make life easier.
Diffstat (limited to 'Grow.c')
-rw-r--r--Grow.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Grow.c b/Grow.c
index c02ff80..b24e958 100644
--- a/Grow.c
+++ b/Grow.c
@@ -435,7 +435,7 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
int nrdisks;
int err;
- struct sysarray *sra;
+ struct mdinfo *sra;
struct mdinfo *sd;
if (ioctl(fd, GET_ARRAY_INFO, &array) < 0) {
@@ -631,13 +631,13 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
devname);
return 1;
}
- if (sra->spares == 0 && backup_file == NULL) {
+ if (sra->array.spare_disks == 0 && backup_file == NULL) {
fprintf(stderr, Name ": %s: Cannot grow - need a spare or backup-file to backup critical section\n",
devname);
return 1;
}
- nrdisks = array.nr_disks + sra->spares;
+ nrdisks = array.nr_disks + sra->array.spare_disks;
/* Now we need to open all these devices so we can read/write.
*/
fdlist = malloc((1+nrdisks) * sizeof(int));
@@ -683,7 +683,7 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
" --grow aborted\n", devname, i);
goto abort;
}
- spares = sra->spares;
+ spares = sra->array.spare_disks;
if (backup_file) {
fdlist[d] = open(backup_file, O_RDWR|O_CREAT|O_EXCL, 0600);
if (fdlist[d] < 0) {