* 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. */
| 954 | * valid data. |
| 955 | */ |
| 956 | static __inline void |
| 957 | vfs_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 */ |
| 974 | static void |
no test coverage detected