* vim:expandtab:shiftwidth=8:tabstop=8:
*
* Copyright (C) 2006 Cluster File Systems, Inc.
+ * Author: Eric Mei <ericm@clusterfs.com>
*
* This file is part of Lustre, http://www.lustre.org.
*
struct obd_device *obd = data;
struct sec_flavor_config *conf = &obd->u.cli.cl_sec_conf;
struct ptlrpc_sec *sec = NULL;
- struct ptlrpc_cli_ctx *ctx;
- struct hlist_node *pos, *next;
char flags_str[32];
- int written, i;
+ int written;
if (obd == NULL)
return 0;
"bulk checksum: %s\n"
"bulk encrypt: %s\n"
"flags: %s\n"
- "ctx cache size %u\n"
"ctx cache busy %d\n"
"gc interval %lu\n"
"gc next %ld\n",
sptlrpc_bulk_csum_alg2name(conf->sfc_bulk_csum),
sptlrpc_bulk_priv_alg2name(conf->sfc_bulk_priv),
flags_str,
- sec->ps_ccache_size,
atomic_read(&sec->ps_busy),
sec->ps_gc_interval,
sec->ps_gc_interval ?
sec->ps_gc_next - cfs_time_current_sec() : 0
);
- /*
- * list contexts
- */
- if (sec->ps_policy->sp_policy != SPTLRPC_POLICY_GSS)
- goto out;
- written += snprintf(page + written, count - written,
- "GSS contexts ==>\n");
-
- spin_lock(&sec->ps_lock);
- for (i = 0; i < sec->ps_ccache_size; i++) {
- hlist_for_each_entry_safe(ctx, pos, next,
- &sec->ps_ccache[i], cc_hash) {
- if (written >= count)
- break;
- written += sptlrpc_ctx_display(ctx, page + written,
- count - written);
- }
+ if (sec->ps_policy->sp_cops->display) {
+ written += sec->ps_policy->sp_cops->display(
+ sec, page + written, count - written);
}
- spin_unlock(&sec->ps_lock);
out:
return written;