Lines Matching defs:ol
129 * ol->ol_xthread is set to the current thread to lock the oplock against
132 * reset ol->ol_xthread and wake any waiting threads.
137 smb_oplock_t *ol;
162 ol = &node->n_oplock;
163 grants = &ol->ol_grants;
165 mutex_enter(&ol->ol_mutex);
195 mutex_exit(&ol->ol_mutex);
206 mutex_exit(&ol->ol_mutex);
210 ol->ol_xthread = curthread;
211 mutex_exit(&ol->ol_mutex);
245 smb_oplock_t *ol;
252 ol = &node->n_oplock;
253 grants = &ol->ol_grants;
255 mutex_enter(&ol->ol_mutex);
260 mutex_exit(&ol->ol_mutex);
268 mutex_exit(&ol->ol_mutex);
281 mutex_exit(&ol->ol_mutex);
292 switch (ol->ol_break) {
294 ol->ol_break = brk;
299 ol->ol_break = SMB_OPLOCK_BREAK_TO_NONE;
307 mutex_exit(&ol->ol_mutex);
318 mutex_exit(&ol->ol_mutex);
344 smb_oplock_t *ol;
346 ol = &node->n_oplock;
347 mutex_enter(&ol->ol_mutex);
350 if (ol->ol_xthread != NULL) {
352 ol->ol_brk_pending = SMB_OPLOCK_BREAK_TO_NONE;
358 mutex_exit(&ol->ol_mutex);
371 smb_oplock_t *ol;
375 ol = &node->n_oplock;
376 grants = &ol->ol_grants;
378 ASSERT(MUTEX_HELD(&ol->ol_mutex));
379 ASSERT(ol->ol_xthread == NULL);
486 smb_oplock_t *ol;
489 ol = &node->n_oplock;
490 mutex_enter(&ol->ol_mutex);
493 while (ol->ol_break != SMB_OPLOCK_NO_BREAK) {
494 if (cv_timedwait(&ol->ol_cv, &ol->ol_mutex, time) < 0) {
496 cv_broadcast(&ol->ol_cv);
500 mutex_exit(&ol->ol_mutex);
513 smb_oplock_t *ol;
517 ol = &node->n_oplock;
518 grants = &ol->ol_grants;
520 ASSERT(MUTEX_HELD(&ol->ol_mutex));
524 switch (ol->ol_break) {
537 ol->ol_break = SMB_OPLOCK_NO_BREAK;
551 smb_oplock_t *ol;
554 ol = &node->n_oplock;
555 mutex_enter(&ol->ol_mutex);
558 og = smb_oplock_get_grant(ol, of);
563 if (ol->ol_break != SMB_OPLOCK_NO_BREAK) {
564 ol->ol_break = SMB_OPLOCK_NO_BREAK;
565 cv_broadcast(&ol->ol_cv);
569 mutex_exit(&ol->ol_mutex);
590 smb_oplock_t *ol;
593 ol = &node->n_oplock;
594 mutex_enter(&ol->ol_mutex);
597 if ((ol->ol_break == SMB_OPLOCK_NO_BREAK) ||
598 ((og = smb_oplock_get_grant(ol, of)) == NULL)) {
599 mutex_exit(&ol->ol_mutex);
608 if (ol->ol_break == SMB_OPLOCK_BREAK_TO_LEVEL_II) {
626 ol->ol_break = SMB_OPLOCK_NO_BREAK;
627 cv_broadcast(&ol->ol_cv);
629 mutex_exit(&ol->ol_mutex);
637 * ol->ol_xthread identifies the thread that was performing an oplock
645 smb_oplock_t *ol;
648 ol = &node->n_oplock;
650 mutex_enter(&ol->ol_mutex);
651 if ((ol->ol_xthread != NULL) && (ol->ol_xthread == curthread)) {
652 ol->ol_xthread = NULL;
653 if (ol->ol_brk_pending) {
654 ol->ol_brk_pending = 0;
657 cv_broadcast(&ol->ol_cv);
659 mutex_exit(&ol->ol_mutex);
673 smb_oplock_t *ol;
675 ol = &node->n_oplock;
676 ASSERT(MUTEX_HELD(&ol->ol_mutex));
678 if ((ol->ol_xthread != NULL) && (ol->ol_xthread != curthread)) {
679 while (ol->ol_xthread != NULL)
680 cv_wait(&ol->ol_cv, &ol->ol_mutex);
724 smb_oplock_t *ol = &node->n_oplock;
726 ASSERT(MUTEX_HELD(&ol->ol_mutex));
728 if (ol->ol_count == 0) {
733 list_insert_tail(&ol->ol_grants, og);
734 ++ol->ol_count;
748 smb_oplock_t *ol = &node->n_oplock;
750 ASSERT(MUTEX_HELD(&ol->ol_mutex));
751 ASSERT(ol->ol_count > 0);
753 list_remove(&ol->ol_grants, og);
754 if (--ol->ol_count == 0)
784 smb_oplock_get_grant(smb_oplock_t *ol, smb_ofile_t *ofile)
786 ASSERT(MUTEX_HELD(&ol->ol_mutex));