libceph: switch to calc_target(), part 1
[deliverable/linux.git] / net / ceph / debugfs.c
index 593dc2eabcc803342187c1e57355f31d76b17f49..0c11ab5f8c30b2cada3b53bcd5baea936fac5370 100644 (file)
@@ -66,12 +66,14 @@ static int osdmap_show(struct seq_file *s, void *p)
                   (map->flags & CEPH_OSDMAP_FULL) ?  " FULL" : "");
 
        for (n = rb_first(&map->pg_pools); n; n = rb_next(n)) {
-               struct ceph_pg_pool_info *pool =
+               struct ceph_pg_pool_info *pi =
                        rb_entry(n, struct ceph_pg_pool_info, node);
 
-               seq_printf(s, "pool %lld pg_num %u (%d) read_tier %lld write_tier %lld\n",
-                          pool->id, pool->pg_num, pool->pg_num_mask,
-                          pool->read_tier, pool->write_tier);
+               seq_printf(s, "pool %lld '%s' type %d size %d min_size %d pg_num %u pg_num_mask %d flags 0x%llx lfor %u read_tier %lld write_tier %lld\n",
+                          pi->id, pi->name, pi->type, pi->size, pi->min_size,
+                          pi->pg_num, pi->pg_num_mask, pi->flags,
+                          pi->last_force_request_resend, pi->read_tier,
+                          pi->write_tier);
        }
        for (i = 0; i < map->max_osd; i++) {
                struct ceph_entity_addr *addr = &map->osd_addr[i];
@@ -112,15 +114,20 @@ static int monc_show(struct seq_file *s, void *p)
        struct ceph_mon_generic_request *req;
        struct ceph_mon_client *monc = &client->monc;
        struct rb_node *rp;
+       int i;
 
        mutex_lock(&monc->mutex);
 
-       if (monc->have_mdsmap)
-               seq_printf(s, "have mdsmap %u\n", (unsigned int)monc->have_mdsmap);
-       if (monc->have_osdmap)
-               seq_printf(s, "have osdmap %u\n", (unsigned int)monc->have_osdmap);
-       if (monc->want_next_osdmap)
-               seq_printf(s, "want next osdmap\n");
+       for (i = 0; i < ARRAY_SIZE(monc->subs); i++) {
+               seq_printf(s, "have %s %u", ceph_sub_str[i],
+                          monc->subs[i].have);
+               if (monc->subs[i].want)
+                       seq_printf(s, " want %llu%s",
+                                  le64_to_cpu(monc->subs[i].item.start),
+                                  (monc->subs[i].item.flags &
+                                       CEPH_SUBSCRIBE_ONETIME ?  "" : "+"));
+               seq_putc(s, '\n');
+       }
 
        for (rp = rb_first(&monc->generic_request_tree); rp; rp = rb_next(rp)) {
                __u16 op;
@@ -154,9 +161,9 @@ static int osdc_show(struct seq_file *s, void *pp)
 
                seq_printf(s, "%lld\tosd%d\t%lld.%x\t", req->r_tid,
                           req->r_osd ? req->r_osd->o_osd : -1,
-                          req->r_pgid.pool, req->r_pgid.seed);
+                          req->r_t.pgid.pool, req->r_t.pgid.seed);
 
-               seq_printf(s, "%.*s", req->r_base_oid.name_len,
+               seq_printf(s, "%*pE", req->r_base_oid.name_len,
                           req->r_base_oid.name);
 
                if (req->r_reassert_version.epoch)
This page took 0.023979 seconds and 5 git commands to generate.