Re: [PATCH 1/2] libceph: add osd_req_op_extent_osd_data_bvecs()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 4, 2018 at 5:54 PM, Jeff Layton <jlayton@xxxxxxxxxx> wrote:
> On Fri, 2018-05-04 at 17:04 +0200, Ilya Dryomov wrote:
>> ... and store num_bvecs for client code's convenience.
>>
>> Signed-off-by: Ilya Dryomov <idryomov@xxxxxxxxx>
>> ---
>>  drivers/block/rbd.c             |  4 +++-
>>  include/linux/ceph/osd_client.h | 12 ++++++++++--
>>  net/ceph/osd_client.c           | 27 +++++++++++++++++++++++----
>>  3 files changed, 36 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
>> index 50b9d0f8ac0b..2b4e90d06822 100644
>> --- a/drivers/block/rbd.c
>> +++ b/drivers/block/rbd.c
>> @@ -2369,7 +2369,9 @@ static int rbd_obj_issue_copyup(struct rbd_obj_request *obj_req, u32 bytes)
>>               bytes = 0;
>>       }
>>       osd_req_op_cls_request_data_bvecs(obj_req->osd_req, 0,
>> -                                       obj_req->copyup_bvecs, bytes);
>> +                                       obj_req->copyup_bvecs,
>> +                                       obj_req->copyup_bvec_count,
>> +                                       bytes);
>>
>>       switch (obj_req->img_request->op_type) {
>>       case OBJ_OP_WRITE:
>> diff --git a/include/linux/ceph/osd_client.h b/include/linux/ceph/osd_client.h
>> index ba3d8c262f8d..b73dd7ebe585 100644
>> --- a/include/linux/ceph/osd_client.h
>> +++ b/include/linux/ceph/osd_client.h
>> @@ -77,7 +77,10 @@ struct ceph_osd_data {
>>                       u32                     bio_length;
>>               };
>>  #endif /* CONFIG_BLOCK */
>> -             struct ceph_bvec_iter   bvec_pos;
>> +             struct {
>> +                     struct ceph_bvec_iter   bvec_pos;
>> +                     u32                     num_bvecs;
>> +             };
>
> Does the above struct add anything of value? Maybe just add a new
> num_bvecs member there?

Yes, that struct makes up a union member.

Thanks,

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



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux