Remove subarray field in supertype.

This is now only ever set, never used.
So remove it.

Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2010-11-22 20:24:50 +11:00
parent d1d599ea0d
commit 69b2fcc5bb
5 changed files with 0 additions and 6 deletions

View File

@ -711,7 +711,6 @@ struct supertype {
int minor_version;
int max_devs;
int container_dev; /* devnum of container */
char subarray[32]; /* name of array inside container */
void *sb;
void *info;
int loaded_container; /* Set if load_super found a container,

View File

@ -398,7 +398,6 @@ static int mdmon(char *devname, int devnum, int must_fork, int takeover)
container->devnum = devnum;
container->devname = devname;
container->arrays = NULL;
container->subarray[0] = 0;
container->sock = -1;
if (!container->devname) {

View File

@ -1998,7 +1998,6 @@ static int init_super_ddf_bvd(struct supertype *st,
}
vcl->lba_offset = (__u64*) &vcl->conf.phys_refnum[ddf->mppe];
vcl->vcnum = venum;
sprintf(st->subarray, "%d", venum);
vcl->block_sizes = NULL; /* FIXME not for CONCAT */
vc = &vcl->conf;

View File

@ -3075,7 +3075,6 @@ static int init_super_imsm_volume(struct supertype *st, mdu_array_info_t *info,
if (!check_name(super, name, 0))
return 0;
sprintf(st->subarray, "%d", idx);
dv = malloc(sizeof(*dv));
if (!dv) {
fprintf(stderr, Name ": failed to allocate device list entry\n");

2
util.c
View File

@ -1086,7 +1086,6 @@ struct supertype *super_by_fd(int fd, char **subarrayp)
sysfs_free(sra);
if (st) {
st->sb = NULL;
st->subarray[0] = 0;
*subarrayp = subarray;
} else
free(subarray);
@ -1108,7 +1107,6 @@ struct supertype *dup_super(struct supertype *orig)
st->ss = orig->ss;
st->max_devs = orig->max_devs;
st->minor_version = orig->minor_version;
strcpy(st->subarray, orig->subarray);
st->sb = NULL;
st->info = NULL;
return st;