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

[dm-devel] How to find last sector of bio.



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.

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