bio_add_page

neha naik nehanaik27 at gmail.com
Thu Nov 28 18:40:53 EST 2013


Hi,

On the block device driver i am writing :
 I have a bio such that the bvec has a page with bvec->bv_len = 4096.
 I want to create two bios with this bvec such that
    bio1 --> contains 7 sectors(len1)
    bio2 --> contiains 1 sector(len2)

I tried using bio_add_page as follows :
bio_add_page(bio1, bvec->bv_page, len1, bvec->bv_offset)
bio_add_page(bio2, bvec->bv_page, len2, bvec->bv_offset + len1)

But my second 'bio_add_page' returns 0 and not  len2 indicating that
there is something wrong.
Is there some other way to do this???


Regards,
Neha



More information about the Kernelnewbies mailing list