return( vm_map_last_entry(map)->vme_end);
}
-/*
- * Legacy routines to get the start and end for a vm_map_t. They
- * return them in the vm_offset_t format. So, they should only be
- * called on maps that are the same size as the kernel map for
- * accurate results.
- */
-vm_offset_t
-get_vm_start(
- vm_map_t map)
-{
- return(CAST_DOWN(vm_offset_t, vm_map_first_entry(map)->vme_start));
-}
-
-vm_offset_t
-get_vm_end(
- vm_map_t map)
-{
- return(CAST_DOWN(vm_offset_t, vm_map_last_entry(map)->vme_end));
-}
-
/*
* BSD VNODE PAGER
*/
vnode_pager_synchronize,
vnode_pager_map,
vnode_pager_last_unmap,
+ NULL, /* data_reclaim */
"vnode pager"
};
*/
break;
}
- if (dst_page->pageout) {
+ if (dst_page->pageout || dst_page->cleaning) {
/*
* this is the list_req_pending | pageout | busy case
- * which can originate from both the pageout_scan and
- * msync worlds... we need to reset the state of this page to indicate
+ * or the list_req_pending | cleaning case...
+ * which originate from the pageout_scan and
+ * msync worlds for the pageout case and the hibernate
+ * pre-cleaning world for the cleaning case...
+ * we need to reset the state of this page to indicate
* it should stay in the cache marked dirty... nothing else we
* can do at this point... we can't block on it, we can't busy
* it and we can't clean it from this routine.
size = (vm_size_t) sizeof(struct vnode_pager);
vnode_pager_zone = zinit(size, (vm_size_t) MAX_VNODE*size,
PAGE_SIZE, "vnode pager structures");
+ zone_change(vnode_pager_zone, Z_CALLERACCT, FALSE);
+ zone_change(vnode_pager_zone, Z_NOENCRYPT, TRUE);
+
+
#if CONFIG_CODE_DECRYPTION
apple_protect_pager_bootstrap();
#endif /* CONFIG_CODE_DECRYPTION */
return KERN_SUCCESS;
}
+kern_return_t
+vnode_pager_get_isSSD(
+ memory_object_t mem_obj,
+ boolean_t *isSSD)
+{
+ vnode_pager_t vnode_object;
+
+ if (mem_obj->mo_pager_ops != &vnode_pager_ops)
+ return KERN_INVALID_ARGUMENT;
+
+ vnode_object = vnode_pager_lookup(mem_obj);
+
+ *isSSD = vnode_pager_isSSD(vnode_object->vnode_handle);
+ return KERN_SUCCESS;
+}
+
kern_return_t
vnode_pager_get_object_size(
memory_object_t mem_obj,
blobs);
}
+#if CHECK_CS_VALIDATION_BITMAP
+kern_return_t
+vnode_pager_cs_check_validation_bitmap(
+ memory_object_t mem_obj,
+ memory_object_offset_t offset,
+ int optype )
+{
+ vnode_pager_t vnode_object;
+
+ if (mem_obj == MEMORY_OBJECT_NULL ||
+ mem_obj->mo_pager_ops != &vnode_pager_ops) {
+ return KERN_INVALID_ARGUMENT;
+ }
+
+ vnode_object = vnode_pager_lookup(mem_obj);
+ return ubc_cs_check_validation_bitmap( vnode_object->vnode_handle, offset, optype );
+}
+#endif /* CHECK_CS_VALIDATION_BITMAP */
+
/*
*
*/