summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Elder <elder@inktank.com>2012-11-09 08:43:16 -0600
committerAlex Elder <elder@inktank.com>2013-01-17 15:52:02 -0600
commit25704ac9de30ac3e73c123e7b2734f7ca744c8d8 (patch)
tree2ed1bd1b51b7388f331a80672472706f1a437b9a /drivers
parent07b2391fbbcefdecbc2f16321f8e454802e0b926 (diff)
downloadlinux-stable-25704ac9de30ac3e73c123e7b2734f7ca744c8d8.tar.gz
linux-stable-25704ac9de30ac3e73c123e7b2734f7ca744c8d8.tar.bz2
linux-stable-25704ac9de30ac3e73c123e7b2734f7ca744c8d8.zip
rbd: kill rbd_req_sync_op() snapc and snapid parameters
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> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/rbd.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 5d48bcd1709b..85c5852378d2 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);