More variable renaming. --- diff/drivers/md/dm-mpath.c 2004-09-28 15:46:19.000000000 +0100 +++ source/drivers/md/dm-mpath.c 2004-09-28 16:07:46.000000000 +0100 @@ -81,7 +81,7 @@ * We must use a mempool of mpath_io structs so that we * can resubmit bios on error. */ - mempool_t *details_pool; + mempool_t *mpio_pool; }; struct mpath_io { @@ -90,7 +90,7 @@ }; #define MIN_IOS 256 -static kmem_cache_t *_details_cache; +static kmem_cache_t *_mpio_cache; static void dispatch_failed_ios(void *data); static void trigger_event(void *data); @@ -163,9 +163,9 @@ m->lock = SPIN_LOCK_UNLOCKED; INIT_WORK(&m->dispatch_failed, dispatch_failed_ios, m); INIT_WORK(&m->trigger_event, trigger_event, m); - m->details_pool = mempool_create(MIN_IOS, mempool_alloc_slab, - mempool_free_slab, _details_cache); - if (!m->details_pool) { + m->mpio_pool = mempool_create(MIN_IOS, mempool_alloc_slab, + mempool_free_slab, _mpio_cache); + if (!m->mpio_pool) { kfree(m); return NULL; } @@ -183,7 +183,7 @@ free_priority_group(pg, m->ti); } - mempool_destroy(m->details_pool); + mempool_destroy(m->mpio_pool); kfree(m); } @@ -483,23 +483,23 @@ } static int multipath_map(struct dm_target *ti, struct bio *bio, - union map_info *map_context) + union map_info *info) { int r; - struct mpath_io *io; + struct mpath_io *mpio; struct multipath *m = (struct multipath *) ti->private; - io = mempool_alloc(m->details_pool, GFP_NOIO); - dm_bio_record(&io->details, bio); + mpio = mempool_alloc(m->mpio_pool, GFP_NOIO); + dm_bio_record(&mpio->details, bio); bio->bi_rw |= (1 << BIO_RW_FAILFAST); - r = map_io(m, bio, &io->path); + r = map_io(m, bio, &mpio->path); if (r) { - mempool_free(io, m->details_pool); + mempool_free(mpio, m->mpio_pool); return r; } - map_context->ptr = io; + info->ptr = mpio; return 1; } @@ -531,7 +531,7 @@ } static int do_end_io(struct multipath *m, struct bio *bio, - int error, struct mpath_io *io) + int error, struct mpath_io *mpio) { int r; @@ -543,11 +543,11 @@ } spin_unlock(&m->lock); - fail_path(io->path); + fail_path(mpio->path); /* remap */ - dm_bio_restore(&io->details, bio); - r = map_io(m, bio, &io->path); + dm_bio_restore(&mpio->details, bio); + r = map_io(m, bio, &mpio->path); if (r) /* no paths left */ return -EIO; @@ -565,15 +565,15 @@ } static int multipath_end_io(struct dm_target *ti, struct bio *bio, - int error, union map_info *map_context) + int error, union map_info *info) { struct multipath *m = (struct multipath *) ti->private; - struct mpath_io *io = (struct mpath_io *) map_context->ptr; + struct mpath_io *mpio = (struct mpath_io *) info->ptr; int r; - r = do_end_io(m, bio, error, io); + r = do_end_io(m, bio, error, mpio); if (r <= 0) - mempool_free(io, m->details_pool); + mempool_free(mpio, m->mpio_pool); return r; } @@ -654,22 +654,22 @@ int r; /* allocate a slab for the dm_ios */ - _details_cache = kmem_cache_create("dm_mpath", sizeof(struct mpath_io), + _mpio_cache = kmem_cache_create("dm_mpath", sizeof(struct mpath_io), 0, 0, NULL, NULL); - if (!_details_cache) + if (!_mpio_cache) return -ENOMEM; r = dm_register_target(&multipath_target); if (r < 0) { DMERR("%s: register failed %d", multipath_target.name, r); - kmem_cache_destroy(_details_cache); + kmem_cache_destroy(_mpio_cache); return -EINVAL; } r = dm_register_path_selectors(); if (r && r != -EEXIST) { dm_unregister_target(&multipath_target); - kmem_cache_destroy(_details_cache); + kmem_cache_destroy(_mpio_cache); return r; } @@ -686,7 +686,7 @@ if (r < 0) DMERR("%s: target unregister failed %d", multipath_target.name, r); - kmem_cache_destroy(_details_cache); + kmem_cache_destroy(_mpio_cache); } module_init(dm_multipath_init);