FreeBSD/sys/dev/xen/blkback/blkback.c
/**
 * Given a page index and 512b sector offset within that page,
 * calculate an offset into a request's kva region.
 *
 * \param reqlist The request structure whose kva region will be accessed.
 * \param pagenr  The page index used to compute the kva offset.
 * \param sector  The 512b sector index used to compute the page relative
 *                kva offset.
 *
 * \return  The computed global KVA offset.
 */
Given a page index and 512b sector offset within that page,
calculate an offset into a request's kva region.

\param reqlist The request structure whose kva region will be accessed.
\param pagenr  The page index used to compute the kva offset.
\param sector  The 512b sector index used to compute the page relative
kva offset.

\return  The computed global KVA offset.
Given a page index and 512b sector offset within that page calculate an offset into a request ' s kva region . \ param reqlist The request structure whose kva region will be accessed . \ param pagenr The page index used to compute the kva offset . \ param sector The 512b sector index used to compute the page relative kva offset . \ return The computed global KVA offset .
static inline uint8_t *
xbb_reqlist_vaddr(struct xbb_xen_reqlist *reqlist, int pagenr, int sector)
{
	return (reqlist->kva + (PAGE_SIZE * pagenr) + (sector << 9));
}
static inline uint8_t * xbb_reqlist_vaddr ( struct xbb_xen_reqlist * reqlist , int pagenr , int sector ) { return ( reqlist -> kva + ( PAGE_SIZE * pagenr ) + ( sector << 9 ) ) ; }
Given a page index and 512b sector offset within that page,
 calculate an offset into a request's kva region.
Given a page index and 512b sector offset within that page calculate an offset into a request ' s kva region .