bp_mapin(D3)bp_mapin(D3)NAMEbp_mapin - allocate virtual address space for buffer page list
SYNOPSIS
#include <sys/types.h>
#include <sys/buf.h>
#include <sys/ddi.h>
void bp_mapin(struct buf_t *bp);
Arguments
bp Pointer to the buffer header structure.
DESCRIPTION
The bp_mapin function is used to map virtual address space to a page list
maintained by the buffer header [see buf(D4)] during a paged-I/O request.
Return Values
None
USAGE
A paged-I/O request is identified by the B_PAGEIO flag being set in the
b_flags field of the buffer header passed to a driver's strategy(D2)
routine.
bp_mapin allocates system virtual address space, maps that space to the
page list, and returns the new virtual address in the b_un.b_addr field
of the buf structure. This address is the virtual address of the start
of the page mappings, plus the offset given by the original value of bp-
>b_un.b_addr. After the I/O completes, the virtual address space can be
deallocated using the bp_mapout(D3) function.
Level
Base only.
Synchronization Constraints
This routine may sleep if virtual space is not immediately available.
Driver-defined basic locks and read/write locks may not be held across
calls to this function.
Driver-defined sleep locks may be held across calls to this function.
REFERENCESbp_mapout(D3), buf(D4), strategy(D2)
Page 1