Esempio n. 1
0
static int lprocfs_ns_locks_seq_show(struct seq_file *m, void *v)
{
	struct ldlm_namespace *ns = m->private;
	__u64		  locks;

	locks = lprocfs_stats_collector(ns->ns_stats, LDLM_NSS_LOCKS,
					LPROCFS_FIELDS_FLAGS_SUM);
	return lprocfs_rd_u64(m, &locks);
}
Esempio n. 2
0
static int lprocfs_rd_ns_locks(char *page, char **start, off_t off,
                               int count, int *eof, void *data)
{
        struct ldlm_namespace *ns = data;
        __u64                  locks;

        locks = lprocfs_stats_collector(ns->ns_stats, LDLM_NSS_LOCKS,
                                        LPROCFS_FIELDS_FLAGS_SUM);
        return lprocfs_rd_u64(page, start, off, count, eof, &locks);
}
Esempio n. 3
0
static int lprocfs_ns_resources_seq_show(struct seq_file *m, void *v)
{
	struct ldlm_namespace *ns  = m->private;
	__u64		  res = 0;
	cfs_hash_bd_t	  bd;
	int		    i;

	/* result is not strictly consistant */
	cfs_hash_for_each_bucket(ns->ns_rs_hash, &bd, i)
		res += cfs_hash_bd_count_get(&bd);
	return lprocfs_rd_u64(m, &res);
}
Esempio n. 4
0
static int lprocfs_rd_ns_resources(char *page, char **start, off_t off,
                                   int count, int *eof, void *data)
{
        struct ldlm_namespace *ns  = data;
        __u64                  res = 0;
        cfs_hash_bd_t          bd;
        int                    i;

        /* result is not strictly consistant */
        cfs_hash_for_each_bucket(ns->ns_rs_hash, &bd, i)
                res += cfs_hash_bd_count_get(&bd);
        return lprocfs_rd_u64(page, start, off, count, eof, &res);
}