Commit 26d2d542 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md 6 of 22 - Discard "param" from mddev structure

It isn't needed.  Only the chunksize is used, and it
can be found in the superblock.
parent d6888487
......@@ -186,7 +186,7 @@ static int linear_status (char *page, mddev_t *mddev)
}
sz += sprintf(page+sz, "\n");
#endif
sz += sprintf(page+sz, " %dk rounding", mddev->param.chunk_size/1024);
sz += sprintf(page+sz, " %dk rounding", mddev->sb->chunk_size/1024);
return sz;
}
......
......@@ -1626,9 +1626,6 @@ static int do_md_run(mddev_t * mddev)
chunk_size = mddev->sb->chunk_size;
pnum = level_to_pers(mddev->sb->level);
mddev->param.chunk_size = chunk_size;
mddev->param.personality = pnum;
if ((pnum != MULTIPATH) && (pnum != RAID1)) {
if (!chunk_size) {
/*
......@@ -2828,13 +2825,6 @@ static int md_ioctl(struct inode *inode, struct file *file,
case RUN_ARRAY:
{
/* The data is never used....
mdu_param_t param;
err = copy_from_user(&param, (mdu_param_t *)arg,
sizeof(param));
if (err)
goto abort_unlock;
*/
err = do_md_run (mddev);
/*
* we have to clean up the mess if
......
......@@ -233,7 +233,7 @@ static int raid0_make_request (mddev_t *mddev, int rw, struct bio *bio)
mdk_rdev_t *tmp_dev;
unsigned long chunk, block, rsect;
chunk_size = mddev->param.chunk_size >> 10;
chunk_size = mddev->sb->chunk_size >> 10;
chunksize_bits = ffz(~chunk_size);
block = bio->bi_sector >> 1;
hash = conf->hash_table + block / conf->smallest->size;
......@@ -322,7 +322,7 @@ static int raid0_status (char *page, mddev_t *mddev)
conf->strip_zone[j].size);
}
#endif
sz += sprintf(page + sz, " %dk chunks", mddev->param.chunk_size/1024);
sz += sprintf(page + sz, " %dk chunks", mddev->sb->chunk_size/1024);
return sz;
}
......
......@@ -199,7 +199,6 @@ struct mddev_s
int nb_dev;
struct list_head disks;
int sb_dirty;
mdu_param_t param;
int ro;
unsigned long curr_resync; /* blocks scheduled */
unsigned long resync_mark; /* a recent timestamp */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment