Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359575
b: refs/heads/master
c: 8986cb3
h: refs/heads/master
i:
  359573: 86f27ba
  359571: be40d6a
  359567: bcd50d5
v: v3
  • Loading branch information
Alex Elder authored and Alex Elder committed Jan 17, 2013
1 parent f6145a5 commit f51d92c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f29ddd4f0954ad6c84e28b934773f128840f064
refs/heads/master: 8986cb37b1cf1f54b35f062f0a12dc68dd89f311
23 changes: 12 additions & 11 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ struct rbd_client {
*/
struct rbd_req_status {
int done;
int rc;
s32 rc;
u64 bytes;
};

Expand Down Expand Up @@ -1053,13 +1053,13 @@ static void rbd_destroy_ops(struct ceph_osd_req_op *ops)
static void rbd_coll_end_req_index(struct request *rq,
struct rbd_req_coll *coll,
int index,
int ret, u64 len)
s32 ret, u64 len)
{
struct request_queue *q;
int min, max, i;

dout("rbd_coll_end_req_index %p index %d ret %d len %llu\n",
coll, index, ret, (unsigned long long) len);
coll, index, (int)ret, (unsigned long long)len);

if (!rq)
return;
Expand All @@ -1080,7 +1080,7 @@ static void rbd_coll_end_req_index(struct request *rq,
max++;

for (i = min; i<max; i++) {
__blk_end_request(rq, coll->status[i].rc,
__blk_end_request(rq, (int)coll->status[i].rc,
coll->status[i].bytes);
coll->num_done++;
kref_put(&coll->kref, rbd_coll_release);
Expand All @@ -1089,7 +1089,7 @@ static void rbd_coll_end_req_index(struct request *rq,
}

static void rbd_coll_end_req(struct rbd_request *rbd_req,
int ret, u64 len)
s32 ret, u64 len)
{
rbd_coll_end_req_index(rbd_req->rq,
rbd_req->coll, rbd_req->coll_index,
Expand Down Expand Up @@ -1129,7 +1129,7 @@ static int rbd_do_request(struct request *rq,
if (!rbd_req) {
if (coll)
rbd_coll_end_req_index(rq, coll, coll_index,
-ENOMEM, len);
(s32)-ENOMEM, len);
return -ENOMEM;
}

Expand Down Expand Up @@ -1206,7 +1206,7 @@ static int rbd_do_request(struct request *rq,
bio_chain_put(rbd_req->bio);
ceph_osdc_put_request(osd_req);
done_pages:
rbd_coll_end_req(rbd_req, ret, len);
rbd_coll_end_req(rbd_req, (s32)ret, len);
kfree(rbd_req);
return ret;
}
Expand All @@ -1219,22 +1219,22 @@ static void rbd_req_cb(struct ceph_osd_request *osd_req, struct ceph_msg *msg)
struct rbd_request *rbd_req = osd_req->r_priv;
struct ceph_osd_reply_head *replyhead;
struct ceph_osd_op *op;
__s32 rc;
s32 rc;
u64 bytes;
int read_op;

/* parse reply */
replyhead = msg->front.iov_base;
WARN_ON(le32_to_cpu(replyhead->num_ops) == 0);
op = (void *)(replyhead + 1);
rc = le32_to_cpu(replyhead->result);
rc = (s32)le32_to_cpu(replyhead->result);
bytes = le64_to_cpu(op->extent.length);
read_op = (le16_to_cpu(op->op) == CEPH_OSD_OP_READ);

dout("rbd_req_cb bytes=%llu readop=%d rc=%d\n",
(unsigned long long) bytes, read_op, (int) rc);

if (rc == -ENOENT && read_op) {
if (rc == (s32)-ENOENT && read_op) {
zero_bio_chain(rbd_req->bio, 0);
rc = 0;
} else if (rc == 0 && read_op && bytes < rbd_req->len) {
Expand Down Expand Up @@ -1679,7 +1679,8 @@ static void rbd_rq_fn(struct request_queue *q)
bio_chain, coll, cur_seg);
else
rbd_coll_end_req_index(rq, coll, cur_seg,
-ENOMEM, chain_size);
(s32)-ENOMEM,
chain_size);
size -= chain_size;
ofs += chain_size;

Expand Down

0 comments on commit f51d92c

Please sign in to comment.