diff mbox

[05/12,v2] rbd: get rid of rbd_req_sync_read()

Message ID 51016261.8010609@inktank.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Elder Jan. 24, 2013, 4:33 p.m. UTC
Delete rbd_req_sync_read() is no longer used, so get rid of it.

Signed-off-by: Alex Elder <elder@inktank.com>
---
 drivers/block/rbd.c |   24 ------------------------
 1 file changed, 24 deletions(-)

 static int rbd_req_sync_notify_ack(struct rbd_device *rbd_dev,
@@ -2113,7 +2090,6 @@ rbd_dev_v1_header_read(struct rbd_device *rbd_dev,
u64 *version)
 		if (!ondisk)
 			return ERR_PTR(-ENOMEM);

-		(void) rbd_req_sync_read;	/* avoid a warning */
 		ret = rbd_obj_read_sync(rbd_dev, rbd_dev->header_name,
 				       0, size,
 				       (char *) ondisk, version);

Comments

Josh Durgin Jan. 29, 2013, 10:48 a.m. UTC | #1
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>

On 01/24/2013 08:33 AM, Alex Elder wrote:
> Delete rbd_req_sync_read() is no longer used, so get rid of it.
>
> Signed-off-by: Alex Elder <elder@inktank.com>
> ---
>   drivers/block/rbd.c |   24 ------------------------
>   1 file changed, 24 deletions(-)
>
> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
> index 742236b..750fc73 100644
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -1315,29 +1315,6 @@ static void rbd_obj_request_complete(struct
> rbd_obj_request *obj_request)
>   }
>
>   /*
> - * Synchronously read a range from an object into a provided buffer
> - */
> -static int rbd_req_sync_read(struct rbd_device *rbd_dev,
> -			  const char *object_name,
> -			  u64 ofs, u64 len,
> -			  char *buf,
> -			  u64 *ver)
> -{
> -	struct ceph_osd_req_op *op;
> -	int ret;
> -
> -	op = rbd_osd_req_op_create(CEPH_OSD_OP_READ, ofs, len);
> -	if (!op)
> -		return -ENOMEM;
> -
> -	ret = rbd_req_sync_op(rbd_dev, CEPH_OSD_FLAG_READ,
> -			       op, object_name, ofs, len, buf, ver);
> -	rbd_osd_req_op_destroy(op);
> -
> -	return ret;
> -}
> -
> -/*
>    * Request sync osd watch
>    */
>   static int rbd_req_sync_notify_ack(struct rbd_device *rbd_dev,
> @@ -2113,7 +2090,6 @@ rbd_dev_v1_header_read(struct rbd_device *rbd_dev,
> u64 *version)
>   		if (!ondisk)
>   			return ERR_PTR(-ENOMEM);
>
> -		(void) rbd_req_sync_read;	/* avoid a warning */
>   		ret = rbd_obj_read_sync(rbd_dev, rbd_dev->header_name,
>   				       0, size,
>   				       (char *) ondisk, version);
>

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 742236b..750fc73 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -1315,29 +1315,6 @@  static void rbd_obj_request_complete(struct
rbd_obj_request *obj_request)
 }

 /*
- * Synchronously read a range from an object into a provided buffer
- */
-static int rbd_req_sync_read(struct rbd_device *rbd_dev,
-			  const char *object_name,
-			  u64 ofs, u64 len,
-			  char *buf,
-			  u64 *ver)
-{
-	struct ceph_osd_req_op *op;
-	int ret;
-
-	op = rbd_osd_req_op_create(CEPH_OSD_OP_READ, ofs, len);
-	if (!op)
-		return -ENOMEM;
-
-	ret = rbd_req_sync_op(rbd_dev, CEPH_OSD_FLAG_READ,
-			       op, object_name, ofs, len, buf, ver);
-	rbd_osd_req_op_destroy(op);
-
-	return ret;
-}
-
-/*
  * Request sync osd watch
  */