]> git.karo-electronics.de Git - linux-beck.git/commitdiff
rbd: drop snapid parameter from rbd_req_sync_read()
authorAlex Elder <elder@inktank.com>
Fri, 9 Nov 2012 14:43:15 +0000 (08:43 -0600)
committerAlex Elder <elder@inktank.com>
Thu, 17 Jan 2013 21:52:01 +0000 (15:52 -0600)
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>
drivers/block/rbd.c

index 9a701effa0ef0ae54f6a5e4e1e2fa7e8f5358c73..07e064482cd8adce4bb2908f7869535afab4e47b 100644 (file)
@@ -1368,7 +1368,6 @@ done:
  * 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,
@@ -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);
@@ -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);