aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-11-09 13:50:10 -0500
committerAlex Elder <elder@inktank.com>2013-01-17 16:52:03 -0500
commit7c3d22cf16f1bbcb37a73e88338c042bb49ff112 (patch)
tree5f12e6272e0d6c1f309d398e4a954e91981670b5
parent25704ac9de30ac3e73c123e7b2734f7ca744c8d8 (diff)
rbd: don't bother setting snapid in rbd_do_request()
For some reason, the snapid field of the osd request header is explicitly set to CEPH_NOSNAP in rbd_do_request(). Just a few lines later--with no code that would access this field in between--a call is made to ceph_calc_raw_layout() passing the snapid provided to rbd_do_request(), which encodes the snapid value it is provided into that field instead. In other words, there is no need to fill in CEPH_NOSNAP, and doing so suggests it might be necessary. Don't do that any more. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
-rw-r--r--drivers/block/rbd.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 85c5852378d2..54bd9fc3ef7c 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1132,7 +1132,6 @@ static int rbd_do_request(struct request *rq,
1132 u64 bno; 1132 u64 bno;
1133 struct timespec mtime = CURRENT_TIME; 1133 struct timespec mtime = CURRENT_TIME;
1134 struct rbd_request *rbd_req; 1134 struct rbd_request *rbd_req;
1135 struct ceph_osd_request_head *reqhead;
1136 struct ceph_osd_client *osdc; 1135 struct ceph_osd_client *osdc;
1137 1136
1138 rbd_req = kzalloc(sizeof(*rbd_req), GFP_NOIO); 1137 rbd_req = kzalloc(sizeof(*rbd_req), GFP_NOIO);
@@ -1165,9 +1164,6 @@ static int rbd_do_request(struct request *rq,
1165 1164
1166 osd_req->r_priv = rbd_req; 1165 osd_req->r_priv = rbd_req;
1167 1166
1168 reqhead = osd_req->r_request->front.iov_base;
1169 reqhead->snapid = cpu_to_le64(CEPH_NOSNAP);
1170
1171 strncpy(osd_req->r_oid, object_name, sizeof(osd_req->r_oid)); 1167 strncpy(osd_req->r_oid, object_name, sizeof(osd_req->r_oid));
1172 osd_req->r_oid_len = strlen(osd_req->r_oid); 1168 osd_req->r_oid_len = strlen(osd_req->r_oid);
1173 1169