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 local bounce memory region.
 *
 * \param reqlist The request structure whose bounce region will be accessed.
 * \param pagenr  The page index used to compute the bounce offset.
 * \param sector  The 512b sector index used to compute the page relative
 *                bounce offset.
 *
 * \return  The computed global bounce buffer address.
 */
Given a page index and 512b sector offset within that page,
calculate an offset into a request's local bounce memory region.

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

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