* vm_page_is_valid: * * Is (partial) page valid? Note that the case where size == 0 * will return FALSE in the degenerate case where the page is * entirely invalid, and TRUE otherwise. * * Some callers envoke this routine without the busy lock held and * handle races via higher level locks. Typical callers should * hold a busy lock to prevent invalidation. */
| 5319 | * hold a busy lock to prevent invalidation. |
| 5320 | */ |
| 5321 | int |
| 5322 | vm_page_is_valid(vm_page_t m, int base, int size) |
| 5323 | { |
| 5324 | vm_page_bits_t bits; |
| 5325 | |
| 5326 | bits = vm_page_bits(base, size); |
| 5327 | return (m->valid != 0 && (m->valid & bits) == bits); |
| 5328 | } |
| 5329 | |
| 5330 | /* |
| 5331 | * Returns true if all of the specified predicates are true for the entire |
no test coverage detected