3 #include <linux/device.h>
4 #include <linux/slab.h>
5 #include <linux/module.h>
6 #include <linux/ctype.h>
15 #ifdef CONFIG_DEBUG_FS
30 static struct dentry *ceph_debugfs_dir;
32 static int monmap_show(
struct seq_file *
s,
void *
p)
41 for (i = 0; i < client->
monc.monmap->num_mon; i++) {
43 &client->
monc.monmap->mon_inst[
i];
52 static int osdmap_show(
struct seq_file *s,
void *p)
69 seq_printf(s,
"pg_pool %d pg_num %d / %d, lpg_num %d / %d\n",
73 for (i = 0; i < client->
osdc.osdmap->max_osd; i++) {
75 &client->
osdc.osdmap->osd_addr[
i];
81 ((client->
osdc.osdmap->osd_weight[i]*100) >> 16),
87 static int monc_show(
struct seq_file *s,
void *p)
117 static int osdc_show(
struct seq_file *s,
void *
pp)
140 op = (
void *)(head + 1);
145 (
const char *)(head->
ops + num_ops));
154 for (i = 0; i <
num_ops; i++) {
174 if (!ceph_debugfs_dir)
189 snprintf(name,
sizeof(name),
"%pU.client%lld", &client->
fsid,
190 client->
monc.auth->global_id);
192 dout(
"ceph_debugfs_client_init %p %s\n", client, name);
194 BUG_ON(client->debugfs_dir);
196 if (!client->debugfs_dir)
204 if (!client->
monc.debugfs_file)
212 if (!client->
osdc.debugfs_file)
220 if (!client->debugfs_monmap)
228 if (!client->debugfs_osdmap)
240 dout(
"ceph_debugfs_client_cleanup %p\n", client);