aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-07-13 21:35:11 -0400
committerSage Weil <sage@inktank.com>2012-07-30 21:15:46 -0400
commitbd919d45aa61c19d9ed82548d6deb06bcae31153 (patch)
tree7685cead03db6b9c136d089c168e03ffca641e93 /drivers/block/rbd.c
parenta05932905695f8c6c06d353ecd52c8e5d607cc77 (diff)
rbd: clean up a few dout() calls
There was a dout() call in rbd_do_request() that was reporting the reporting the offset as the length and vice versa. While fixing that I did a quick scan of other dout() calls and fixed a couple of other minor things. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 74e6a3329706..bb7f436b1765 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -734,9 +734,8 @@ static struct bio *bio_chain_clone(struct bio **old, struct bio **next,
734 * split_bio will BUG_ON if this is not the case 734 * split_bio will BUG_ON if this is not the case
735 */ 735 */
736 dout("bio_chain_clone split! total=%d remaining=%d" 736 dout("bio_chain_clone split! total=%d remaining=%d"
737 "bi_size=%d\n", 737 "bi_size=%u\n",
738 (int)total, (int)len-total, 738 total, len - total, old_chain->bi_size);
739 (int)old_chain->bi_size);
740 739
741 /* split the bio. We'll release it either in the next 740 /* split the bio. We'll release it either in the next
742 call, or it will have to be released outside */ 741 call, or it will have to be released outside */
@@ -816,8 +815,8 @@ static void rbd_coll_end_req_index(struct request *rq,
816 struct request_queue *q; 815 struct request_queue *q;
817 int min, max, i; 816 int min, max, i;
818 817
819 dout("rbd_coll_end_req_index %p index %d ret %d len %lld\n", 818 dout("rbd_coll_end_req_index %p index %d ret %d len %llu\n",
820 coll, index, ret, len); 819 coll, index, ret, (unsigned long long) len);
821 820
822 if (!rq) 821 if (!rq)
823 return; 822 return;
@@ -894,8 +893,8 @@ static int rbd_do_request(struct request *rq,
894 req_data->coll_index = coll_index; 893 req_data->coll_index = coll_index;
895 } 894 }
896 895
897 dout("rbd_do_request object_name=%s ofs=%lld len=%lld\n", 896 dout("rbd_do_request object_name=%s ofs=%llu len=%llu\n", object_name,
898 object_name, len, ofs); 897 (unsigned long long) ofs, (unsigned long long) len);
899 898
900 osdc = &rbd_dev->rbd_client->client->osdc; 899 osdc = &rbd_dev->rbd_client->client->osdc;
901 req = ceph_osdc_alloc_request(osdc, flags, snapc, ops, 900 req = ceph_osdc_alloc_request(osdc, flags, snapc, ops,
@@ -948,8 +947,9 @@ static int rbd_do_request(struct request *rq,
948 ret = ceph_osdc_wait_request(osdc, req); 947 ret = ceph_osdc_wait_request(osdc, req);
949 if (ver) 948 if (ver)
950 *ver = le64_to_cpu(req->r_reassert_version.version); 949 *ver = le64_to_cpu(req->r_reassert_version.version);
951 dout("reassert_ver=%lld\n", 950 dout("reassert_ver=%llu\n",
952 le64_to_cpu(req->r_reassert_version.version)); 951 (unsigned long long)
952 le64_to_cpu(req->r_reassert_version.version));
953 ceph_osdc_put_request(req); 953 ceph_osdc_put_request(req);
954 } 954 }
955 return ret; 955 return ret;
@@ -983,7 +983,8 @@ static void rbd_req_cb(struct ceph_osd_request *req, struct ceph_msg *msg)
983 bytes = le64_to_cpu(op->extent.length); 983 bytes = le64_to_cpu(op->extent.length);
984 read_op = (le16_to_cpu(op->op) == CEPH_OSD_OP_READ); 984 read_op = (le16_to_cpu(op->op) == CEPH_OSD_OP_READ);
985 985
986 dout("rbd_req_cb bytes=%lld readop=%d rc=%d\n", bytes, read_op, rc); 986 dout("rbd_req_cb bytes=%llu readop=%d rc=%d\n",
987 (unsigned long long) bytes, read_op, (int) rc);
987 988
988 if (rc == -ENOENT && read_op) { 989 if (rc == -ENOENT && read_op) {
989 zero_bio_chain(req_data->bio, 0); 990 zero_bio_chain(req_data->bio, 0);
@@ -1217,8 +1218,9 @@ static void rbd_watch_cb(u64 ver, u64 notify_id, u8 opcode, void *data)
1217 if (!rbd_dev) 1218 if (!rbd_dev)
1218 return; 1219 return;
1219 1220
1220 dout("rbd_watch_cb %s notify_id=%lld opcode=%d\n", 1221 dout("rbd_watch_cb %s notify_id=%llu opcode=%u\n",
1221 rbd_dev->header_name, notify_id, (int) opcode); 1222 rbd_dev->header_name, (unsigned long long) notify_id,
1223 (unsigned int) opcode);
1222 mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING); 1224 mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
1223 rc = __rbd_refresh_header(rbd_dev); 1225 rc = __rbd_refresh_header(rbd_dev);
1224 hver = rbd_dev->header.obj_version; 1226 hver = rbd_dev->header.obj_version;
@@ -1314,9 +1316,9 @@ static void rbd_notify_cb(u64 ver, u64 notify_id, u8 opcode, void *data)
1314 if (!rbd_dev) 1316 if (!rbd_dev)
1315 return; 1317 return;
1316 1318
1317 dout("rbd_notify_cb %s notify_id=%lld opcode=%d\n", 1319 dout("rbd_notify_cb %s notify_id=%llu opcode=%u\n",
1318 rbd_dev->header_name, 1320 rbd_dev->header_name, (unsigned long long) notify_id,
1319 notify_id, (int)opcode); 1321 (unsigned int) opcode);
1320} 1322}
1321 1323
1322/* 1324/*
@@ -1437,7 +1439,8 @@ static void rbd_rq_fn(struct request_queue *q)
1437 struct bio *bio; 1439 struct bio *bio;
1438 struct bio *rq_bio, *next_bio = NULL; 1440 struct bio *rq_bio, *next_bio = NULL;
1439 bool do_write; 1441 bool do_write;
1440 int size, op_size = 0; 1442 unsigned int size;
1443 u64 op_size = 0;
1441 u64 ofs; 1444 u64 ofs;
1442 int num_segs, cur_seg = 0; 1445 int num_segs, cur_seg = 0;
1443 struct rbd_req_coll *coll; 1446 struct rbd_req_coll *coll;
@@ -1484,7 +1487,7 @@ static void rbd_rq_fn(struct request_queue *q)
1484 1487
1485 dout("%s 0x%x bytes at 0x%llx\n", 1488 dout("%s 0x%x bytes at 0x%llx\n",
1486 do_write ? "write" : "read", 1489 do_write ? "write" : "read",
1487 size, blk_rq_pos(rq) * SECTOR_SIZE); 1490 size, (unsigned long long) blk_rq_pos(rq) * SECTOR_SIZE);
1488 1491
1489 num_segs = rbd_get_num_segments(&rbd_dev->header, ofs, size); 1492 num_segs = rbd_get_num_segments(&rbd_dev->header, ofs, size);
1490 coll = rbd_alloc_coll(num_segs); 1493 coll = rbd_alloc_coll(num_segs);
@@ -1497,7 +1500,7 @@ static void rbd_rq_fn(struct request_queue *q)
1497 1500
1498 do { 1501 do {
1499 /* a bio clone to be passed down to OSD req */ 1502 /* a bio clone to be passed down to OSD req */
1500 dout("rq->bio->bi_vcnt=%d\n", rq->bio->bi_vcnt); 1503 dout("rq->bio->bi_vcnt=%hu\n", rq->bio->bi_vcnt);
1501 op_size = rbd_get_segment(&rbd_dev->header, 1504 op_size = rbd_get_segment(&rbd_dev->header,
1502 rbd_dev->header.object_prefix, 1505 rbd_dev->header.object_prefix,
1503 ofs, size, 1506 ofs, size,
@@ -1664,7 +1667,7 @@ static int rbd_header_add_snap(struct rbd_device *rbd_dev,
1664 1667
1665 monc = &rbd_dev->rbd_client->client->monc; 1668 monc = &rbd_dev->rbd_client->client->monc;
1666 ret = ceph_monc_create_snapid(monc, rbd_dev->pool_id, &new_snapid); 1669 ret = ceph_monc_create_snapid(monc, rbd_dev->pool_id, &new_snapid);
1667 dout("created snapid=%lld\n", new_snapid); 1670 dout("created snapid=%llu\n", (unsigned long long) new_snapid);
1668 if (ret < 0) 1671 if (ret < 0)
1669 return ret; 1672 return ret;
1670 1673