diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-01-20 14:01:31 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-01-20 14:01:31 -0300 |
commit | b4b7ff4b08e691656c9d77c758fc355833128ac0 (patch) | |
tree | 82fcb00e6b918026dc9f2d1f05ed8eee83874cc0 /drivers/staging/lustre/lustre/lov/lov_pool.c | |
parent | 35acfa0fc609f2a2cd95cef4a6a9c3a5c38f1778 (diff) |
Linux-libre 4.4-gnupck-4.4-gnu
Diffstat (limited to 'drivers/staging/lustre/lustre/lov/lov_pool.c')
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_pool.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lov_pool.c b/drivers/staging/lustre/lustre/lov/lov_pool.c index c59b14026..b03827ef6 100644 --- a/drivers/staging/lustre/lustre/lov/lov_pool.c +++ b/drivers/staging/lustre/lustre/lov/lov_pool.c @@ -142,12 +142,12 @@ static void pool_hashrefcount_put_locked(struct cfs_hash *hs, lov_pool_putref_locked(pool); } -cfs_hash_ops_t pool_hash_operations = { +struct cfs_hash_ops pool_hash_operations = { .hs_hash = pool_hashfn, - .hs_key = pool_key, + .hs_key = pool_key, .hs_keycmp = pool_hashkey_keycmp, .hs_object = pool_hashobject, - .hs_get = pool_hashrefcount_get, + .hs_get = pool_hashrefcount_get, .hs_put_locked = pool_hashrefcount_put_locked, }; @@ -282,6 +282,7 @@ static int pool_proc_open(struct inode *inode, struct file *file) rc = seq_open(file, &pool_proc_ops); if (!rc) { struct seq_file *s = file->private_data; + s->private = inode->i_private; } return rc; @@ -294,28 +295,6 @@ static struct file_operations pool_proc_operations = { .release = seq_release, }; -void lov_dump_pool(int level, struct pool_desc *pool) -{ - int i; - - lov_pool_getref(pool); - - CDEBUG(level, "pool "LOV_POOLNAMEF" has %d members\n", - pool->pool_name, pool->pool_obds.op_count); - down_read(&pool_tgt_rw_sem(pool)); - - for (i = 0; i < pool_tgt_count(pool) ; i++) { - if (!pool_tgt(pool, i) || !(pool_tgt(pool, i))->ltd_exp) - continue; - CDEBUG(level, "pool "LOV_POOLNAMEF"[%d] = %s\n", - pool->pool_name, i, - obd_uuid2str(&((pool_tgt(pool, i))->ltd_uuid))); - } - - up_read(&pool_tgt_rw_sem(pool)); - lov_pool_putref(pool); -} - #define LOV_POOL_INIT_COUNT 2 int lov_ost_pool_init(struct ost_pool *op, unsigned int count) { @@ -418,7 +397,6 @@ int lov_ost_pool_free(struct ost_pool *op) return 0; } - int lov_pool_new(struct obd_device *obd, char *poolname) { struct lov_obd *lov; @@ -530,7 +508,6 @@ int lov_pool_del(struct obd_device *obd, char *poolname) return 0; } - int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname) { struct obd_uuid ost_uuid; @@ -547,7 +524,6 @@ int lov_pool_add(struct obd_device *obd, char *poolname, char *ostname) obd_str2uuid(&ost_uuid, ostname); - /* search ost in lov array */ obd_getref(obd); for (lov_idx = 0; lov_idx < lov->desc.ld_tgt_count; lov_idx++) { |