CVSROOT: /cvs Module name: src Changes by: b...@cvs.openbsd.org 2012/11/17 16:08:22
Modified files: sys/sys : buf.h sys/kern : vfs_subr.c vfs_biomem.c Log message: Don't map a buffer (and potentially sleep) when invalidating it in vinvalbuf. This fixes a problem where we could sleep for kva and then our pointers would not be valid on the next pass through the loop. We do this by adding buf_acquire_nomap() - which can be used to busy up the buffer without changing its mapped or unmapped state. We do not need to have the buffer mapped to invalidate it, so it is sufficient to acquire it for that. In the case where we write the buffer, we do map the buffer, and potentially sleep.