Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/nfsclient/nfs_clrpcops.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 8,909 Lines • ▼ Show 20 Lines | nfsm_split(struct mbuf *mp, uint64_t xfer) | ||||
m2->m_epg_flags |= EPG_FLAG_ANON; | m2->m_epg_flags |= EPG_FLAG_ANON; | ||||
/* | /* | ||||
* If left < plen, allocate a new page for the new mbuf | * If left < plen, allocate a new page for the new mbuf | ||||
* and copy the data after left in the page to this new | * and copy the data after left in the page to this new | ||||
* page. | * page. | ||||
*/ | */ | ||||
if (left < plen) { | if (left < plen) { | ||||
do { | pg = vm_page_alloc_noobj(VM_ALLOC_NORMAL | VM_ALLOC_WAITOK | | ||||
pg = vm_page_alloc(NULL, 0, VM_ALLOC_NORMAL | | VM_ALLOC_NODUMP | VM_ALLOC_WIRED); | ||||
VM_ALLOC_NOOBJ | VM_ALLOC_NODUMP | | |||||
VM_ALLOC_WIRED); | |||||
if (pg == NULL) | |||||
vm_wait(NULL); | |||||
} while (pg == NULL); | |||||
m2->m_epg_pa[0] = VM_PAGE_TO_PHYS(pg); | m2->m_epg_pa[0] = VM_PAGE_TO_PHYS(pg); | ||||
m2->m_epg_npgs = 1; | m2->m_epg_npgs = 1; | ||||
/* Copy the data after left to the new page. */ | /* Copy the data after left to the new page. */ | ||||
trim = plen - left; | trim = plen - left; | ||||
cp = (char *)(void *)PHYS_TO_DMAP(m->m_epg_pa[pgno]); | cp = (char *)(void *)PHYS_TO_DMAP(m->m_epg_pa[pgno]); | ||||
if (pgno == 0) | if (pgno == 0) | ||||
cp += m->m_epg_1st_off; | cp += m->m_epg_1st_off; | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |