@Casey Bodley Thanks for your info.
I think I could use bufferlist::spice here to complete the read function here. I'll update the code and fix some bugs in it.
B.R.
Changcheng
------------------------------------------------------------------
From:Casey Bodley <cbodley@redhat.com>
Sent At:2021 Jun. 28 (Mon.) 21:42
To:changcheng.liu <changcheng.liu@aliyun.com>
Cc:dev <dev@ceph.io>
Subject:Re: claim append part of bufferlist
for read(), it looks like you want:
void bufferlist::splice(unsigned off, unsigned len, list *claim_by=0);
if you don't give it a 'claim_by', it will just remove the range specified by off/len from the current bufferlist. so you could call recv_pending_bl.splice(0, len) after using bufferlist::iterator to copy the data into buf
[Correct subject]
Hi all,
Does anyone know how to claim-append part of bufferlist? After the head part has been claim-appended, the left part can be still cliam-appended.
I know there's bufferlist::claim_append API. However it will claim append the whole bufferlist.
The background is:
The code is below (you can also click the above link to read the code, no more than 40 lines).
There're several bugs in below code. I'm looking for the high efficiency method to receive the data and trigger the up software layer to read the data in the right way.
Any suggesion is welcome to supply the high efficiency method to do it.
B.R.
Changcheng
_______________________________________________
Dev mailing list --
dev@ceph.io
To unsubscribe send an email to
dev-leave@ceph.io