From: Alex Elder <elder@inktank.com>
To: "ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: [PATCH REPOST 4/5] rbd: kill rbd_req_sync_op() snapc and snapid parameters
Date: Thu, 03 Jan 2013 17:19:32 -0600 [thread overview]
Message-ID: <50E61204.6040905@inktank.com> (raw)
In-Reply-To: <50E61175.7010103@inktank.com>
The snapc and snapid parameters to rbd_req_sync_op() always take
the values NULL and CEPH_NOSNAP, respectively. So just get rid
of them and use those values where needed.
Signed-off-by: Alex Elder <elder@inktank.com>
---
drivers/block/rbd.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 126d5c0..821d93c 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1257,8 +1257,6 @@ static void rbd_simple_req_cb(struct
ceph_osd_request *osd_req,
* Do a synchronous ceph osd operation
*/
static int rbd_req_sync_op(struct rbd_device *rbd_dev,
- struct ceph_snap_context *snapc,
- u64 snapid,
int flags,
struct ceph_osd_req_op *ops,
const char *object_name,
@@ -1278,7 +1276,7 @@ static int rbd_req_sync_op(struct rbd_device *rbd_dev,
if (IS_ERR(pages))
return PTR_ERR(pages);
- ret = rbd_do_request(NULL, rbd_dev, snapc, snapid,
+ ret = rbd_do_request(NULL, rbd_dev, NULL, CEPH_NOSNAP,
object_name, ofs, inbound_size, NULL,
pages, num_pages,
flags,
@@ -1380,9 +1378,7 @@ static int rbd_req_sync_read(struct rbd_device
*rbd_dev,
if (!ops)
return -ENOMEM;
- ret = rbd_req_sync_op(rbd_dev, NULL,
- CEPH_NOSNAP,
- CEPH_OSD_FLAG_READ,
+ ret = rbd_req_sync_op(rbd_dev, CEPH_OSD_FLAG_READ,
ops, object_name, ofs, len, buf, NULL, ver);
rbd_destroy_ops(ops);
@@ -1461,8 +1457,7 @@ static int rbd_req_sync_watch(struct rbd_device
*rbd_dev)
ops[0].watch.cookie = cpu_to_le64(rbd_dev->watch_event->cookie);
ops[0].watch.flag = 1;
- ret = rbd_req_sync_op(rbd_dev, NULL,
- CEPH_NOSNAP,
+ ret = rbd_req_sync_op(rbd_dev,
CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK,
ops,
rbd_dev->header_name,
@@ -1499,8 +1494,7 @@ static int rbd_req_sync_unwatch(struct rbd_device
*rbd_dev)
ops[0].watch.cookie = cpu_to_le64(rbd_dev->watch_event->cookie);
ops[0].watch.flag = 0;
- ret = rbd_req_sync_op(rbd_dev, NULL,
- CEPH_NOSNAP,
+ ret = rbd_req_sync_op(rbd_dev,
CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK,
ops,
rbd_dev->header_name,
@@ -1553,8 +1547,7 @@ static int rbd_req_sync_exec(struct rbd_device
*rbd_dev,
ops[0].cls.indata = outbound;
ops[0].cls.indata_len = outbound_size;
- ret = rbd_req_sync_op(rbd_dev, NULL,
- CEPH_NOSNAP, CEPH_OSD_FLAG_READ, ops,
+ ret = rbd_req_sync_op(rbd_dev, CEPH_OSD_FLAG_READ, ops,
object_name, 0, inbound_size, inbound,
NULL, ver);
--
1.7.9.5
next prev 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 ` Alex Elder [this message]
2013-01-03 23:19 ` [PATCH REPOST 5/5] rbd: don't bother setting snapid in rbd_do_request() Alex Elder
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=50E61204.6040905@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