diff options
author | Andre Noll <maan@systemlinux.org> | 2009-01-08 16:31:07 -0500 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-01-08 16:31:07 -0500 |
commit | 6199d3db0fc34f8ada895879d04a353a6ae632bc (patch) | |
tree | 5a7d5f4a080abf6c46a87f121a859fd45fd53254 | |
parent | 019c4e2f3e02aac4b44003913b54ca4b332e4371 (diff) |
md: raid0: Represent zone->zone_offset in sectors.
For the same reason as in the previous patch, rename it from zone_offset
to zone_start.
Signed-off-by: Andre Noll <maan@systemlinux.org>
Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r-- | drivers/md/raid0.c | 12 | ||||
-rw-r--r-- | include/linux/raid/raid0.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index b860536dc894..6e12a358f366 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c | |||
@@ -155,7 +155,7 @@ static int create_strip_zones (mddev_t *mddev) | |||
155 | } | 155 | } |
156 | zone->nb_dev = cnt; | 156 | zone->nb_dev = cnt; |
157 | zone->size = smallest->size * cnt; | 157 | zone->size = smallest->size * cnt; |
158 | zone->zone_offset = 0; | 158 | zone->zone_start = 0; |
159 | 159 | ||
160 | current_offset = smallest->size; | 160 | current_offset = smallest->size; |
161 | curr_zone_offset = zone->size; | 161 | curr_zone_offset = zone->size; |
@@ -194,7 +194,7 @@ static int create_strip_zones (mddev_t *mddev) | |||
194 | printk("raid0: zone->nb_dev: %d, size: %llu\n", | 194 | printk("raid0: zone->nb_dev: %d, size: %llu\n", |
195 | zone->nb_dev, (unsigned long long)zone->size); | 195 | zone->nb_dev, (unsigned long long)zone->size); |
196 | 196 | ||
197 | zone->zone_offset = curr_zone_offset; | 197 | zone->zone_start = curr_zone_offset * 2; |
198 | curr_zone_offset += zone->size; | 198 | curr_zone_offset += zone->size; |
199 | 199 | ||
200 | current_offset = smallest->size; | 200 | current_offset = smallest->size; |
@@ -437,14 +437,14 @@ static int raid0_make_request (struct request_queue *q, struct bio *bio) | |||
437 | zone = conf->hash_table[x]; | 437 | zone = conf->hash_table[x]; |
438 | } | 438 | } |
439 | 439 | ||
440 | while (sector / 2 >= (zone->zone_offset + zone->size)) | 440 | while (sector / 2 >= (zone->zone_start / 2 + zone->size)) |
441 | zone++; | 441 | zone++; |
442 | 442 | ||
443 | sect_in_chunk = bio->bi_sector & (chunk_sects - 1); | 443 | sect_in_chunk = bio->bi_sector & (chunk_sects - 1); |
444 | 444 | ||
445 | 445 | ||
446 | { | 446 | { |
447 | sector_t x = (sector - zone->zone_offset * 2) >> chunksect_bits; | 447 | sector_t x = (sector - zone->zone_start) >> chunksect_bits; |
448 | 448 | ||
449 | sector_div(x, zone->nb_dev); | 449 | sector_div(x, zone->nb_dev); |
450 | chunk = x; | 450 | chunk = x; |
@@ -489,8 +489,8 @@ static void raid0_status (struct seq_file *seq, mddev_t *mddev) | |||
489 | seq_printf(seq, "%s/", bdevname( | 489 | seq_printf(seq, "%s/", bdevname( |
490 | conf->strip_zone[j].dev[k]->bdev,b)); | 490 | conf->strip_zone[j].dev[k]->bdev,b)); |
491 | 491 | ||
492 | seq_printf(seq, "] zo=%d ds=%d s=%d\n", | 492 | seq_printf(seq, "] zs=%d ds=%d s=%d\n", |
493 | conf->strip_zone[j].zone_offset, | 493 | conf->strip_zone[j].zone_start, |
494 | conf->strip_zone[j].dev_start, | 494 | conf->strip_zone[j].dev_start, |
495 | conf->strip_zone[j].size); | 495 | conf->strip_zone[j].size); |
496 | } | 496 | } |
diff --git a/include/linux/raid/raid0.h b/include/linux/raid/raid0.h index 61c3d29dc158..eaf4f6ac55f6 100644 --- a/include/linux/raid/raid0.h +++ b/include/linux/raid/raid0.h | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | struct strip_zone | 6 | struct strip_zone |
7 | { | 7 | { |
8 | sector_t zone_offset; /* Zone offset in md_dev */ | 8 | sector_t zone_start; /* Zone offset in md_dev (in sectors) */ |
9 | sector_t dev_start; /* Zone offset in real dev (in sectors) */ | 9 | sector_t dev_start; /* Zone offset in real dev (in sectors) */ |
10 | sector_t size; /* Zone size */ | 10 | sector_t size; /* Zone size */ |
11 | int nb_dev; /* # of devices attached to the zone */ | 11 | int nb_dev; /* # of devices attached to the zone */ |