diff options
author | jeff <jeff@FreeBSD.org> | 2003-08-31 07:29:34 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-08-31 07:29:34 +0000 |
commit | 72d0a20a690e52926df6980a653ddc00411bcb9b (patch) | |
tree | 91c8417f2b3dc827172673070d4e4c17c33d1614 /libexec | |
parent | b1cfa5d0032bc758a5c3ef3a003844aa5af16998 (diff) | |
download | FreeBSD-src-72d0a20a690e52926df6980a653ddc00411bcb9b.zip FreeBSD-src-72d0a20a690e52926df6980a653ddc00411bcb9b.tar.gz |
- Don't acquire the vnode interlock in drain_output(). Instead, require the
caller to acquire it. This permits drain_output() to be done atomically
with other operations as well as reducing the number of lock operations.
- Assert that the proper locks are held in drain_output().
- Change getdirtybuf() to accept a mutex as an argument. This mutex is used
to protect the vnode's buf list and the BKGRDWAIT flag. This lock is
dropped when we successfully acquire a buffer and held on return
otherwise. These semantics reduce the number of cumbersome cases in
calling code.
- Pass the mtx from getdirtybuf() into interlocked_sleep() and allow this
mutex to be used as the interlock argument to BUF_LOCK() in the LOCKBUF
case of interlocked_sleep().
- Change the return value of getdirtybuf() to be the resulting locked buffer
or NULL otherwise. This is for callers who pass in a list head that
requires a lock. It is necessary since the lock that protects the list
head must be dropped in getdirtybuf() so that we don't have a lock order
reversal with the buf queues lock in bremfree().
- Adjust all callers of getdirtybuf() to match the new semantics.
- Add a comment in indir_trunc() that points at unlocked access to a buf.
This may also be one of the last instances of incore() in the tree.
Diffstat (limited to 'libexec')
0 files changed, 0 insertions, 0 deletions