summaryrefslogtreecommitdiffstats
path: root/Grow.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2007-12-14 20:14:16 +1100
committerNeil Brown <neilb@suse.de>2007-12-14 20:14:16 +1100
commit68c7d6d790f856b4e8301d0afa7fc6873a0d4bb8 (patch)
tree56f8b050b39fb8008a8b25310fc6f9609796fc26 /Grow.c
parentdf37ffc0393b919ba5607bb48b2eaf2f9a1832d7 (diff)
downloadmdadm-68c7d6d790f856b4e8301d0afa7fc6873a0d4bb8.tar.gz
mdadm-68c7d6d790f856b4e8301d0afa7fc6873a0d4bb8.tar.xz
mdadm-68c7d6d790f856b4e8301d0afa7fc6873a0d4bb8.zip
Add 'supertype' arg to almost all metadata methods.
The 'superblock' will be moved into this structure soon.
Diffstat (limited to 'Grow.c')
-rw-r--r--Grow.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/Grow.c b/Grow.c
index 793e551..0aa7287 100644
--- a/Grow.c
+++ b/Grow.c
@@ -104,7 +104,7 @@ int Grow_Add_device(char *devname, int fd, char *newdev)
return 1;
}
if (super)
- st->ss->free_super(super);
+ st->ss->free_super(st, super);
super= NULL;
if (st->ss->load_super(st, fd2, &super, NULL)) {
fprintf(stderr, Name ": cannot find super block on %s\n", dv);
@@ -122,7 +122,7 @@ int Grow_Add_device(char *devname, int fd, char *newdev)
info.disk.minor = minor(stb.st_rdev);
info.disk.raid_disk = d;
info.disk.state = (1 << MD_DISK_SYNC) | (1 << MD_DISK_ACTIVE);
- st->ss->update_super(&info, super, "linear-grow-new", newdev,
+ st->ss->update_super(st, &info, super, "linear-grow-new", newdev,
0, 0, NULL);
if (st->ss->store_super(st, nfd, super)) {
@@ -178,7 +178,7 @@ int Grow_Add_device(char *devname, int fd, char *newdev)
info.array.active_disks = nd+1;
info.array.working_disks = nd+1;
- st->ss->update_super(&info, super, "linear-grow-update", dv,
+ st->ss->update_super(st, &info, super, "linear-grow-update", dv,
0, 0, NULL);
if (st->ss->store_super(st, fd2, super)) {
@@ -352,7 +352,7 @@ int Grow_addbitmap(char *devname, int fd, char *file, int chunk, int delay, int
if (fd2 >= 0 &&
st->ss->load_super(st, fd2, &super, NULL) == 0) {
close(fd2);
- st->ss->uuid_from_super(uuid, super);
+ st->ss->uuid_from_super(st, uuid, super);
break;
}
close(fd2);
@@ -712,7 +712,7 @@ int Grow_reshape(char *devname, int fd, int quiet, char *backup_file,
memcpy(bsb.magic, "md_backup_data-1", 16);
- st->ss->uuid_from_super((int*)&bsb.set_uuid, super);
+ st->ss->uuid_from_super(st, (int*)&bsb.set_uuid, super);
bsb.mtime = __cpu_to_le64(time(0));
bsb.arraystart = 0;
bsb.length = __cpu_to_le64(last_block);
@@ -906,8 +906,8 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
if (st->ss->load_super(st, fd, &super, NULL))
continue;
- st->ss->getinfo_super(&dinfo, super);
- st->ss->free_super(super);
+ st->ss->getinfo_super(st, &dinfo, super);
+ st->ss->free_super(st, super);
super = NULL;
if (lseek64(fd,
(dinfo.data_offset + dinfo.component_size - 8) <<9,
@@ -949,8 +949,8 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
if (st->ss->load_super(st, fdlist[j], &super, NULL))
/* FIXME should be this be an error */
continue;
- st->ss->getinfo_super(&dinfo, super);
- st->ss->free_super(super);
+ st->ss->getinfo_super(st, &dinfo, super);
+ st->ss->free_super(st, super);
super = NULL;
offsets[j] = dinfo.data_offset;
}
@@ -973,11 +973,13 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
if (fdlist[j] < 0) continue;
if (st->ss->load_super(st, fdlist[j], &super, NULL))
continue;
- st->ss->getinfo_super(&dinfo, super);
+ st->ss->getinfo_super(st, &dinfo, super);
dinfo.reshape_progress = __le64_to_cpu(bsb.length);
- st->ss->update_super(&dinfo, super, "_reshape_progress",NULL,0, 0, NULL);
+ st->ss->update_super(st, &dinfo, super,
+ "_reshape_progress",
+ NULL,0, 0, NULL);
st->ss->store_super(st, fdlist[j], super);
- st->ss->free_super(super);
+ st->ss->free_super(st, super);
}
/* And we are done! */