aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2014-03-13 10:36:13 -0400
committerSage Weil <sage@inktank.com>2014-04-05 00:07:34 -0400
commit1c00240e007d14d3242fa490b50166b4f1b2770a (patch)
tree8f3ca874443a8a4c1d83fb26a64c3ec666b77cbf /net/ceph
parent0a2800d7280ccdf3194bd8bd74a2eb8c315b54c6 (diff)
libceph: dump pg_temp mappings to debugfs
Dump pg_temp mappings to /sys/kernel/debug/ceph/<client>/osdmap, one 'pg_temp <pgid> [<osd>, ..., <osd>]' per line, e.g: pg_temp 2.6 [2,3,4] Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'net/ceph')
-rw-r--r--net/ceph/debugfs.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/ceph/debugfs.c b/net/ceph/debugfs.c
index 112d98edb156..c45d235e774e 100644
--- a/net/ceph/debugfs.c
+++ b/net/ceph/debugfs.c
@@ -82,6 +82,17 @@ static int osdmap_show(struct seq_file *s, void *p)
82 ((map->osd_weight[i]*100) >> 16), 82 ((map->osd_weight[i]*100) >> 16),
83 ceph_osdmap_state_str(sb, sizeof(sb), state)); 83 ceph_osdmap_state_str(sb, sizeof(sb), state));
84 } 84 }
85 for (n = rb_first(&map->pg_temp); n; n = rb_next(n)) {
86 struct ceph_pg_mapping *pg =
87 rb_entry(n, struct ceph_pg_mapping, node);
88
89 seq_printf(s, "pg_temp %llu.%x [", pg->pgid.pool,
90 pg->pgid.seed);
91 for (i = 0; i < pg->len; i++)
92 seq_printf(s, "%s%d", (i == 0 ? "" : ","),
93 pg->osds[i]);
94 seq_printf(s, "]\n");
95 }
85 96
86 return 0; 97 return 0;
87} 98}