Commit 07b2391f authored by Alex Elder's avatar Alex Elder

rbd: drop flags parameter from rbd_req_sync_exec()

All callers of rbd_req_sync_exec() pass CEPH_OSD_FLAG_READ as their
flags argument.  Delete that parameter and use CEPH_OSD_FLAG_READ
within the function.  If we find a need to support write operations
we can add it back again.
Signed-off-by: default avatarAlex Elder <elder@inktank.com>
Reviewed-by: default avatarJosh Durgin <josh.durgin@inktank.com>
parent 4775618d
...@@ -1524,7 +1524,6 @@ static int rbd_req_sync_exec(struct rbd_device *rbd_dev, ...@@ -1524,7 +1524,6 @@ static int rbd_req_sync_exec(struct rbd_device *rbd_dev,
size_t outbound_size, size_t outbound_size,
char *inbound, char *inbound,
size_t inbound_size, size_t inbound_size,
int flags,
u64 *ver) u64 *ver)
{ {
struct ceph_osd_req_op *ops; struct ceph_osd_req_op *ops;
...@@ -1555,8 +1554,7 @@ static int rbd_req_sync_exec(struct rbd_device *rbd_dev, ...@@ -1555,8 +1554,7 @@ static int rbd_req_sync_exec(struct rbd_device *rbd_dev,
ops[0].cls.indata_len = outbound_size; ops[0].cls.indata_len = outbound_size;
ret = rbd_req_sync_op(rbd_dev, NULL, ret = rbd_req_sync_op(rbd_dev, NULL,
CEPH_NOSNAP, CEPH_NOSNAP, CEPH_OSD_FLAG_READ, ops,
flags, ops,
object_name, 0, inbound_size, inbound, object_name, 0, inbound_size, inbound,
NULL, ver); NULL, ver);
...@@ -2418,8 +2416,7 @@ static int _rbd_dev_v2_snap_size(struct rbd_device *rbd_dev, u64 snap_id, ...@@ -2418,8 +2416,7 @@ static int _rbd_dev_v2_snap_size(struct rbd_device *rbd_dev, u64 snap_id,
ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name, ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name,
"rbd", "get_size", "rbd", "get_size",
(char *) &snapid, sizeof (snapid), (char *) &snapid, sizeof (snapid),
(char *) &size_buf, sizeof (size_buf), (char *) &size_buf, sizeof (size_buf), NULL);
CEPH_OSD_FLAG_READ, NULL);
dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret); dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret);
if (ret < 0) if (ret < 0)
return ret; return ret;
...@@ -2454,8 +2451,7 @@ static int rbd_dev_v2_object_prefix(struct rbd_device *rbd_dev) ...@@ -2454,8 +2451,7 @@ static int rbd_dev_v2_object_prefix(struct rbd_device *rbd_dev)
ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name, ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name,
"rbd", "get_object_prefix", "rbd", "get_object_prefix",
NULL, 0, NULL, 0,
reply_buf, RBD_OBJ_PREFIX_LEN_MAX, reply_buf, RBD_OBJ_PREFIX_LEN_MAX, NULL);
CEPH_OSD_FLAG_READ, NULL);
dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret); dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret);
if (ret < 0) if (ret < 0)
goto out; goto out;
...@@ -2494,7 +2490,7 @@ static int _rbd_dev_v2_snap_features(struct rbd_device *rbd_dev, u64 snap_id, ...@@ -2494,7 +2490,7 @@ static int _rbd_dev_v2_snap_features(struct rbd_device *rbd_dev, u64 snap_id,
"rbd", "get_features", "rbd", "get_features",
(char *) &snapid, sizeof (snapid), (char *) &snapid, sizeof (snapid),
(char *) &features_buf, sizeof (features_buf), (char *) &features_buf, sizeof (features_buf),
CEPH_OSD_FLAG_READ, NULL); NULL);
dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret); dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret);
if (ret < 0) if (ret < 0)
return ret; return ret;
...@@ -2549,8 +2545,7 @@ static int rbd_dev_v2_parent_info(struct rbd_device *rbd_dev) ...@@ -2549,8 +2545,7 @@ static int rbd_dev_v2_parent_info(struct rbd_device *rbd_dev)
ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name, ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name,
"rbd", "get_parent", "rbd", "get_parent",
(char *) &snapid, sizeof (snapid), (char *) &snapid, sizeof (snapid),
(char *) reply_buf, size, (char *) reply_buf, size, NULL);
CEPH_OSD_FLAG_READ, NULL);
dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret); dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret);
if (ret < 0) if (ret < 0)
goto out_err; goto out_err;
...@@ -2615,8 +2610,7 @@ static char *rbd_dev_image_name(struct rbd_device *rbd_dev) ...@@ -2615,8 +2610,7 @@ static char *rbd_dev_image_name(struct rbd_device *rbd_dev)
ret = rbd_req_sync_exec(rbd_dev, RBD_DIRECTORY, ret = rbd_req_sync_exec(rbd_dev, RBD_DIRECTORY,
"rbd", "dir_get_name", "rbd", "dir_get_name",
image_id, image_id_size, image_id, image_id_size,
(char *) reply_buf, size, (char *) reply_buf, size, NULL);
CEPH_OSD_FLAG_READ, NULL);
if (ret < 0) if (ret < 0)
goto out; goto out;
p = reply_buf; p = reply_buf;
...@@ -2722,8 +2716,7 @@ static int rbd_dev_v2_snap_context(struct rbd_device *rbd_dev, u64 *ver) ...@@ -2722,8 +2716,7 @@ static int rbd_dev_v2_snap_context(struct rbd_device *rbd_dev, u64 *ver)
ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name, ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name,
"rbd", "get_snapcontext", "rbd", "get_snapcontext",
NULL, 0, NULL, 0,
reply_buf, size, reply_buf, size, ver);
CEPH_OSD_FLAG_READ, ver);
dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret); dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret);
if (ret < 0) if (ret < 0)
goto out; goto out;
...@@ -2792,8 +2785,7 @@ static char *rbd_dev_v2_snap_name(struct rbd_device *rbd_dev, u32 which) ...@@ -2792,8 +2785,7 @@ static char *rbd_dev_v2_snap_name(struct rbd_device *rbd_dev, u32 which)
ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name, ret = rbd_req_sync_exec(rbd_dev, rbd_dev->header_name,
"rbd", "get_snapshot_name", "rbd", "get_snapshot_name",
(char *) &snap_id, sizeof (snap_id), (char *) &snap_id, sizeof (snap_id),
reply_buf, size, reply_buf, size, NULL);
CEPH_OSD_FLAG_READ, NULL);
dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret); dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret);
if (ret < 0) if (ret < 0)
goto out; goto out;
...@@ -3401,8 +3393,7 @@ static int rbd_dev_image_id(struct rbd_device *rbd_dev) ...@@ -3401,8 +3393,7 @@ static int rbd_dev_image_id(struct rbd_device *rbd_dev)
ret = rbd_req_sync_exec(rbd_dev, object_name, ret = rbd_req_sync_exec(rbd_dev, object_name,
"rbd", "get_id", "rbd", "get_id",
NULL, 0, NULL, 0,
response, RBD_IMAGE_ID_LEN_MAX, response, RBD_IMAGE_ID_LEN_MAX, NULL);
CEPH_OSD_FLAG_READ, NULL);
dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret); dout("%s: rbd_req_sync_exec returned %d\n", __func__, ret);
if (ret < 0) if (ret < 0)
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment