ceph: display pgid in debugfs osd request dump
authorSage Weil <sage@newdream.net>
Fri, 8 Jan 2010 23:58:25 +0000 (15:58 -0800)
committerSage Weil <sage@newdream.net>
Thu, 14 Jan 2010 20:23:39 +0000 (12:23 -0800)
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/debugfs.c
fs/ceph/osd_client.c
fs/ceph/osd_client.h

index 22d3b47fb1be414523f16aadb7ae20512cf2ca1c..fba44b2a608681dd4f7f828338dd037593132cf6 100644 (file)
@@ -231,8 +231,10 @@ static int osdc_show(struct seq_file *s, void *pp)
 
                req = rb_entry(p, struct ceph_osd_request, r_node);
 
-               seq_printf(s, "%lld\tosd%d\t", req->r_tid,
-                          req->r_osd ? req->r_osd->o_osd : -1);
+               seq_printf(s, "%lld\tosd%d\t%d.%x\t", req->r_tid,
+                          req->r_osd ? req->r_osd->o_osd : -1,
+                          le32_to_cpu(req->r_pgid.pool),
+                          le16_to_cpu(req->r_pgid.ps));
 
                head = req->r_request->front.iov_base;
                op = (void *)(head + 1);
index 80b868f7a0fc7327f7b977f925f8eab7efe6524a..8417e21a3cb230836c42fadcc22768ca339d74f0 100644 (file)
@@ -538,6 +538,8 @@ static int __map_osds(struct ceph_osd_client *osdc,
        if (err)
                return err;
        pgid = reqhead->layout.ol_pgid;
+       req->r_pgid = pgid;
+
        o = ceph_calc_pg_primary(osdc->osdmap, pgid);
 
        if ((req->r_osd && req->r_osd->o_osd == o &&
index 8fef71cc4457ed70a0a801a54e6263cd12b7ec81..4162c6810a8f7c8debb5f6f26ed9a7d31675a7cb 100644 (file)
@@ -42,6 +42,7 @@ struct ceph_osd_request {
        struct rb_node  r_node;
        struct list_head r_osd_item;
        struct ceph_osd *r_osd;
+       struct ceph_pg   r_pgid;
 
        struct ceph_connection *r_con_filling_pages;