MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vfs_buf_test_cache

Function vfs_buf_test_cache

freebsd/kern/vfs_bio.c:956–971  ·  view source on GitHub ↗

* vfs_buf_test_cache: * * Called when a buffer is extended. This function clears the B_CACHE * bit if the newly extended portion of the buffer does not contain * valid data. */

Source from the content-addressed store, hash-verified

954 * valid data.
955 */
956static __inline void
957vfs_buf_test_cache(struct buf *bp, vm_ooffset_t foff, vm_offset_t off,
958 vm_offset_t size, vm_page_t m)
959{
960
961 /*
962 * This function and its results are protected by higher level
963 * synchronization requiring vnode and buf locks to page in and
964 * validate pages.
965 */
966 if (bp->b_flags & B_CACHE) {
967 int base = (foff + off) & PAGE_MASK;
968 if (vm_page_is_valid(m, base, size) == 0)
969 bp->b_flags &= ~B_CACHE;
970 }
971}
972
973/* Wake up the buffer daemon if necessary */
974static void

Callers 1

vfs_vmio_extendFunction · 0.85

Calls 1

vm_page_is_validFunction · 0.85

Tested by

no test coverage detected