[dm-devel] How to find last sector of bio.
nishant mungse
nishantmungse at gmail.com
Sat Jan 29 20:16:24 UTC 2011
Hi Malahal
Is there any way to find the last sector of bio.
Is this a correct way to find last sector of bio
"bio->bi_sector=bio->bi_sector + (bio->bi_size >> 9)-1"
or
bio_for_each_segment(bvec,bio,idx)
{
bio->bi_sector=bio->bi_sector + (bvec->bv_len >> 9) -1;
}
Will this bio->bi_sector point to last sector of bio if bio->bi_vcnt is
greater than 1.
Regards,
Nishant.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/dm-devel/attachments/20110129/ca78be3d/attachment.htm>
More information about the dm-devel
mailing list