diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 15:39:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-26 15:39:42 -0400 |
commit | c3ae1f33569e06984f0426a7834ff63251d44d84 (patch) | |
tree | 0d7f6f6b49c331e440850cf2e8a7bc0cf220f8bc /drivers/md/dm-raid.c | |
parent | c28cfd60e4ec3f494b73ef7d6c661f5f491cd84f (diff) | |
parent | d890fa2b0586b6177b119643ff66932127d58afa (diff) |
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: (34 commits)
md: Fix some bugs in recovery_disabled handling.
md/raid5: fix bug that could result in reads from a failed device.
lib/raid6: Fix filename emitted in generated code
md.c: trivial comment fix
MD: Allow restarting an interrupted incremental recovery.
md: clear In_sync bit on devices added to an active array.
md: add proper write-congestion reporting to RAID1 and RAID10.
md: rename "mdk_personality" to "md_personality"
md/bitmap remove fault injection options.
md/raid5: typedef removal: raid5_conf_t -> struct r5conf
md/raid1: typedef removal: conf_t -> struct r1conf
md/raid10: typedef removal: conf_t -> struct r10conf
md/raid0: typedef removal: raid0_conf_t -> struct r0conf
md/multipath: typedef removal: multipath_conf_t -> struct mpconf
md/linear: typedef removal: linear_conf_t -> struct linear_conf
md/faulty: remove typedef: conf_t -> struct faulty_conf
md/linear: remove typedefs: dev_info_t -> struct dev_info
md: remove typedefs: mirror_info_t -> struct mirror_info
md: remove typedefs: r10bio_t -> struct r10bio and r1bio_t -> struct r1bio
md: remove typedefs: mdk_thread_t -> struct md_thread
...
Diffstat (limited to 'drivers/md/dm-raid.c')
-rw-r--r-- | drivers/md/dm-raid.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 86df8b2cf927..37a37266a1e3 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c | |||
@@ -37,7 +37,7 @@ struct raid_dev { | |||
37 | */ | 37 | */ |
38 | struct dm_dev *meta_dev; | 38 | struct dm_dev *meta_dev; |
39 | struct dm_dev *data_dev; | 39 | struct dm_dev *data_dev; |
40 | struct mdk_rdev_s rdev; | 40 | struct md_rdev rdev; |
41 | }; | 41 | }; |
42 | 42 | ||
43 | /* | 43 | /* |
@@ -57,7 +57,7 @@ struct raid_set { | |||
57 | 57 | ||
58 | uint64_t print_flags; | 58 | uint64_t print_flags; |
59 | 59 | ||
60 | struct mddev_s md; | 60 | struct mddev md; |
61 | struct raid_type *raid_type; | 61 | struct raid_type *raid_type; |
62 | struct dm_target_callbacks callbacks; | 62 | struct dm_target_callbacks callbacks; |
63 | 63 | ||
@@ -594,7 +594,7 @@ struct dm_raid_superblock { | |||
594 | /* Always set to 0 when writing. */ | 594 | /* Always set to 0 when writing. */ |
595 | } __packed; | 595 | } __packed; |
596 | 596 | ||
597 | static int read_disk_sb(mdk_rdev_t *rdev, int size) | 597 | static int read_disk_sb(struct md_rdev *rdev, int size) |
598 | { | 598 | { |
599 | BUG_ON(!rdev->sb_page); | 599 | BUG_ON(!rdev->sb_page); |
600 | 600 | ||
@@ -611,9 +611,9 @@ static int read_disk_sb(mdk_rdev_t *rdev, int size) | |||
611 | return 0; | 611 | return 0; |
612 | } | 612 | } |
613 | 613 | ||
614 | static void super_sync(mddev_t *mddev, mdk_rdev_t *rdev) | 614 | static void super_sync(struct mddev *mddev, struct md_rdev *rdev) |
615 | { | 615 | { |
616 | mdk_rdev_t *r, *t; | 616 | struct md_rdev *r, *t; |
617 | uint64_t failed_devices; | 617 | uint64_t failed_devices; |
618 | struct dm_raid_superblock *sb; | 618 | struct dm_raid_superblock *sb; |
619 | 619 | ||
@@ -651,7 +651,7 @@ static void super_sync(mddev_t *mddev, mdk_rdev_t *rdev) | |||
651 | * | 651 | * |
652 | * Return: 1 if use rdev, 0 if use refdev, -Exxx otherwise | 652 | * Return: 1 if use rdev, 0 if use refdev, -Exxx otherwise |
653 | */ | 653 | */ |
654 | static int super_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev) | 654 | static int super_load(struct md_rdev *rdev, struct md_rdev *refdev) |
655 | { | 655 | { |
656 | int ret; | 656 | int ret; |
657 | struct dm_raid_superblock *sb; | 657 | struct dm_raid_superblock *sb; |
@@ -689,7 +689,7 @@ static int super_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev) | |||
689 | return (events_sb > events_refsb) ? 1 : 0; | 689 | return (events_sb > events_refsb) ? 1 : 0; |
690 | } | 690 | } |
691 | 691 | ||
692 | static int super_init_validation(mddev_t *mddev, mdk_rdev_t *rdev) | 692 | static int super_init_validation(struct mddev *mddev, struct md_rdev *rdev) |
693 | { | 693 | { |
694 | int role; | 694 | int role; |
695 | struct raid_set *rs = container_of(mddev, struct raid_set, md); | 695 | struct raid_set *rs = container_of(mddev, struct raid_set, md); |
@@ -698,7 +698,7 @@ static int super_init_validation(mddev_t *mddev, mdk_rdev_t *rdev) | |||
698 | struct dm_raid_superblock *sb; | 698 | struct dm_raid_superblock *sb; |
699 | uint32_t new_devs = 0; | 699 | uint32_t new_devs = 0; |
700 | uint32_t rebuilds = 0; | 700 | uint32_t rebuilds = 0; |
701 | mdk_rdev_t *r, *t; | 701 | struct md_rdev *r, *t; |
702 | struct dm_raid_superblock *sb2; | 702 | struct dm_raid_superblock *sb2; |
703 | 703 | ||
704 | sb = page_address(rdev->sb_page); | 704 | sb = page_address(rdev->sb_page); |
@@ -809,7 +809,7 @@ static int super_init_validation(mddev_t *mddev, mdk_rdev_t *rdev) | |||
809 | return 0; | 809 | return 0; |
810 | } | 810 | } |
811 | 811 | ||
812 | static int super_validate(mddev_t *mddev, mdk_rdev_t *rdev) | 812 | static int super_validate(struct mddev *mddev, struct md_rdev *rdev) |
813 | { | 813 | { |
814 | struct dm_raid_superblock *sb = page_address(rdev->sb_page); | 814 | struct dm_raid_superblock *sb = page_address(rdev->sb_page); |
815 | 815 | ||
@@ -849,8 +849,8 @@ static int super_validate(mddev_t *mddev, mdk_rdev_t *rdev) | |||
849 | static int analyse_superblocks(struct dm_target *ti, struct raid_set *rs) | 849 | static int analyse_superblocks(struct dm_target *ti, struct raid_set *rs) |
850 | { | 850 | { |
851 | int ret; | 851 | int ret; |
852 | mdk_rdev_t *rdev, *freshest, *tmp; | 852 | struct md_rdev *rdev, *freshest, *tmp; |
853 | mddev_t *mddev = &rs->md; | 853 | struct mddev *mddev = &rs->md; |
854 | 854 | ||
855 | freshest = NULL; | 855 | freshest = NULL; |
856 | rdev_for_each(rdev, tmp, mddev) { | 856 | rdev_for_each(rdev, tmp, mddev) { |
@@ -1004,7 +1004,7 @@ static void raid_dtr(struct dm_target *ti) | |||
1004 | static int raid_map(struct dm_target *ti, struct bio *bio, union map_info *map_context) | 1004 | static int raid_map(struct dm_target *ti, struct bio *bio, union map_info *map_context) |
1005 | { | 1005 | { |
1006 | struct raid_set *rs = ti->private; | 1006 | struct raid_set *rs = ti->private; |
1007 | mddev_t *mddev = &rs->md; | 1007 | struct mddev *mddev = &rs->md; |
1008 | 1008 | ||
1009 | mddev->pers->make_request(mddev, bio); | 1009 | mddev->pers->make_request(mddev, bio); |
1010 | 1010 | ||
@@ -1097,7 +1097,7 @@ static int raid_status(struct dm_target *ti, status_type_t type, | |||
1097 | rs->md.bitmap_info.max_write_behind); | 1097 | rs->md.bitmap_info.max_write_behind); |
1098 | 1098 | ||
1099 | if (rs->print_flags & DMPF_STRIPE_CACHE) { | 1099 | if (rs->print_flags & DMPF_STRIPE_CACHE) { |
1100 | raid5_conf_t *conf = rs->md.private; | 1100 | struct r5conf *conf = rs->md.private; |
1101 | 1101 | ||
1102 | /* convert from kiB to sectors */ | 1102 | /* convert from kiB to sectors */ |
1103 | DMEMIT(" stripe_cache %d", | 1103 | DMEMIT(" stripe_cache %d", |
@@ -1146,7 +1146,7 @@ static void raid_io_hints(struct dm_target *ti, struct queue_limits *limits) | |||
1146 | { | 1146 | { |
1147 | struct raid_set *rs = ti->private; | 1147 | struct raid_set *rs = ti->private; |
1148 | unsigned chunk_size = rs->md.chunk_sectors << 9; | 1148 | unsigned chunk_size = rs->md.chunk_sectors << 9; |
1149 | raid5_conf_t *conf = rs->md.private; | 1149 | struct r5conf *conf = rs->md.private; |
1150 | 1150 | ||
1151 | blk_limits_io_min(limits, chunk_size); | 1151 | blk_limits_io_min(limits, chunk_size); |
1152 | blk_limits_io_opt(limits, chunk_size * (conf->raid_disks - conf->max_degraded)); | 1152 | blk_limits_io_opt(limits, chunk_size * (conf->raid_disks - conf->max_degraded)); |