CEPH filesystem development
 help / color / mirror / Atom feed
From: Alex Elder <elder@inktank.com>
To: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: [PATCH REPOST 5/5] rbd: don't bother setting snapid in rbd_do_request()
Date: Thu, 03 Jan 2013 17:19:44 -0600	[thread overview]
Message-ID: <50E61210.6050906@inktank.com> (raw)
In-Reply-To: <50E61175.7010103@inktank.com>

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>
---
 drivers/block/rbd.c |    4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 821d93c..cc12154 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1132,7 +1132,6 @@ static int rbd_do_request(struct request *rq,
 	u64 bno;
 	struct timespec mtime = CURRENT_TIME;
 	struct rbd_request *rbd_req;
-	struct ceph_osd_request_head *reqhead;
 	struct ceph_osd_client *osdc;

 	rbd_req = kzalloc(sizeof(*rbd_req), GFP_NOIO);
@@ -1165,9 +1164,6 @@ static int rbd_do_request(struct request *rq,

 	osd_req->r_priv = rbd_req;

-	reqhead = osd_req->r_request->front.iov_base;
-	reqhead->snapid = cpu_to_le64(CEPH_NOSNAP);
-
 	strncpy(osd_req->r_oid, object_name, sizeof(osd_req->r_oid));
 	osd_req->r_oid_len = strlen(osd_req->r_oid);

-- 
1.7.9.5


  parent reply	other threads:[~2013-01-03 23:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03 23:17 [PATCH REPOST 0/5] rbd: drop some unneeded parameters Alex Elder
2013-01-03 23:18 ` [PATCH REPOST 1/5] rbd: drop oid parameters from ceph_osdc_build_request() Alex Elder
2013-01-03 23:18 ` [PATCH REPOST 2/5] rbd: drop snapid parameter from rbd_req_sync_read() Alex Elder
2013-01-03 23:19 ` [PATCH REPOST 3/5] rbd: drop flags parameter from rbd_req_sync_exec() Alex Elder
2013-01-03 23:19 ` [PATCH REPOST 4/5] rbd: kill rbd_req_sync_op() snapc and snapid parameters Alex Elder
2013-01-03 23:19 ` Alex Elder [this message]
2013-01-16  1:46 ` [PATCH REPOST 0/5] rbd: drop some unneeded parameters Josh Durgin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50E61210.6050906@inktank.com \
    --to=elder@inktank.com \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox