@@ -1413,12 +1413,12 @@ struct lu_tgt_pool {
struct rw_semaphore op_rw_sem; /* to protect lu_tgt_pool use */
};
-int tgt_pool_init(struct lu_tgt_pool *op, unsigned int count);
-int tgt_pool_add(struct lu_tgt_pool *op, u32 idx, unsigned int min_count);
-int tgt_pool_remove(struct lu_tgt_pool *op, u32 idx);
-int tgt_pool_free(struct lu_tgt_pool *op);
-int tgt_check_index(int idx, struct lu_tgt_pool *osts);
-int tgt_pool_extend(struct lu_tgt_pool *op, unsigned int min_count);
+int lu_tgt_pool_init(struct lu_tgt_pool *op, unsigned int count);
+int lu_tgt_pool_add(struct lu_tgt_pool *op, u32 idx, unsigned int min_count);
+int lu_tgt_pool_remove(struct lu_tgt_pool *op, u32 idx);
+int lu_tgt_pool_free(struct lu_tgt_pool *op);
+int lu_tgt_check_index(int idx, struct lu_tgt_pool *osts);
+int lu_tgt_pool_extend(struct lu_tgt_pool *op, unsigned int min_count);
/* bitflags used in rr / qos allocation */
enum lq_flag {
@@ -95,7 +95,7 @@ void lov_tgts_putref(struct obd_device *obd)
* being the maximum tgt index for computing the
* mds_max_easize. So we can't shrink it.
*/
- tgt_pool_remove(&lov->lov_packed, i);
+ lu_tgt_pool_remove(&lov->lov_packed, i);
lov->lov_tgts[i] = NULL;
lov->lov_death_row--;
}
@@ -544,7 +544,7 @@ static int lov_add_target(struct obd_device *obd, struct obd_uuid *uuidp,
return -ENOMEM;
}
- rc = tgt_pool_add(&lov->lov_packed, index, lov->lov_tgt_size);
+ rc = lu_tgt_pool_add(&lov->lov_packed, index, lov->lov_tgt_size);
if (rc) {
mutex_unlock(&lov->lov_lock);
kfree(tgt);
@@ -763,7 +763,7 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
if (rc)
goto out_hash;
- rc = tgt_pool_init(&lov->lov_packed, 0);
+ rc = lu_tgt_pool_init(&lov->lov_packed, 0);
if (rc)
goto out_pool;
@@ -777,7 +777,7 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
return 0;
out_tunables:
- tgt_pool_free(&lov->lov_packed);
+ lu_tgt_pool_free(&lov->lov_packed);
out_pool:
lov_pool_hash_destroy(&lov->lov_pools_hash_body);
out_hash:
@@ -804,7 +804,7 @@ static int lov_cleanup(struct obd_device *obd)
lov_pool_del(obd, pool->pool_name);
}
lov_pool_hash_destroy(&lov->lov_pools_hash_body);
- tgt_pool_free(&lov->lov_packed);
+ lu_tgt_pool_free(&lov->lov_packed);
lprocfs_obd_cleanup(obd);
if (lov->lov_tgts) {
@@ -1254,7 +1254,7 @@ static int lov_quotactl(struct obd_device *obd, struct obd_export *exp,
continue;
if (pool &&
- tgt_check_index(tgt->ltd_index, &pool->pool_obds))
+ lu_tgt_check_index(tgt->ltd_index, &pool->pool_obds))
continue;
if (!tgt->ltd_active || tgt->ltd_reap) {
@@ -82,7 +82,7 @@ void lov_pool_putref(struct pool_desc *pool)
CDEBUG(D_INFO, "pool %p\n", pool);
if (atomic_dec_and_test(&pool->pool_refcount)) {
LASSERT(list_empty(&pool->pool_list));
- tgt_pool_free(&pool->pool_obds);
+ lu_tgt_pool_free(&pool->pool_obds);
kfree_rcu(pool, rcu);
}
}
@@ -268,7 +268,7 @@ int lov_pool_new(struct obd_device *obd, char *poolname)
* up to deletion
*/
atomic_set(&new_pool->pool_refcount, 1);
- rc = tgt_pool_init(&new_pool->pool_obds, 0);
+ rc = lu_tgt_pool_init(&new_pool->pool_obds, 0);
if (rc)
goto out_err;
@@ -310,7 +310,7 @@ int lov_pool_new(struct obd_device *obd, char *poolname)
lov->lov_pool_count--;
spin_unlock(&obd->obd_dev_lock);
debugfs_remove_recursive(new_pool->pool_debugfs_entry);
- tgt_pool_free(&new_pool->pool_obds);
+ lu_tgt_pool_free(&new_pool->pool_obds);
kfree(new_pool);
return rc;
@@ -401,7 +401,7 @@ int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname)
goto out;
}
- rc = tgt_pool_add(&pool->pool_obds, lov_idx, lov->lov_tgt_size);
+ rc = lu_tgt_pool_add(&pool->pool_obds, lov_idx, lov->lov_tgt_size);
if (rc)
goto out;
@@ -453,7 +453,7 @@ int lov_pool_remove(struct obd_device *obd, char *poolname, char *ostname)
goto out;
}
- tgt_pool_remove(&pool->pool_obds, lov_idx);
+ lu_tgt_pool_remove(&pool->pool_obds, lov_idx);
CDEBUG(D_CONFIG, "%s removed from " LOV_POOLNAMEF "\n", ostname,
poolname);
@@ -29,7 +29,7 @@
* This file is part of Lustre, http://www.lustre.org/
*/
/*
- * lustre/target/tgt_pool.c
+ * lustre/obdclass/lu_tgt_pool.c
*
* This file handles creation, lookup, and removal of pools themselves, as
* well as adding and removing targets to pools.
@@ -60,7 +60,7 @@
* negative error number on failure
*/
#define POOL_INIT_COUNT 2
-int tgt_pool_init(struct lu_tgt_pool *op, unsigned int count)
+int lu_tgt_pool_init(struct lu_tgt_pool *op, unsigned int count)
{
if (count == 0)
count = POOL_INIT_COUNT;
@@ -77,7 +77,7 @@ int tgt_pool_init(struct lu_tgt_pool *op, unsigned int count)
return 0;
}
-EXPORT_SYMBOL(tgt_pool_init);
+EXPORT_SYMBOL(lu_tgt_pool_init);
/**
* Increase the op_array size to hold more targets in this pool.
@@ -92,7 +92,7 @@ int tgt_pool_init(struct lu_tgt_pool *op, unsigned int count)
* Return: 0 on success
* negative error number on failure.
*/
-int tgt_pool_extend(struct lu_tgt_pool *op, unsigned int min_count)
+int lu_tgt_pool_extend(struct lu_tgt_pool *op, unsigned int min_count)
{
u32 *new;
u32 new_size;
@@ -116,7 +116,7 @@ int tgt_pool_extend(struct lu_tgt_pool *op, unsigned int min_count)
return 0;
}
-EXPORT_SYMBOL(tgt_pool_extend);
+EXPORT_SYMBOL(lu_tgt_pool_extend);
/**
* Add a new target to an existing pool.
@@ -131,14 +131,14 @@ int tgt_pool_extend(struct lu_tgt_pool *op, unsigned int min_count)
* Return: 0 if target could be added to the pool
* negative error if target \a idx was not added
*/
-int tgt_pool_add(struct lu_tgt_pool *op, u32 idx, unsigned int min_count)
+int lu_tgt_pool_add(struct lu_tgt_pool *op, u32 idx, unsigned int min_count)
{
unsigned int i;
int rc = 0;
down_write(&op->op_rw_sem);
- rc = tgt_pool_extend(op, min_count);
+ rc = lu_tgt_pool_extend(op, min_count);
if (rc)
goto out;
@@ -156,7 +156,7 @@ int tgt_pool_add(struct lu_tgt_pool *op, u32 idx, unsigned int min_count)
up_write(&op->op_rw_sem);
return rc;
}
-EXPORT_SYMBOL(tgt_pool_add);
+EXPORT_SYMBOL(lu_tgt_pool_add);
/**
* Remove an existing pool from the system.
@@ -172,7 +172,7 @@ int tgt_pool_add(struct lu_tgt_pool *op, u32 idx, unsigned int min_count)
* Return: 0 on success
* negative error number on failure
*/
-int tgt_pool_remove(struct lu_tgt_pool *op, u32 idx)
+int lu_tgt_pool_remove(struct lu_tgt_pool *op, u32 idx)
{
unsigned int i;
@@ -192,9 +192,9 @@ int tgt_pool_remove(struct lu_tgt_pool *op, u32 idx)
up_write(&op->op_rw_sem);
return -EINVAL;
}
-EXPORT_SYMBOL(tgt_pool_remove);
+EXPORT_SYMBOL(lu_tgt_pool_remove);
-int tgt_check_index(int idx, struct lu_tgt_pool *osts)
+int lu_tgt_check_index(int idx, struct lu_tgt_pool *osts)
{
int rc = 0, i;
@@ -208,7 +208,7 @@ int tgt_check_index(int idx, struct lu_tgt_pool *osts)
up_read(&osts->op_rw_sem);
return rc;
}
-EXPORT_SYMBOL(tgt_check_index);
+EXPORT_SYMBOL(lu_tgt_check_index);
/**
* Free the pool after it was emptied and removed from /proc.
@@ -221,7 +221,7 @@ int tgt_check_index(int idx, struct lu_tgt_pool *osts)
*
* Return: 0 on success or if pool was already freed
*/
-int tgt_pool_free(struct lu_tgt_pool *op)
+int lu_tgt_pool_free(struct lu_tgt_pool *op)
{
if (op->op_size == 0)
return 0;
@@ -236,4 +236,4 @@ int tgt_pool_free(struct lu_tgt_pool *op)
up_write(&op->op_rw_sem);
return 0;
}
-EXPORT_SYMBOL(tgt_pool_free);
+EXPORT_SYMBOL(lu_tgt_pool_free);