How to find last sector of bio.

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

 



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.
--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux