if (page == NULL)
return -ENOMEM;
- LPROCFS_ENTRY();
+ if (LPROCFS_ENTRY_AND_CHECK(dp))
+ return -ENOENT;
+
OBD_FAIL_TIMEOUT(OBD_FAIL_LPROC_REMOVE, 10);
- if (!dp->deleted && dp->read_proc)
+ if (dp->read_proc)
rc = dp->read_proc(page, &start, *ppos, CFS_PAGE_SIZE,
&eof, dp->data);
LPROCFS_EXIT();
struct proc_dir_entry *dp = PDE(f->f_dentry->d_inode);
int rc = -EIO;
- LPROCFS_ENTRY();
- if (!dp->deleted && dp->write_proc)
+ if (LPROCFS_ENTRY_AND_CHECK(dp))
+ return -ENOENT;
+ if (dp->write_proc)
rc = dp->write_proc(f, buf, size, dp->data);
LPROCFS_EXIT();
return rc;
LPROCFS_CLIMP_CHECK(obd);
conn = obd->u.cli.cl_import->imp_connection;
- LASSERT(conn != NULL);
*eof = 1;
- if (obd->u.cli.cl_import) {
+ if (conn && obd->u.cli.cl_import) {
rc = snprintf(page, count, "%s\n",
conn->c_remote_uuid.uuid);
} else {
"truncate_lock",
"initial_transno",
"inode_bit_locks",
- "join_file",
+ "join_file(obsolete)",
"getattr_by_fid",
"no_oh_for_devices",
- "local_client",
"remote_client",
+ "remote_client_by_force",
"max_byte_per_rpc",
"64bit_qdata",
"mds_capability",
{
struct obd_device *obd = data;
- return snprintf(page, count, "%u\n",
+ return snprintf(page, count, "%d\n",
atomic_read(&obd->u.cli.cl_quota_resends));
}
if (rc)
return rc;
- if (val < 0)
- return -EINVAL;
-
atomic_set(&obd->u.cli.cl_quota_resends, val);
return count;
struct seq_file *seq;
int rc;
- LPROCFS_ENTRY_AND_CHECK(dp);
+ if (LPROCFS_ENTRY_AND_CHECK(dp))
+ return -ENOENT;
+
rc = seq_open(file, &lprocfs_stats_seq_sops);
if (rc) {
LPROCFS_EXIT();
LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs_async);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, packmd);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpackmd);
- LPROCFS_OBD_OP_INIT(num_private_stats, stats, checkmd);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, preallocate);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, precreate);
LPROCFS_OBD_OP_INIT(num_private_stats, stats, create);
*eof = 1;
page[0] = '\0';
lprocfs_exp_rd_cb_data_init(&cb_data, page, count, eof, &len);
- lustre_hash_for_each_key(obd->obd_nid_hash, &stats->nid,
- lprocfs_exp_print_uuid, &cb_data);
+ cfs_hash_for_each_key(obd->obd_nid_hash, &stats->nid,
+ lprocfs_exp_print_uuid, &cb_data);
return (*cb_data.len);
}
{
struct exp_uuid_cb_data *data = cb_data;
struct obd_export *exp = obj;
- lustre_hash_t *lh;
+ cfs_hash_t *hs;
- lh = exp->exp_lock_hash;
- if (lh) {
+ hs = exp->exp_lock_hash;
+ if (hs) {
if (!*data->len)
- *data->len += lustre_hash_debug_header(data->page,
- data->count);
+ *data->len += cfs_hash_debug_header(data->page,
+ data->count);
- *data->len += lustre_hash_debug_str(lh, data->page + *data->len,
- data->count);
+ *data->len += cfs_hash_debug_str(hs, data->page + *data->len,
+ data->count);
}
}
page[0] = '\0';
lprocfs_exp_rd_cb_data_init(&cb_data, page, count, eof, &len);
- lustre_hash_for_each_key(obd->obd_nid_hash, &stats->nid,
- lprocfs_exp_print_hash, &cb_data);
+ cfs_hash_for_each_key(obd->obd_nid_hash, &stats->nid,
+ lprocfs_exp_print_hash, &cb_data);
return (*cb_data.len);
}
struct nid_stat *client_stat;
CFS_LIST_HEAD(free_list);
- lustre_hash_for_each(obd->obd_nid_stats_hash,
- lprocfs_nid_stats_clear_write_cb, &free_list);
+ cfs_hash_for_each(obd->obd_nid_stats_hash,
+ lprocfs_nid_stats_clear_write_cb, &free_list);
while (!list_empty(&free_list)) {
client_stat = list_entry(free_list.next, struct nid_stat,
new_stat->nid_obd = exp->exp_obd;
atomic_set(&new_stat->nid_exp_ref_count, 0);
- old_stat = lustre_hash_findadd_unique(obd->obd_nid_stats_hash,
- nid, &new_stat->nid_hash);
+ old_stat = cfs_hash_findadd_unique(obd->obd_nid_stats_hash,
+ nid, &new_stat->nid_hash);
CDEBUG(D_INFO, "Found stats %p for nid %s - ref %d\n",
old_stat, libcfs_nid2str(*nid),
atomic_read(&new_stat->nid_exp_ref_count));
nidstat_putref(exp->exp_nid_stats);
exp->exp_nid_stats = old_stat;
} else {
- /* lustre_hash_findadd_unique() has added
+ /* cfs_hash_findadd_unique() has added
* old_stat's refcount */
nidstat_putref(old_stat);
}
destroy_new_ns:
if (new_stat->nid_proc != NULL)
lprocfs_remove(&new_stat->nid_proc);
- lustre_hash_del(obd->obd_nid_stats_hash, nid, &new_stat->nid_hash);
+ cfs_hash_del(obd->obd_nid_stats_hash, nid, &new_stat->nid_hash);
destroy_new:
OBD_FREE_PTR(new_stat);
nidstat_putref(exp->exp_nid_stats);
exp->exp_nid_stats = NULL;
- lprocfs_free_md_stats(exp->exp_obd);
return 0;
}
if (obd == NULL)
return 0;
- c += lustre_hash_debug_header(page, count);
- c += lustre_hash_debug_str(obd->obd_uuid_hash, page + c, count - c);
- c += lustre_hash_debug_str(obd->obd_nid_hash, page + c, count - c);
- c += lustre_hash_debug_str(obd->obd_nid_stats_hash, page+c, count-c);
+ c += cfs_hash_debug_header(page, count);
+ c += cfs_hash_debug_str(obd->obd_uuid_hash, page + c, count - c);
+ c += cfs_hash_debug_str(obd->obd_nid_hash, page + c, count - c);
+ c += cfs_hash_debug_str(obd->obd_nid_stats_hash, page+c, count-c);
return c;
}
EXPORT_SYMBOL(lprocfs_alloc_obd_stats);
EXPORT_SYMBOL(lprocfs_alloc_md_stats);
EXPORT_SYMBOL(lprocfs_free_obd_stats);
+EXPORT_SYMBOL(lprocfs_free_md_stats);
EXPORT_SYMBOL(lprocfs_exp_setup);
EXPORT_SYMBOL(lprocfs_exp_cleanup);