summaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2018-02-06 19:26:35 +0100
committerIlya Dryomov <idryomov@gmail.com>2018-04-02 10:12:44 +0200
commitdfd9875f11008183c26fea5fdf23e6740fe8aa5a (patch)
treefb5c3436d755ab2f0d7631273355b516a5b6f44b /drivers/block
parent0420c5dd2ef308b69a86b44a217390f5612bab58 (diff)
downloadlinux-dfd9875f11008183c26fea5fdf23e6740fe8aa5a.tar.bz2
rbd: get rid of img_req->{offset,length}
These are set, but no longer used. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/rbd.c26
1 files changed, 8 insertions, 18 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index a22d265b30df..b3e310a87fd1 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -283,8 +283,6 @@ struct rbd_img_request {
struct rbd_device *rbd_dev;
enum obj_operation_type op_type;
enum obj_request_type data_type;
- u64 offset; /* starting image byte offset */
- u64 length; /* byte count from offset */
unsigned long flags;
union {
u64 snap_id; /* for reads */
@@ -1602,7 +1600,6 @@ static bool rbd_dev_parent_get(struct rbd_device *rbd_dev)
*/
static struct rbd_img_request *rbd_img_request_create(
struct rbd_device *rbd_dev,
- u64 offset, u64 length,
enum obj_operation_type op_type,
struct ceph_snap_context *snapc)
{
@@ -1614,8 +1611,6 @@ static struct rbd_img_request *rbd_img_request_create(
img_request->rbd_dev = rbd_dev;
img_request->op_type = op_type;
- img_request->offset = offset;
- img_request->length = length;
if (!rbd_img_is_write(img_request))
img_request->snap_id = rbd_dev->spec->snap_id;
else
@@ -1628,9 +1623,8 @@ static struct rbd_img_request *rbd_img_request_create(
INIT_LIST_HEAD(&img_request->object_extents);
kref_init(&img_request->kref);
- dout("%s: rbd_dev %p %s %llu/%llu -> img %p\n", __func__, rbd_dev,
- obj_op_name(op_type), offset, length, img_request);
-
+ dout("%s: rbd_dev %p %s -> img %p\n", __func__, rbd_dev,
+ obj_op_name(op_type), img_request);
return img_request;
}
@@ -1659,9 +1653,8 @@ static void rbd_img_request_destroy(struct kref *kref)
kmem_cache_free(rbd_img_request_cache, img_request);
}
-static struct rbd_img_request *rbd_parent_request_create(
- struct rbd_obj_request *obj_request,
- u64 img_offset, u64 length)
+static struct rbd_img_request *
+rbd_parent_request_create(struct rbd_obj_request *obj_request)
{
struct rbd_img_request *parent_request;
struct rbd_device *rbd_dev;
@@ -1669,8 +1662,8 @@ static struct rbd_img_request *rbd_parent_request_create(
rbd_assert(obj_request->img_request);
rbd_dev = obj_request->img_request->rbd_dev;
- parent_request = rbd_img_request_create(rbd_dev->parent, img_offset,
- length, OBJ_OP_READ, NULL);
+ parent_request = rbd_img_request_create(rbd_dev->parent, OBJ_OP_READ,
+ NULL);
if (!parent_request)
return NULL;
@@ -2127,9 +2120,7 @@ static int rbd_obj_read_from_parent(struct rbd_obj_request *obj_req)
struct rbd_img_request *child_img_req;
int ret;
- child_img_req = rbd_parent_request_create(obj_req,
- obj_req->img_extents[0].fe_off,
- obj_req->img_extents[0].fe_len);
+ child_img_req = rbd_parent_request_create(obj_req);
if (!child_img_req)
return -ENOMEM;
@@ -3562,8 +3553,7 @@ static void rbd_queue_workfn(struct work_struct *work)
}
}
- img_request = rbd_img_request_create(rbd_dev, offset, length, op_type,
- snapc);
+ img_request = rbd_img_request_create(rbd_dev, op_type, snapc);
if (!img_request) {
result = -ENOMEM;
goto err_unlock;