Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
Show First 20 Lines • Show All 416 Lines • ▼ Show 20 Lines | if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && | ||||
pp->valid) { | pp->valid) { | ||||
if (vm_page_xbusied(pp)) { | if (vm_page_xbusied(pp)) { | ||||
/* | /* | ||||
* Reference the page before unlocking and | * Reference the page before unlocking and | ||||
* sleeping so that the page daemon is less | * sleeping so that the page daemon is less | ||||
* likely to reclaim it. | * likely to reclaim it. | ||||
*/ | */ | ||||
vm_page_reference(pp); | vm_page_reference(pp); | ||||
vm_page_lock(pp); | vm_page_sleep_if_xbusy(pp, "zfsmwb"); | ||||
zfs_vmobject_wunlock(obj); | |||||
vm_page_busy_sleep(pp, "zfsmwb", true); | |||||
zfs_vmobject_wlock(obj); | |||||
continue; | continue; | ||||
} | } | ||||
vm_page_sbusy(pp); | vm_page_sbusy(pp); | ||||
} else if (pp != NULL) { | } else if (pp != NULL) { | ||||
ASSERT(!pp->valid); | ASSERT(!pp->valid); | ||||
pp = NULL; | pp = NULL; | ||||
} | } | ||||
Show All 31 Lines | if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && | ||||
pp->valid) { | pp->valid) { | ||||
if (vm_page_xbusied(pp)) { | if (vm_page_xbusied(pp)) { | ||||
/* | /* | ||||
* Reference the page before unlocking and | * Reference the page before unlocking and | ||||
* sleeping so that the page daemon is less | * sleeping so that the page daemon is less | ||||
* likely to reclaim it. | * likely to reclaim it. | ||||
*/ | */ | ||||
vm_page_reference(pp); | vm_page_reference(pp); | ||||
vm_page_lock(pp); | vm_page_sleep_if_xbusy(pp, "zfsmwb"); | ||||
zfs_vmobject_wunlock(obj); | |||||
vm_page_busy_sleep(pp, "zfsmwb", true); | |||||
zfs_vmobject_wlock(obj); | |||||
continue; | continue; | ||||
} | } | ||||
ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); | ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); | ||||
vm_page_lock(pp); | vm_page_lock(pp); | ||||
vm_page_wire(pp); | vm_page_wire(pp); | ||||
vm_page_unlock(pp); | vm_page_unlock(pp); | ||||
} else | } else | ||||
▲ Show 20 Lines • Show All 5,583 Lines • Show Last 20 Lines |