aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index df13a17a9627..4bfbc1982cda 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3704,7 +3704,7 @@ static int do_md_run(mddev_t * mddev)
3704 if (mddev->flags) 3704 if (mddev->flags)
3705 md_update_sb(mddev, 0); 3705 md_update_sb(mddev, 0);
3706 3706
3707 set_capacity(disk, mddev->array_size<<1); 3707 set_capacity(disk, mddev->array_sectors);
3708 3708
3709 /* If we call blk_queue_make_request here, it will 3709 /* If we call blk_queue_make_request here, it will
3710 * re-initialise max_sectors etc which may have been 3710 * re-initialise max_sectors etc which may have been
@@ -3905,7 +3905,7 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
3905 3905
3906 export_array(mddev); 3906 export_array(mddev);
3907 3907
3908 mddev->array_size = 0; 3908 mddev->array_sectors = 0;
3909 mddev->size = 0; 3909 mddev->size = 0;
3910 mddev->raid_disks = 0; 3910 mddev->raid_disks = 0;
3911 mddev->recovery_cp = 0; 3911 mddev->recovery_cp = 0;
@@ -4644,7 +4644,8 @@ static int update_size(mddev_t *mddev, sector_t num_sectors)
4644 bdev = bdget_disk(mddev->gendisk, 0); 4644 bdev = bdget_disk(mddev->gendisk, 0);
4645 if (bdev) { 4645 if (bdev) {
4646 mutex_lock(&bdev->bd_inode->i_mutex); 4646 mutex_lock(&bdev->bd_inode->i_mutex);
4647 i_size_write(bdev->bd_inode, (loff_t)mddev->array_size << 10); 4647 i_size_write(bdev->bd_inode,
4648 (loff_t)mddev->array_sectors << 9);
4648 mutex_unlock(&bdev->bd_inode->i_mutex); 4649 mutex_unlock(&bdev->bd_inode->i_mutex);
4649 bdput(bdev); 4650 bdput(bdev);
4650 } 4651 }
@@ -5391,10 +5392,11 @@ static int md_seq_show(struct seq_file *seq, void *v)
5391 if (!list_empty(&mddev->disks)) { 5392 if (!list_empty(&mddev->disks)) {
5392 if (mddev->pers) 5393 if (mddev->pers)
5393 seq_printf(seq, "\n %llu blocks", 5394 seq_printf(seq, "\n %llu blocks",
5394 (unsigned long long)mddev->array_size); 5395 (unsigned long long)
5396 mddev->array_sectors / 2);
5395 else 5397 else
5396 seq_printf(seq, "\n %llu blocks", 5398 seq_printf(seq, "\n %llu blocks",
5397 (unsigned long long)size); 5399 (unsigned long long)size);
5398 } 5400 }
5399 if (mddev->persistent) { 5401 if (mddev->persistent) {
5400 if (mddev->major_version != 0 || 5402 if (mddev->major_version != 0 ||