Lines Matching refs:hash_lock
871 kmutex_t *hash_lock = BUF_HASH_LOCK(idx); in buf_hash_find() local
874 mutex_enter(hash_lock); in buf_hash_find()
878 *lockp = hash_lock; in buf_hash_find()
882 mutex_exit(hash_lock); in buf_hash_find()
898 kmutex_t *hash_lock = BUF_HASH_LOCK(idx); in buf_hash_insert() local
907 *lockp = hash_lock; in buf_hash_insert()
908 mutex_enter(hash_lock); in buf_hash_insert()
910 ASSERT(MUTEX_HELD(hash_lock)); in buf_hash_insert()
1771 arc_fill_hdr_crypt(arc_buf_hdr_t *hdr, kmutex_t *hash_lock, spa_t *spa, in arc_fill_hdr_crypt() argument
1778 if (hash_lock != NULL) in arc_fill_hdr_crypt()
1779 mutex_enter(hash_lock); in arc_fill_hdr_crypt()
1802 if (hash_lock != NULL) in arc_fill_hdr_crypt()
1803 mutex_exit(hash_lock); in arc_fill_hdr_crypt()
1808 if (hash_lock != NULL) in arc_fill_hdr_crypt()
1809 mutex_exit(hash_lock); in arc_fill_hdr_crypt()
1822 arc_buf_untransform_in_place(arc_buf_t *buf, kmutex_t *hash_lock) in arc_buf_untransform_in_place() argument
1862 kmutex_t *hash_lock = (flags & ARC_FILL_LOCKED) ? NULL : HDR_LOCK(hdr); in arc_buf_fill() local
1891 error = arc_fill_hdr_crypt(hdr, hash_lock, spa, in arc_buf_fill()
1896 if (hash_lock != NULL) in arc_buf_fill()
1897 mutex_enter(hash_lock); in arc_buf_fill()
1899 if (hash_lock != NULL) in arc_buf_fill()
1900 mutex_exit(hash_lock); in arc_buf_fill()
1924 if (hash_lock != NULL) in arc_buf_fill()
1925 mutex_enter(hash_lock); in arc_buf_fill()
1926 arc_buf_untransform_in_place(buf, hash_lock); in arc_buf_fill()
1927 if (hash_lock != NULL) in arc_buf_fill()
1928 mutex_exit(hash_lock); in arc_buf_fill()
2003 if (hash_lock != NULL) in arc_buf_fill()
2004 mutex_enter(hash_lock); in arc_buf_fill()
2006 if (hash_lock != NULL) in arc_buf_fill()
2007 mutex_exit(hash_lock); in arc_buf_fill()
2179 remove_reference(arc_buf_hdr_t *hdr, kmutex_t *hash_lock, void *tag) in remove_reference() argument
2185 ASSERT(state == arc_anon || MUTEX_HELD(hash_lock)); in remove_reference()
2207 kmutex_t *hash_lock) in arc_change_state() argument
2237 ASSERT(MUTEX_HELD(hash_lock)); in arc_change_state()
3750 kmutex_t *hash_lock = HDR_LOCK(hdr); in arc_buf_destroy() local
3751 mutex_enter(hash_lock); in arc_buf_destroy()
3755 ASSERT3P(hash_lock, ==, HDR_LOCK(hdr)); in arc_buf_destroy()
3759 (void) remove_reference(hdr, hash_lock, tag); in arc_buf_destroy()
3761 mutex_exit(hash_lock); in arc_buf_destroy()
3777 arc_evict_hdr(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) in arc_evict_hdr() argument
3784 ASSERT(MUTEX_HELD(hash_lock)); in arc_evict_hdr()
3816 arc_change_state(arc_l2c_only, hdr, hash_lock); in arc_evict_hdr()
3824 arc_change_state(arc_anon, hdr, hash_lock); in arc_evict_hdr()
3898 arc_change_state(evicted_state, hdr, hash_lock); in arc_evict_hdr()
3914 kmutex_t *hash_lock; in arc_evict_state_impl() local
3959 hash_lock = HDR_LOCK(hdr); in arc_evict_state_impl()
3970 ASSERT(!MUTEX_HELD(hash_lock)); in arc_evict_state_impl()
3972 if (mutex_tryenter(hash_lock)) { in arc_evict_state_impl()
3973 uint64_t evicted = arc_evict_hdr(hdr, hash_lock); in arc_evict_state_impl()
3974 mutex_exit(hash_lock); in arc_evict_state_impl()
5111 arc_access(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) in arc_access() argument
5115 ASSERT(MUTEX_HELD(hash_lock)); in arc_access()
5128 arc_change_state(arc_mru, hdr, hash_lock); in arc_access()
5173 arc_change_state(arc_mfu, hdr, hash_lock); in arc_access()
5201 arc_change_state(new_state, hdr, hash_lock); in arc_access()
5234 arc_change_state(new_state, hdr, hash_lock); in arc_access()
5244 arc_change_state(arc_mfu, hdr, hash_lock); in arc_access()
5270 kmutex_t *hash_lock = HDR_LOCK(hdr); in arc_buf_access() local
5271 mutex_enter(hash_lock); in arc_buf_access()
5274 mutex_exit(hash_lock); in arc_buf_access()
5286 arc_access(hdr, hash_lock); in arc_buf_access()
5287 mutex_exit(hash_lock); in arc_buf_access()
5389 kmutex_t *hash_lock = NULL; in arc_read_done() local
5410 &hash_lock); in arc_read_done()
5415 ASSERT3P(hash_lock, !=, NULL); in arc_read_done()
5457 if (hash_lock && zio->io_error == 0 && in arc_read_done()
5465 arc_access(hdr, hash_lock); in arc_read_done()
5537 ASSERT(callback_cnt < 2 || hash_lock != NULL); in arc_read_done()
5552 arc_change_state(arc_anon, hdr, hash_lock); in arc_read_done()
5565 if (hash_lock != NULL) { in arc_read_done()
5566 mutex_exit(hash_lock); in arc_read_done()
5632 kmutex_t *hash_lock = NULL; in arc_read() local
5651 hdr = buf_hash_find(guid, bp, &hash_lock); in arc_read()
5688 cv_wait(&hdr->b_l1hdr.b_cv, hash_lock); in arc_read()
5689 mutex_exit(hash_lock); in arc_read()
5713 mutex_exit(hash_lock); in arc_read()
5716 mutex_exit(hash_lock); in arc_read()
5769 (void) remove_reference(hdr, hash_lock, in arc_read()
5786 arc_access(hdr, hash_lock); in arc_read()
5791 mutex_exit(hash_lock); in arc_read()
5821 exists = buf_hash_insert(hdr, &hash_lock); in arc_read()
5825 mutex_exit(hash_lock); in arc_read()
5860 cv_wait(&hdr->b_l1hdr.b_cv, hash_lock); in arc_read()
5861 mutex_exit(hash_lock); in arc_read()
5876 arc_access(hdr, hash_lock); in arc_read()
6043 if (hash_lock != NULL) in arc_read()
6044 mutex_exit(hash_lock); in arc_read()
6061 if (hash_lock != NULL) in arc_read()
6062 mutex_enter(hash_lock); in arc_read()
6085 if (hash_lock != NULL) in arc_read()
6086 mutex_exit(hash_lock); in arc_read()
6104 kmutex_t *hash_lock; in arc_freed() local
6109 hdr = buf_hash_find(guid, bp, &hash_lock); in arc_freed()
6137 arc_change_state(arc_anon, hdr, hash_lock); in arc_freed()
6139 mutex_exit(hash_lock); in arc_freed()
6141 mutex_exit(hash_lock); in arc_freed()
6201 kmutex_t *hash_lock = HDR_LOCK(hdr); in arc_release() local
6202 mutex_enter(hash_lock); in arc_release()
6211 cv_wait(&hdr->b_l1hdr.b_cv, hash_lock); in arc_release()
6220 ASSERT3P(hash_lock, ==, HDR_LOCK(hdr)); in arc_release()
6257 (void) remove_reference(hdr, hash_lock, tag); in arc_release()
6337 mutex_exit(hash_lock); in arc_release()
6367 arc_change_state(arc_anon, hdr, hash_lock); in arc_release()
6370 mutex_exit(hash_lock); in arc_release()
6604 kmutex_t *hash_lock; in arc_write_done() local
6610 exists = buf_hash_insert(hdr, &hash_lock); in arc_write_done()
6623 arc_change_state(arc_anon, exists, hash_lock); in arc_write_done()
6625 mutex_exit(hash_lock); in arc_write_done()
6626 exists = buf_hash_insert(hdr, &hash_lock); in arc_write_done()
6645 arc_access(hdr, hash_lock); in arc_write_done()
6646 mutex_exit(hash_lock); in arc_write_done()
7702 kmutex_t *hash_lock; in l2arc_write_done() local
7725 hash_lock = HDR_LOCK(hdr); in l2arc_write_done()
7732 if (!mutex_tryenter(hash_lock)) { in l2arc_write_done()
7756 mutex_enter(hash_lock); in l2arc_write_done()
7757 mutex_exit(hash_lock); in l2arc_write_done()
7790 mutex_exit(hash_lock); in l2arc_write_done()
7970 kmutex_t *hash_lock; in l2arc_read_done() local
7984 hash_lock = HDR_LOCK(hdr); in l2arc_read_done()
7985 mutex_enter(hash_lock); in l2arc_read_done()
7986 ASSERT3P(hash_lock, ==, HDR_LOCK(hdr)); in l2arc_read_done()
8050 mutex_exit(hash_lock); in l2arc_read_done()
8092 mutex_exit(hash_lock); in l2arc_read_done()
8095 mutex_exit(hash_lock); in l2arc_read_done()
8181 kmutex_t *hash_lock; in l2arc_evict() local
8274 hash_lock = HDR_LOCK(hdr); in l2arc_evict()
8281 if (!mutex_tryenter(hash_lock)) { in l2arc_evict()
8287 mutex_enter(hash_lock); in l2arc_evict()
8288 mutex_exit(hash_lock); in l2arc_evict()
8307 mutex_exit(hash_lock); in l2arc_evict()
8318 arc_change_state(arc_anon, hdr, hash_lock); in l2arc_evict()
8335 mutex_exit(hash_lock); in l2arc_evict()
8553 kmutex_t *hash_lock; in l2arc_write_buffers() local
8561 hash_lock = HDR_LOCK(hdr); in l2arc_write_buffers()
8562 if (!mutex_tryenter(hash_lock)) { in l2arc_write_buffers()
8574 mutex_exit(hash_lock); in l2arc_write_buffers()
8579 mutex_exit(hash_lock); in l2arc_write_buffers()
8595 mutex_exit(hash_lock); in l2arc_write_buffers()
8637 mutex_exit(hash_lock); in l2arc_write_buffers()
8699 mutex_exit(hash_lock); in l2arc_write_buffers()
9659 kmutex_t *hash_lock; in l2arc_hdr_restore() local
9690 exists = buf_hash_insert(hdr, &hash_lock); in l2arc_hdr_restore()
9717 mutex_exit(hash_lock); in l2arc_hdr_restore()