*/
/*
* This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
*
* lustre/lov/lov_pool.c
*
#include <libcfs/libcfs.h>
#include <libcfs/linux/linux-hash.h>
+#include <libcfs/linux/linux-fs.h>
#include <obd.h>
#include "lov_internal.h"
if (atomic_dec_and_test(&pool->pool_refcount)) {
LASSERT(list_empty(&pool->pool_list));
LASSERT(pool->pool_proc_entry == NULL);
- tgt_pool_free(&(pool->pool_obds));
+ lu_tgt_pool_free(&(pool->pool_obds));
kfree_rcu(pool, pool_rcu);
EXIT;
}
rc = seq_open(file, &pool_proc_ops);
if (!rc) {
struct seq_file *s = file->private_data;
- s->private = PDE_DATA(inode);
+ s->private = pde_data(inode);
}
return rc;
}
-const static struct file_operations pool_proc_operations = {
- .open = pool_proc_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release,
+const static struct proc_ops pool_proc_operations = {
+ .proc_open = pool_proc_open,
+ .proc_read = seq_read,
+ .proc_lseek = seq_lseek,
+ .proc_release = seq_release,
};
#endif /* CONFIG_PROC_FS */
* 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, rc);
+ GOTO(out_free_pool, rc);
#ifdef CONFIG_PROC_FS
/* get ref for /proc file */
lov->lov_pool_count--;
spin_unlock(&obd->obd_dev_lock);
lprocfs_remove(&new_pool->pool_proc_entry);
- tgt_pool_free(&new_pool->pool_obds);
+ lu_tgt_pool_free(&new_pool->pool_obds);
+out_free_pool:
OBD_FREE_PTR(new_pool);
return rc;
if (lov_idx == lov->desc.ld_tgt_count)
GOTO(out, rc = -EINVAL);
- 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, rc);
if (lov_idx == lov->desc.ld_tgt_count)
GOTO(out, rc = -EINVAL);
- 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);