All of lore.kernel.org
 help / color / mirror / Atom feed
* How to find last sector of bio.
@ 2011-01-29 20:16 nishant mungse
  0 siblings, 0 replies; only message in thread
From: nishant mungse @ 2011-01-29 20:16 UTC (permalink / raw)
  To: device-mapper development


[-- Attachment #1.1: Type: text/plain, Size: 375 bytes --]

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.

[-- Attachment #1.2: Type: text/html, Size: 500 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-29 20:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-29 20:16 How to find last sector of bio nishant mungse

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.