Skip to content

Commit

Permalink
md: removing typedefs: mdk_rdev_t -> struct md_rdev
Browse files Browse the repository at this point in the history
The typedefs are just annoying. 'mdk' probably refers to 'md_k.h'
which used to be an include file that defined this thing.

Signed-off-by: NeilBrown <[email protected]>
  • Loading branch information
neilbrown committed Oct 11, 2011
1 parent 50de8df commit 3cb0300
Show file tree
Hide file tree
Showing 17 changed files with 219 additions and 219 deletions.
8 changes: 4 additions & 4 deletions drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ static struct page *read_sb_page(mddev_t *mddev, loff_t offset,
{
/* choose a good rdev and read the page from there */

mdk_rdev_t *rdev;
struct md_rdev *rdev;
sector_t target;
int did_alloc = 0;

Expand Down Expand Up @@ -218,7 +218,7 @@ static struct page *read_sb_page(mddev_t *mddev, loff_t offset,

}

static mdk_rdev_t *next_active_rdev(mdk_rdev_t *rdev, mddev_t *mddev)
static struct md_rdev *next_active_rdev(struct md_rdev *rdev, mddev_t *mddev)
{
/* Iterate the disks of an mddev, using rcu to protect access to the
* linked list, and raising the refcount of devices we return to ensure
Expand All @@ -239,7 +239,7 @@ static mdk_rdev_t *next_active_rdev(mdk_rdev_t *rdev, mddev_t *mddev)
pos = &rdev->same_set;
}
list_for_each_continue_rcu(pos, &mddev->disks) {
rdev = list_entry(pos, mdk_rdev_t, same_set);
rdev = list_entry(pos, struct md_rdev, same_set);
if (rdev->raid_disk >= 0 &&
!test_bit(Faulty, &rdev->flags)) {
/* this is a usable devices */
Expand All @@ -254,7 +254,7 @@ static mdk_rdev_t *next_active_rdev(mdk_rdev_t *rdev, mddev_t *mddev)

static int write_sb_page(struct bitmap *bitmap, struct page *page, int wait)
{
mdk_rdev_t *rdev = NULL;
struct md_rdev *rdev = NULL;
struct block_device *bdev;
mddev_t *mddev = bitmap->mddev;

Expand Down
18 changes: 9 additions & 9 deletions drivers/md/dm-raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct raid_dev {
*/
struct dm_dev *meta_dev;
struct dm_dev *data_dev;
struct mdk_rdev_s rdev;
struct md_rdev rdev;
};

/*
Expand Down Expand Up @@ -594,7 +594,7 @@ struct dm_raid_superblock {
/* Always set to 0 when writing. */
} __packed;

static int read_disk_sb(mdk_rdev_t *rdev, int size)
static int read_disk_sb(struct md_rdev *rdev, int size)
{
BUG_ON(!rdev->sb_page);

Expand All @@ -611,9 +611,9 @@ static int read_disk_sb(mdk_rdev_t *rdev, int size)
return 0;
}

static void super_sync(mddev_t *mddev, mdk_rdev_t *rdev)
static void super_sync(mddev_t *mddev, struct md_rdev *rdev)
{
mdk_rdev_t *r, *t;
struct md_rdev *r, *t;
uint64_t failed_devices;
struct dm_raid_superblock *sb;

Expand Down Expand Up @@ -651,7 +651,7 @@ static void super_sync(mddev_t *mddev, mdk_rdev_t *rdev)
*
* Return: 1 if use rdev, 0 if use refdev, -Exxx otherwise
*/
static int super_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev)
static int super_load(struct md_rdev *rdev, struct md_rdev *refdev)
{
int ret;
struct dm_raid_superblock *sb;
Expand Down Expand Up @@ -689,7 +689,7 @@ static int super_load(mdk_rdev_t *rdev, mdk_rdev_t *refdev)
return (events_sb > events_refsb) ? 1 : 0;
}

static int super_init_validation(mddev_t *mddev, mdk_rdev_t *rdev)
static int super_init_validation(mddev_t *mddev, struct md_rdev *rdev)
{
int role;
struct raid_set *rs = container_of(mddev, struct raid_set, md);
Expand All @@ -698,7 +698,7 @@ static int super_init_validation(mddev_t *mddev, mdk_rdev_t *rdev)
struct dm_raid_superblock *sb;
uint32_t new_devs = 0;
uint32_t rebuilds = 0;
mdk_rdev_t *r, *t;
struct md_rdev *r, *t;
struct dm_raid_superblock *sb2;

sb = page_address(rdev->sb_page);
Expand Down Expand Up @@ -809,7 +809,7 @@ static int super_init_validation(mddev_t *mddev, mdk_rdev_t *rdev)
return 0;
}

static int super_validate(mddev_t *mddev, mdk_rdev_t *rdev)
static int super_validate(mddev_t *mddev, struct md_rdev *rdev)
{
struct dm_raid_superblock *sb = page_address(rdev->sb_page);

Expand Down Expand Up @@ -849,7 +849,7 @@ static int super_validate(mddev_t *mddev, mdk_rdev_t *rdev)
static int analyse_superblocks(struct dm_target *ti, struct raid_set *rs)
{
int ret;
mdk_rdev_t *rdev, *freshest, *tmp;
struct md_rdev *rdev, *freshest, *tmp;
mddev_t *mddev = &rs->md;

freshest = NULL;
Expand Down
4 changes: 2 additions & 2 deletions drivers/md/faulty.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ typedef struct faulty_conf {
sector_t faults[MaxFault];
int modes[MaxFault];
int nfaults;
mdk_rdev_t *rdev;
struct md_rdev *rdev;
} conf_t;

static int check_mode(conf_t *conf, int mode)
Expand Down Expand Up @@ -297,7 +297,7 @@ static sector_t faulty_size(mddev_t *mddev, sector_t sectors, int raid_disks)

static int run(mddev_t *mddev)
{
mdk_rdev_t *rdev;
struct md_rdev *rdev;
int i;
conf_t *conf;

Expand Down
4 changes: 2 additions & 2 deletions drivers/md/linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ static sector_t linear_size(mddev_t *mddev, sector_t sectors, int raid_disks)
static linear_conf_t *linear_conf(mddev_t *mddev, int raid_disks)
{
linear_conf_t *conf;
mdk_rdev_t *rdev;
struct md_rdev *rdev;
int i, cnt;

conf = kzalloc (sizeof (*conf) + raid_disks*sizeof(dev_info_t),
Expand Down Expand Up @@ -213,7 +213,7 @@ static int linear_run (mddev_t *mddev)
return md_integrity_register(mddev);
}

static int linear_add(mddev_t *mddev, mdk_rdev_t *rdev)
static int linear_add(mddev_t *mddev, struct md_rdev *rdev)
{
/* Adding a drive to a linear array allows the array to grow.
* It is permitted if the new drive has a matching superblock
Expand Down
2 changes: 1 addition & 1 deletion drivers/md/linear.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define _LINEAR_H

struct dev_info {
mdk_rdev_t *rdev;
struct md_rdev *rdev;
sector_t end_sector;
};

Expand Down
Loading

0 comments on commit 3cb0300

Please sign in to comment.