* waitrunningbufspace() * * runningbufspace is a measure of the amount of I/O currently * running. This routine is used in async-write situations to * prevent creating huge backups of pending writes to a device. * Only asynchronous writes are governed by this function. * * This does NOT turn an async write into a sync write. It waits * for earlier writes to complete and generally retur
| 935 | * caller's write has reached the device. |
| 936 | */ |
| 937 | void |
| 938 | waitrunningbufspace(void) |
| 939 | { |
| 940 | |
| 941 | mtx_lock(&rbreqlock); |
| 942 | while (runningbufspace > hirunningspace) { |
| 943 | runningbufreq = 1; |
| 944 | msleep(&runningbufreq, &rbreqlock, PVM, "wdrain", 0); |
| 945 | } |
| 946 | mtx_unlock(&rbreqlock); |
| 947 | } |
| 948 | |
| 949 | /* |
| 950 | * vfs_buf_test_cache: |
no test coverage detected