Skip to content

Commit

Permalink
rbd: drop snapid parameter from rbd_req_sync_read()
Browse files Browse the repository at this point in the history
There is only one caller of rbd_req_sync_read(), and it passes
CEPH_NOSNAP as the snapshot id argument.  Delete that parameter
and just use CEPH_NOSNAP within the function.

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
  • Loading branch information
Alex Elder committed Jan 17, 2013
1 parent af77f26 commit 4775618
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,6 @@ static int rbd_do_op(struct request *rq,
* Request sync osd read
*/
static int rbd_req_sync_read(struct rbd_device *rbd_dev,
u64 snapid,
const char *object_name,
u64 ofs, u64 len,
char *buf,
Expand All @@ -1382,7 +1381,7 @@ static int rbd_req_sync_read(struct rbd_device *rbd_dev,
return -ENOMEM;

ret = rbd_req_sync_op(rbd_dev, NULL,
snapid,
CEPH_NOSNAP,
CEPH_OSD_FLAG_READ,
ops, object_name, ofs, len, buf, NULL, ver);
rbd_destroy_ops(ops);
Expand Down Expand Up @@ -1799,8 +1798,7 @@ rbd_dev_v1_header_read(struct rbd_device *rbd_dev, u64 *version)
if (!ondisk)
return ERR_PTR(-ENOMEM);

ret = rbd_req_sync_read(rbd_dev, CEPH_NOSNAP,
rbd_dev->header_name,
ret = rbd_req_sync_read(rbd_dev, rbd_dev->header_name,
0, size,
(char *) ondisk, version);

Expand Down

0 comments on commit 4775618

Please sign in to comment.