diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/bitmap.c | 8 | ||||
-rw-r--r-- | drivers/md/faulty.c | 6 | ||||
-rw-r--r-- | drivers/md/multipath.c | 2 | ||||
-rw-r--r-- | drivers/md/raid1.c | 8 | ||||
-rw-r--r-- | drivers/md/raid10.c | 8 | ||||
-rw-r--r-- | drivers/md/raid5.c | 10 |
6 files changed, 21 insertions, 21 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 6279393db64d..49d6080387c8 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -505,7 +505,7 @@ void bitmap_update_sb(struct bitmap *bitmap) | |||
505 | return; | 505 | return; |
506 | } | 506 | } |
507 | spin_unlock_irqrestore(&bitmap->lock, flags); | 507 | spin_unlock_irqrestore(&bitmap->lock, flags); |
508 | sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); | 508 | sb = kmap_atomic(bitmap->sb_page, KM_USER0); |
509 | sb->events = cpu_to_le64(bitmap->mddev->events); | 509 | sb->events = cpu_to_le64(bitmap->mddev->events); |
510 | if (bitmap->mddev->events < bitmap->events_cleared) { | 510 | if (bitmap->mddev->events < bitmap->events_cleared) { |
511 | /* rocking back to read-only */ | 511 | /* rocking back to read-only */ |
@@ -526,7 +526,7 @@ void bitmap_print_sb(struct bitmap *bitmap) | |||
526 | 526 | ||
527 | if (!bitmap || !bitmap->sb_page) | 527 | if (!bitmap || !bitmap->sb_page) |
528 | return; | 528 | return; |
529 | sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); | 529 | sb = kmap_atomic(bitmap->sb_page, KM_USER0); |
530 | printk(KERN_DEBUG "%s: bitmap file superblock:\n", bmname(bitmap)); | 530 | printk(KERN_DEBUG "%s: bitmap file superblock:\n", bmname(bitmap)); |
531 | printk(KERN_DEBUG " magic: %08x\n", le32_to_cpu(sb->magic)); | 531 | printk(KERN_DEBUG " magic: %08x\n", le32_to_cpu(sb->magic)); |
532 | printk(KERN_DEBUG " version: %d\n", le32_to_cpu(sb->version)); | 532 | printk(KERN_DEBUG " version: %d\n", le32_to_cpu(sb->version)); |
@@ -575,7 +575,7 @@ static int bitmap_read_sb(struct bitmap *bitmap) | |||
575 | return err; | 575 | return err; |
576 | } | 576 | } |
577 | 577 | ||
578 | sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); | 578 | sb = kmap_atomic(bitmap->sb_page, KM_USER0); |
579 | 579 | ||
580 | chunksize = le32_to_cpu(sb->chunksize); | 580 | chunksize = le32_to_cpu(sb->chunksize); |
581 | daemon_sleep = le32_to_cpu(sb->daemon_sleep) * HZ; | 581 | daemon_sleep = le32_to_cpu(sb->daemon_sleep) * HZ; |
@@ -661,7 +661,7 @@ static int bitmap_mask_state(struct bitmap *bitmap, enum bitmap_state bits, | |||
661 | return 0; | 661 | return 0; |
662 | } | 662 | } |
663 | spin_unlock_irqrestore(&bitmap->lock, flags); | 663 | spin_unlock_irqrestore(&bitmap->lock, flags); |
664 | sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); | 664 | sb = kmap_atomic(bitmap->sb_page, KM_USER0); |
665 | old = le32_to_cpu(sb->state) & bits; | 665 | old = le32_to_cpu(sb->state) & bits; |
666 | switch (op) { | 666 | switch (op) { |
667 | case MASK_SET: sb->state |= cpu_to_le32(bits); | 667 | case MASK_SET: sb->state |= cpu_to_le32(bits); |
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c index 713acd02ab39..608a8d3736e2 100644 --- a/drivers/md/faulty.c +++ b/drivers/md/faulty.c | |||
@@ -171,7 +171,7 @@ static void add_sector(conf_t *conf, sector_t start, int mode) | |||
171 | static int make_request(struct request_queue *q, struct bio *bio) | 171 | static int make_request(struct request_queue *q, struct bio *bio) |
172 | { | 172 | { |
173 | mddev_t *mddev = q->queuedata; | 173 | mddev_t *mddev = q->queuedata; |
174 | conf_t *conf = (conf_t*)mddev->private; | 174 | conf_t *conf = mddev->private; |
175 | int failit = 0; | 175 | int failit = 0; |
176 | 176 | ||
177 | if (bio_data_dir(bio) == WRITE) { | 177 | if (bio_data_dir(bio) == WRITE) { |
@@ -224,7 +224,7 @@ static int make_request(struct request_queue *q, struct bio *bio) | |||
224 | 224 | ||
225 | static void status(struct seq_file *seq, mddev_t *mddev) | 225 | static void status(struct seq_file *seq, mddev_t *mddev) |
226 | { | 226 | { |
227 | conf_t *conf = (conf_t*)mddev->private; | 227 | conf_t *conf = mddev->private; |
228 | int n; | 228 | int n; |
229 | 229 | ||
230 | if ((n=atomic_read(&conf->counters[WriteTransient])) != 0) | 230 | if ((n=atomic_read(&conf->counters[WriteTransient])) != 0) |
@@ -327,7 +327,7 @@ static int run(mddev_t *mddev) | |||
327 | 327 | ||
328 | static int stop(mddev_t *mddev) | 328 | static int stop(mddev_t *mddev) |
329 | { | 329 | { |
330 | conf_t *conf = (conf_t *)mddev->private; | 330 | conf_t *conf = mddev->private; |
331 | 331 | ||
332 | kfree(conf); | 332 | kfree(conf); |
333 | mddev->private = NULL; | 333 | mddev->private = NULL; |
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 5558ebc705c8..97befd5cc0e3 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -84,7 +84,7 @@ static void multipath_end_bh_io (struct multipath_bh *mp_bh, int err) | |||
84 | static void multipath_end_request(struct bio *bio, int error) | 84 | static void multipath_end_request(struct bio *bio, int error) |
85 | { | 85 | { |
86 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); | 86 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); |
87 | struct multipath_bh * mp_bh = (struct multipath_bh *)(bio->bi_private); | 87 | struct multipath_bh *mp_bh = bio->bi_private; |
88 | multipath_conf_t *conf = mp_bh->mddev->private; | 88 | multipath_conf_t *conf = mp_bh->mddev->private; |
89 | mdk_rdev_t *rdev = conf->multipaths[mp_bh->path].rdev; | 89 | mdk_rdev_t *rdev = conf->multipaths[mp_bh->path].rdev; |
90 | 90 | ||
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 1ab30f64848f..23a7516abbfd 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c | |||
@@ -262,7 +262,7 @@ static inline void update_head_pos(int disk, r1bio_t *r1_bio) | |||
262 | static void raid1_end_read_request(struct bio *bio, int error) | 262 | static void raid1_end_read_request(struct bio *bio, int error) |
263 | { | 263 | { |
264 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); | 264 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); |
265 | r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); | 265 | r1bio_t *r1_bio = bio->bi_private; |
266 | int mirror; | 266 | int mirror; |
267 | conf_t *conf = r1_bio->mddev->private; | 267 | conf_t *conf = r1_bio->mddev->private; |
268 | 268 | ||
@@ -307,7 +307,7 @@ static void raid1_end_read_request(struct bio *bio, int error) | |||
307 | static void raid1_end_write_request(struct bio *bio, int error) | 307 | static void raid1_end_write_request(struct bio *bio, int error) |
308 | { | 308 | { |
309 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); | 309 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); |
310 | r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); | 310 | r1bio_t *r1_bio = bio->bi_private; |
311 | int mirror, behind = test_bit(R1BIO_BehindIO, &r1_bio->state); | 311 | int mirror, behind = test_bit(R1BIO_BehindIO, &r1_bio->state); |
312 | conf_t *conf = r1_bio->mddev->private; | 312 | conf_t *conf = r1_bio->mddev->private; |
313 | struct bio *to_put = NULL; | 313 | struct bio *to_put = NULL; |
@@ -1223,7 +1223,7 @@ abort: | |||
1223 | 1223 | ||
1224 | static void end_sync_read(struct bio *bio, int error) | 1224 | static void end_sync_read(struct bio *bio, int error) |
1225 | { | 1225 | { |
1226 | r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); | 1226 | r1bio_t *r1_bio = bio->bi_private; |
1227 | int i; | 1227 | int i; |
1228 | 1228 | ||
1229 | for (i=r1_bio->mddev->raid_disks; i--; ) | 1229 | for (i=r1_bio->mddev->raid_disks; i--; ) |
@@ -1246,7 +1246,7 @@ static void end_sync_read(struct bio *bio, int error) | |||
1246 | static void end_sync_write(struct bio *bio, int error) | 1246 | static void end_sync_write(struct bio *bio, int error) |
1247 | { | 1247 | { |
1248 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); | 1248 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); |
1249 | r1bio_t * r1_bio = (r1bio_t *)(bio->bi_private); | 1249 | r1bio_t *r1_bio = bio->bi_private; |
1250 | mddev_t *mddev = r1_bio->mddev; | 1250 | mddev_t *mddev = r1_bio->mddev; |
1251 | conf_t *conf = mddev->private; | 1251 | conf_t *conf = mddev->private; |
1252 | int i; | 1252 | int i; |
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index b4ba41ecbd20..b90fef607f63 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c | |||
@@ -254,7 +254,7 @@ static inline void update_head_pos(int slot, r10bio_t *r10_bio) | |||
254 | static void raid10_end_read_request(struct bio *bio, int error) | 254 | static void raid10_end_read_request(struct bio *bio, int error) |
255 | { | 255 | { |
256 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); | 256 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); |
257 | r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); | 257 | r10bio_t *r10_bio = bio->bi_private; |
258 | int slot, dev; | 258 | int slot, dev; |
259 | conf_t *conf = r10_bio->mddev->private; | 259 | conf_t *conf = r10_bio->mddev->private; |
260 | 260 | ||
@@ -295,7 +295,7 @@ static void raid10_end_read_request(struct bio *bio, int error) | |||
295 | static void raid10_end_write_request(struct bio *bio, int error) | 295 | static void raid10_end_write_request(struct bio *bio, int error) |
296 | { | 296 | { |
297 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); | 297 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); |
298 | r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); | 298 | r10bio_t *r10_bio = bio->bi_private; |
299 | int slot, dev; | 299 | int slot, dev; |
300 | conf_t *conf = r10_bio->mddev->private; | 300 | conf_t *conf = r10_bio->mddev->private; |
301 | 301 | ||
@@ -1223,7 +1223,7 @@ abort: | |||
1223 | 1223 | ||
1224 | static void end_sync_read(struct bio *bio, int error) | 1224 | static void end_sync_read(struct bio *bio, int error) |
1225 | { | 1225 | { |
1226 | r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); | 1226 | r10bio_t *r10_bio = bio->bi_private; |
1227 | conf_t *conf = r10_bio->mddev->private; | 1227 | conf_t *conf = r10_bio->mddev->private; |
1228 | int i,d; | 1228 | int i,d; |
1229 | 1229 | ||
@@ -1260,7 +1260,7 @@ static void end_sync_read(struct bio *bio, int error) | |||
1260 | static void end_sync_write(struct bio *bio, int error) | 1260 | static void end_sync_write(struct bio *bio, int error) |
1261 | { | 1261 | { |
1262 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); | 1262 | int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); |
1263 | r10bio_t * r10_bio = (r10bio_t *)(bio->bi_private); | 1263 | r10bio_t *r10_bio = bio->bi_private; |
1264 | mddev_t *mddev = r10_bio->mddev; | 1264 | mddev_t *mddev = r10_bio->mddev; |
1265 | conf_t *conf = mddev->private; | 1265 | conf_t *conf = mddev->private; |
1266 | int i,d; | 1266 | int i,d; |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index a361398875d0..10af3715b1fc 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -1618,7 +1618,7 @@ static void raid5_build_block(struct stripe_head *sh, int i, int previous) | |||
1618 | static void error(mddev_t *mddev, mdk_rdev_t *rdev) | 1618 | static void error(mddev_t *mddev, mdk_rdev_t *rdev) |
1619 | { | 1619 | { |
1620 | char b[BDEVNAME_SIZE]; | 1620 | char b[BDEVNAME_SIZE]; |
1621 | raid5_conf_t *conf = (raid5_conf_t *) mddev->private; | 1621 | raid5_conf_t *conf = mddev->private; |
1622 | pr_debug("raid5: error called\n"); | 1622 | pr_debug("raid5: error called\n"); |
1623 | 1623 | ||
1624 | if (!test_bit(Faulty, &rdev->flags)) { | 1624 | if (!test_bit(Faulty, &rdev->flags)) { |
@@ -4057,7 +4057,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped | |||
4057 | * As the reads complete, handle_stripe will copy the data | 4057 | * As the reads complete, handle_stripe will copy the data |
4058 | * into the destination stripe and release that stripe. | 4058 | * into the destination stripe and release that stripe. |
4059 | */ | 4059 | */ |
4060 | raid5_conf_t *conf = (raid5_conf_t *) mddev->private; | 4060 | raid5_conf_t *conf = mddev->private; |
4061 | struct stripe_head *sh; | 4061 | struct stripe_head *sh; |
4062 | sector_t first_sector, last_sector; | 4062 | sector_t first_sector, last_sector; |
4063 | int raid_disks = conf->previous_raid_disks; | 4063 | int raid_disks = conf->previous_raid_disks; |
@@ -4266,7 +4266,7 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped | |||
4266 | /* FIXME go_faster isn't used */ | 4266 | /* FIXME go_faster isn't used */ |
4267 | static inline sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster) | 4267 | static inline sector_t sync_request(mddev_t *mddev, sector_t sector_nr, int *skipped, int go_faster) |
4268 | { | 4268 | { |
4269 | raid5_conf_t *conf = (raid5_conf_t *) mddev->private; | 4269 | raid5_conf_t *conf = mddev->private; |
4270 | struct stripe_head *sh; | 4270 | struct stripe_head *sh; |
4271 | sector_t max_sector = mddev->dev_sectors; | 4271 | sector_t max_sector = mddev->dev_sectors; |
4272 | int sync_blocks; | 4272 | int sync_blocks; |
@@ -5132,7 +5132,7 @@ abort: | |||
5132 | 5132 | ||
5133 | static int stop(mddev_t *mddev) | 5133 | static int stop(mddev_t *mddev) |
5134 | { | 5134 | { |
5135 | raid5_conf_t *conf = (raid5_conf_t *) mddev->private; | 5135 | raid5_conf_t *conf = mddev->private; |
5136 | 5136 | ||
5137 | md_unregister_thread(mddev->thread); | 5137 | md_unregister_thread(mddev->thread); |
5138 | mddev->thread = NULL; | 5138 | mddev->thread = NULL; |
@@ -5181,7 +5181,7 @@ static void printall(struct seq_file *seq, raid5_conf_t *conf) | |||
5181 | 5181 | ||
5182 | static void status(struct seq_file *seq, mddev_t *mddev) | 5182 | static void status(struct seq_file *seq, mddev_t *mddev) |
5183 | { | 5183 | { |
5184 | raid5_conf_t *conf = (raid5_conf_t *) mddev->private; | 5184 | raid5_conf_t *conf = mddev->private; |
5185 | int i; | 5185 | int i; |
5186 | 5186 | ||
5187 | seq_printf(seq, " level %d, %dk chunk, algorithm %d", mddev->level, | 5187 | seq_printf(seq, " level %d, %dk chunk, algorithm %d", mddev->level, |