Date: Sun, 14 Oct 2012 09:37:09 +0200 From: Martin Husemann <mar...@duskware.de>
In the zfs code, where do they store the mutex needed for cv_wait? In the two cases I have come across, dirent locks and range locks, a number of condvars, one per dirent or one per range, share a common mutex in some common enclosing object, such as a znode. So, e.g., the end of zfs_dirent_unlock looks like cv_broadcast(&dl->dl_cv); /* dl is a dirent lock stored in dzp. */ mutex_unlock(&dzp->z_lock); cv_destroy(&dl->dl_cv); kmem_free(dl, sizeof(*dl));