diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 13:29:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 13:29:12 -0400 |
commit | 8a392625b665c676a77c62f8608d10ff430bcb83 (patch) | |
tree | 4000a65d61baed73200e47f91dea5263ed16edd0 /drivers/md/raid0.c | |
parent | 519f0141f1c42e2b8b59c7dea005cbf6095358e8 (diff) | |
parent | 4b80991c6cb9efa607bc4fd6f3ecdf5511c31bb0 (diff) |
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: (52 commits)
md: Protect access to mddev->disks list using RCU
md: only count actual openers as access which prevent a 'stop'
md: linear: Make array_size sector-based and rename it to array_sectors.
md: Make mddev->array_size sector-based.
md: Make super_type->rdev_size_change() take sector-based sizes.
md: Fix check for overlapping devices.
md: Tidy up rdev_size_store a bit:
md: Remove some unused macros.
md: Turn rdev->sb_offset into a sector-based quantity.
md: Make calc_dev_sboffset() return a sector count.
md: Replace calc_dev_size() by calc_num_sectors().
md: Make update_size() take the number of sectors.
md: Better control of when do_md_stop is allowed to stop the array.
md: get_disk_info(): Don't convert between signed and unsigned and back.
md: Simplify restart_array().
md: alloc_disk_sb(): Return proper error value.
md: Simplify sb_equal().
md: Simplify uuid_equal().
md: sb_equal(): Fix misleading printk.
md: Fix a typo in the comment to cmd_match().
...
Diffstat (limited to 'drivers/md/raid0.c')
-rw-r--r-- | drivers/md/raid0.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index bcbb82594a19..183610635661 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -295,16 +295,16 @@ static int raid0_run (mddev_t *mddev) | |||
295 | goto out_free_conf; | 295 | goto out_free_conf; |
296 | 296 | ||
297 | /* calculate array device size */ | 297 | /* calculate array device size */ |
298 | mddev->array_size = 0; | 298 | mddev->array_sectors = 0; |
299 | rdev_for_each(rdev, tmp, mddev) | 299 | rdev_for_each(rdev, tmp, mddev) |
300 | mddev->array_size += rdev->size; | 300 | mddev->array_sectors += rdev->size * 2; |
301 | 301 | ||
302 | printk("raid0 : md_size is %llu blocks.\n", | 302 | printk("raid0 : md_size is %llu blocks.\n", |
303 | (unsigned long long)mddev->array_size); | 303 | (unsigned long long)mddev->array_sectors / 2); |
304 | printk("raid0 : conf->hash_spacing is %llu blocks.\n", | 304 | printk("raid0 : conf->hash_spacing is %llu blocks.\n", |
305 | (unsigned long long)conf->hash_spacing); | 305 | (unsigned long long)conf->hash_spacing); |
306 | { | 306 | { |
307 | sector_t s = mddev->array_size; | 307 | sector_t s = mddev->array_sectors / 2; |
308 | sector_t space = conf->hash_spacing; | 308 | sector_t space = conf->hash_spacing; |
309 | int round; | 309 | int round; |
310 | conf->preshift = 0; | 310 | conf->preshift = 0; |