| 254 | } |
| 255 | |
| 256 | static void |
| 257 | vm_pager_assert_in(vm_object_t object, vm_page_t *m, int count) |
| 258 | { |
| 259 | #ifdef INVARIANTS |
| 260 | |
| 261 | /* |
| 262 | * All pages must be consecutive, busied, not mapped, not fully valid, |
| 263 | * not dirty and belong to the proper object. Some pages may be the |
| 264 | * bogus page, but the first and last pages must be a real ones. |
| 265 | */ |
| 266 | |
| 267 | VM_OBJECT_ASSERT_UNLOCKED(object); |
| 268 | VM_OBJECT_ASSERT_PAGING(object); |
| 269 | KASSERT(count > 0, ("%s: 0 count", __func__)); |
| 270 | for (int i = 0 ; i < count; i++) { |
| 271 | if (m[i] == bogus_page) { |
| 272 | KASSERT(i != 0 && i != count - 1, |
| 273 | ("%s: page %d is the bogus page", __func__, i)); |
| 274 | continue; |
| 275 | } |
| 276 | vm_page_assert_xbusied(m[i]); |
| 277 | KASSERT(!pmap_page_is_mapped(m[i]), |
| 278 | ("%s: page %p is mapped", __func__, m[i])); |
| 279 | KASSERT(m[i]->valid != VM_PAGE_BITS_ALL, |
| 280 | ("%s: request for a valid page %p", __func__, m[i])); |
| 281 | KASSERT(m[i]->dirty == 0, |
| 282 | ("%s: page %p is dirty", __func__, m[i])); |
| 283 | KASSERT(m[i]->object == object, |
| 284 | ("%s: wrong object %p/%p", __func__, object, m[i]->object)); |
| 285 | KASSERT(m[i]->pindex == m[0]->pindex + i, |
| 286 | ("%s: page %p isn't consecutive", __func__, m[i])); |
| 287 | } |
| 288 | #endif |
| 289 | } |
| 290 | |
| 291 | /* |
| 292 | * Page in the pages for the object using its associated pager. |
no test coverage detected