From: Ilya Dryomov Date: Thu, 13 Mar 2014 14:36:13 +0000 (+0200) Subject: libceph: dump pg_temp mappings to debugfs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1c00240e007d14d3242fa490b50166b4f1b2770a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git libceph: dump pg_temp mappings to debugfs Dump pg_temp mappings to /sys/kernel/debug/ceph//osdmap, one 'pg_temp [, ..., ]' per line, e.g: pg_temp 2.6 [2,3,4] Signed-off-by: Ilya Dryomov Reviewed-by: Alex Elder --- 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) ((map->osd_weight[i]*100) >> 16), ceph_osdmap_state_str(sb, sizeof(sb), state)); } + for (n = rb_first(&map->pg_temp); n; n = rb_next(n)) { + struct ceph_pg_mapping *pg = + rb_entry(n, struct ceph_pg_mapping, node); + + seq_printf(s, "pg_temp %llu.%x [", pg->pgid.pool, + pg->pgid.seed); + for (i = 0; i < pg->len; i++) + seq_printf(s, "%s%d", (i == 0 ? "" : ","), + pg->osds[i]); + seq_printf(s, "]\n"); + } return 0; }