diff options
author | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-03-21 18:05:29 +0100 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2014-04-05 06:07:58 +0200 |
commit | 9686f94c8cfc06e8afb7b2233ab8f1f6ac01957f (patch) | |
tree | 3564192f1d42c7ac6caeafa0becd3bac88704538 /net/ceph/debugfs.c | |
parent | libceph: generalize ceph_pg_mapping (diff) | |
download | linux-9686f94c8cfc06e8afb7b2233ab8f1f6ac01957f.tar.xz linux-9686f94c8cfc06e8afb7b2233ab8f1f6ac01957f.zip |
libceph: primary_temp infrastructure
Add primary_temp mappings infrastructure. struct ceph_pg_mapping is
overloaded, primary_temp mappings are stored in an rb-tree, rooted at
ceph_osdmap, in a manner similar to pg_temp mappings.
Dump primary_temp mappings to /sys/kernel/debug/ceph/<client>/osdmap,
one 'primary_temp <pgid> <osd>' per line, e.g:
primary_temp 2.6 4
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'net/ceph/debugfs.c')
-rw-r--r-- | net/ceph/debugfs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/ceph/debugfs.c b/net/ceph/debugfs.c index 5865f2c9580a..612bf55e6a8b 100644 --- a/net/ceph/debugfs.c +++ b/net/ceph/debugfs.c @@ -93,6 +93,13 @@ static int osdmap_show(struct seq_file *s, void *p) pg->pg_temp.osds[i]); seq_printf(s, "]\n"); } + for (n = rb_first(&map->primary_temp); n; n = rb_next(n)) { + struct ceph_pg_mapping *pg = + rb_entry(n, struct ceph_pg_mapping, node); + + seq_printf(s, "primary_temp %llu.%x %d\n", pg->pgid.pool, + pg->pgid.seed, pg->primary_temp.osd); + } return 0; } |