mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]>
Reviewed-by: Alex Elder <[email protected]>
This commit is contained in:
parent
0a2800d728
commit
1c00240e00
1 changed files with 11 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue