summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Assemble.c9
-rw-r--r--ChangeLog1
-rw-r--r--Detail.c3
-rw-r--r--Examine.c5
-rw-r--r--Grow.c7
-rw-r--r--Manage.c3
-rw-r--r--Query.c3
-rw-r--r--mdadm.h3
-rw-r--r--super0.c4
-rw-r--r--super1.c6
-rw-r--r--util.c6
11 files changed, 22 insertions, 28 deletions
diff --git a/Assemble.c b/Assemble.c
index 2dca21d..a8a331e 100644
--- a/Assemble.c
+++ b/Assemble.c
@@ -117,7 +117,6 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
unsigned int num_devs;
mddev_dev_t tmpdev;
struct mdinfo info;
- struct mddev_ident_s ident2;
char *avail;
int nextspare = 0;
@@ -215,7 +214,7 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
fprintf( stderr, Name ": no RAID superblock on %s\n",
devname);
} else {
- tst->ss->getinfo_super(&info, &ident2, super);
+ tst->ss->getinfo_super(&info, super);
}
if (dfd >= 0) close(dfd);
@@ -227,7 +226,7 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
continue;
}
if (ident->name[0] &&
- (!super || strncmp(ident2.name, ident->name, 32)!=0)) {
+ (!super || strncmp(info.name, ident->name, 32)!=0)) {
if ((inargv && verbose >= 0) || verbose > 0)
fprintf(stderr, Name ": %s has wrong name.\n",
devname);
@@ -374,7 +373,7 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
return 1;
}
- st->ss->getinfo_super(&info, &ident2, first_super);
+ st->ss->getinfo_super(&info, first_super);
/* now we have some devices that might be suitable.
* I wonder how many
@@ -500,7 +499,7 @@ int Assemble(struct supertype *st, char *mddev, int mdfd,
fprintf(stderr, Name ": No suitable drives found for %s\n", mddev);
return 1;
}
- st->ss->getinfo_super(&info, &ident2, super);
+ st->ss->getinfo_super(&info, super);
for (i=0; i<bestcnt; i++) {
int j = best[i];
unsigned int desired_state;
diff --git a/ChangeLog b/ChangeLog
index ade4deb..22a97cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@ Changes Prior to 2.4 release
backup after a crash.
- Put a 'canary' at each end of the backup so a corruption
can be more easily detected.
+ - Remove useless 'ident' arguement from ->getinfo_super method.
Changes Prior to 2.3.1 release
- Fixed -O2 compile so I could make and RPM.
diff --git a/Detail.c b/Detail.c
index 774a750..15c751f 100644
--- a/Detail.c
+++ b/Detail.c
@@ -114,8 +114,7 @@ int Detail(char *dev, int brief, int test)
if (fd2 >=0 && st &&
st->ss->load_super(st, fd2, &super, NULL) == 0) {
struct mdinfo info;
- struct mddev_ident_s ident;
- st->ss->getinfo_super(&info, &ident, super);
+ st->ss->getinfo_super(&info, super);
if (info.array.ctime != array.ctime ||
info.array.level != array.level) {
free(super);
diff --git a/Examine.c b/Examine.c
index fcfb02b..b4425e5 100644
--- a/Examine.c
+++ b/Examine.c
@@ -62,7 +62,6 @@ int Examine(mddev_dev_t devlist, int brief, int scan, int SparcAdjust, struct su
void *super;
struct supertype *st;
struct mdinfo info;
- struct mddev_ident_s ident;
void *devs;
struct array *next;
int spares;
@@ -113,9 +112,9 @@ int Examine(mddev_dev_t devlist, int brief, int scan, int SparcAdjust, struct su
ap->spares = 0;
ap->st = st;
arrays = ap;
- st->ss->getinfo_super(&ap->info, &ap->ident, super);
+ st->ss->getinfo_super(&ap->info, super);
} else {
- st->ss->getinfo_super(&ap->info, &ap->ident, super);
+ st->ss->getinfo_super(&ap->info, super);
free(super);
}
if (!(ap->info.disk.state & MD_DISK_SYNC))
diff --git a/Grow.c b/Grow.c
index 4432922..04de455 100644
--- a/Grow.c
+++ b/Grow.c
@@ -835,7 +835,6 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
for (i=old_disks; i<cnt; i++) {
void *super = NULL;
struct mdinfo dinfo;
- struct mddev_ident_s id;
struct mdp_backup_super bsb;
char buf[4096];
@@ -851,7 +850,7 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
if (st->ss->load_super(st, fdlist[i], &super, NULL))
continue;
- st->ss->getinfo_super(&dinfo, &id, super);
+ st->ss->getinfo_super(&dinfo, super);
free(super); super = NULL;
if (lseek64(fdlist[i],
(dinfo.data_offset + dinfo.component_size - 8) <<9,
@@ -893,7 +892,7 @@ 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, &id, super);
+ st->ss->getinfo_super(&dinfo, super);
free(super); super = NULL;
offsets[j] = dinfo.data_offset;
}
@@ -916,7 +915,7 @@ 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, &id, super);
+ st->ss->getinfo_super(&dinfo, super);
dinfo.reshape_progress = __le64_to_cpu(bsb.length);
st->ss->update_super(&dinfo, super, "_reshape_progress",NULL,0);
st->ss->store_super(st, fdlist[j], super);
diff --git a/Manage.c b/Manage.c
index 67e7210..f7f3f6e 100644
--- a/Manage.c
+++ b/Manage.c
@@ -278,8 +278,7 @@ int Manage_subdevs(char *devname, int fd,
* based reconstruct is possible
*/
struct mdinfo mdi;
- struct mddev_ident_s ident;
- st->ss->getinfo_super(&mdi, &ident, osuper);
+ st->ss->getinfo_super(&mdi, osuper);
disc.major = major(stb.st_rdev);
disc.minor = minor(stb.st_rdev);
disc.number = mdi.disk.number;
diff --git a/Query.c b/Query.c
index a76c692..d2bfb05 100644
--- a/Query.c
+++ b/Query.c
@@ -42,7 +42,6 @@ int Query(char *dev)
int ioctlerr;
int superror, superrno;
struct mdinfo info;
- struct mddev_ident_s ident;
mdu_array_info_t array;
void *super;
struct supertype *st = NULL;
@@ -105,7 +104,7 @@ int Query(char *dev)
close(fd);
if (superror == 0) {
/* array might be active... */
- st->ss->getinfo_super(&info, &ident, super);
+ st->ss->getinfo_super(&info, super);
if (st->ss->major == 0) {
mddev = get_md_name(info.array.md_minor);
disc.number = info.disk.number;
diff --git a/mdadm.h b/mdadm.h
index 00c280b..c929be9 100644
--- a/mdadm.h
+++ b/mdadm.h
@@ -91,6 +91,7 @@ struct mdinfo {
mdu_disk_info_t disk;
__u64 events;
int uuid[4];
+ char name[33];
unsigned long long data_offset;
unsigned long long component_size;
int reshape_active;
@@ -254,7 +255,7 @@ extern struct superswitch {
void (*detail_super)(void *sbv);
void (*brief_detail_super)(void *sbv);
void (*uuid_from_super)(int uuid[4], void *sbv);
- void (*getinfo_super)(struct mdinfo *info, mddev_ident_t ident, void *sbv);
+ void (*getinfo_super)(struct mdinfo *info, void *sbv);
int (*update_super)(struct mdinfo *info, void *sbv, char *update, char *devname, int verbose);
__u64 (*event_super)(void *sbv);
int (*init_super)(struct supertype *st, void **sbp, mdu_array_info_t *info, unsigned long long size, char *name);
diff --git a/super0.c b/super0.c
index 99d09a4..c7f2f61 100644
--- a/super0.c
+++ b/super0.c
@@ -265,7 +265,7 @@ static void uuid_from_super0(int uuid[4], void * sbv)
}
}
-static void getinfo_super0(struct mdinfo *info, mddev_ident_t ident, void *sbv)
+static void getinfo_super0(struct mdinfo *info, void *sbv)
{
mdp_super_t *sb = sbv;
int working = 0;
@@ -304,7 +304,7 @@ static void getinfo_super0(struct mdinfo *info, mddev_ident_t ident, void *sbv)
} else
info->reshape_active = 0;
- ident->name[0] = 0;
+ info->name[0] = 0;
/* work_disks is calculated rather than read directly */
for (i=0; i < MD_SB_DISKS; i++)
if ((sb->disks[i].state & (1<<MD_DISK_SYNC)) &&
diff --git a/super1.c b/super1.c
index 4df6370..38b53e7 100644
--- a/super1.c
+++ b/super1.c
@@ -353,7 +353,7 @@ static void uuid_from_super1(int uuid[4], void * sbv)
cuuid[i] = super->set_uuid[i];
}
-static void getinfo_super1(struct mdinfo *info, mddev_ident_t ident, void *sbv)
+static void getinfo_super1(struct mdinfo *info, void *sbv)
{
struct mdp_superblock_1 *sb = sbv;
int working = 0;
@@ -399,8 +399,8 @@ static void getinfo_super1(struct mdinfo *info, mddev_ident_t ident, void *sbv)
memcpy(info->uuid, sb->set_uuid, 16);
- strncpy(ident->name, sb->set_name, 32);
- ident->name[32] = 0;
+ strncpy(info->name, sb->set_name, 32);
+ info->name[32] = 0;
if (sb->feature_map & __le32_to_cpu(MD_FEATURE_RESHAPE_ACTIVE)) {
info->reshape_active = 1;
diff --git a/util.c b/util.c
index 0af4331..ff17500 100644
--- a/util.c
+++ b/util.c
@@ -248,7 +248,6 @@ int check_raid(int fd, char *name)
{
void *super;
struct mdinfo info;
- struct mddev_ident_s ident;
time_t crtime;
char *level;
struct supertype *st = guess_super(fd);
@@ -258,7 +257,7 @@ int check_raid(int fd, char *name)
/* Looks like a raid array .. */
fprintf(stderr, Name ": %s appears to be part of a raid array:\n",
name);
- st->ss->getinfo_super(&info, &ident, super);
+ st->ss->getinfo_super(&info, super);
free(super);
crtime = info.array.ctime;
level = map_num(pers, info.array.level);
@@ -653,8 +652,7 @@ struct supertype *guess_super(int fd)
rv = ss->load_super(st, fd, &sbp, NULL);
if (rv == 0) {
struct mdinfo info;
- struct mddev_ident_s ident;
- ss->getinfo_super(&info, &ident, sbp);
+ ss->getinfo_super(&info, sbp);
if (bestsuper == -1 ||
besttime < info.array.ctime) {
bestsuper = i;