Lines Matching defs:hash_lock
1040 kmutex_t *hash_lock = BUF_HASH_LOCK(idx);
1043 mutex_enter(hash_lock);
1047 *lockp = hash_lock;
1051 mutex_exit(hash_lock);
1067 kmutex_t *hash_lock = BUF_HASH_LOCK(idx);
1076 *lockp = hash_lock;
1077 mutex_enter(hash_lock);
1079 ASSERT(MUTEX_HELD(hash_lock));
1636 * the hash_lock must be held or the hdr must be undiscoverable. This
1919 arc_fill_hdr_crypt(arc_buf_hdr_t *hdr, kmutex_t *hash_lock, spa_t *spa,
1926 if (hash_lock != NULL)
1927 mutex_enter(hash_lock);
1950 if (hash_lock != NULL)
1951 mutex_exit(hash_lock);
1956 if (hash_lock != NULL)
1957 mutex_exit(hash_lock);
2008 kmutex_t *hash_lock = (flags & ARC_FILL_LOCKED) ? NULL : HDR_LOCK(hdr);
2037 error = arc_fill_hdr_crypt(hdr, hash_lock, spa,
2042 if (hash_lock != NULL)
2043 mutex_enter(hash_lock);
2045 if (hash_lock != NULL)
2046 mutex_exit(hash_lock);
2070 if (hash_lock != NULL)
2071 mutex_enter(hash_lock);
2073 if (hash_lock != NULL)
2074 mutex_exit(hash_lock);
2157 if (hash_lock != NULL)
2158 mutex_enter(hash_lock);
2160 if (hash_lock != NULL)
2161 mutex_exit(hash_lock);
2757 * hold the hash_lock or be undiscoverable.
3081 * hold the hash_lock or be undiscoverable.
3710 kmutex_t *hash_lock = HDR_LOCK(hdr);
3711 mutex_enter(hash_lock);
3715 ASSERT3P(hash_lock, ==, HDR_LOCK(hdr));
3721 mutex_exit(hash_lock);
3890 kmutex_t *hash_lock;
3933 hash_lock = HDR_LOCK(hdr);
3944 ASSERT(!MUTEX_HELD(hash_lock));
3946 if (mutex_tryenter(hash_lock)) {
3949 mutex_exit(hash_lock);
4056 * it can't get a hash_lock on, and so, may not catch all candidates.
5311 * Avoid taking the hash_lock when possible as an optimization.
5312 * The header must be checked again under the hash_lock in order
5318 kmutex_t *hash_lock = HDR_LOCK(hdr);
5319 mutex_enter(hash_lock);
5322 mutex_exit(hash_lock);
5333 mutex_exit(hash_lock);
5394 kmutex_t *hash_lock = NULL;
5415 found = buf_hash_find(hdr->b_spa, zio->io_bp, &hash_lock);
5420 ASSERT3P(hash_lock, !=, NULL);
5545 ASSERT(callback_cnt < 2 || hash_lock != NULL);
5560 if (hash_lock != NULL)
5561 mutex_exit(hash_lock);
5607 kmutex_t *hash_lock = NULL;
5614 hdr = buf_hash_find(guid, bp, &hash_lock);
5645 mutex_exit(hash_lock);
5674 kmutex_t *hash_lock = NULL;
5700 * on the hash_lock always set and clear the bit.
5709 hdr = buf_hash_find(guid, bp, &hash_lock);
5730 mutex_exit(hash_lock);
5737 mutex_exit(hash_lock);
5804 mutex_exit(hash_lock);
5863 mutex_exit(hash_lock);
5882 if (hash_lock != NULL)
5883 mutex_exit(hash_lock);
5896 if (hash_lock != NULL)
5897 mutex_exit(hash_lock);
5914 exists = buf_hash_insert(hdr, &hash_lock);
5918 mutex_exit(hash_lock);
5967 mutex_exit(hash_lock);
6155 if (hash_lock != NULL)
6156 mutex_exit(hash_lock);
6173 if (hash_lock != NULL)
6174 mutex_enter(hash_lock);
6211 if (hash_lock != NULL)
6212 mutex_exit(hash_lock);
6335 kmutex_t *hash_lock;
6340 hdr = buf_hash_find(guid, bp, &hash_lock);
6368 mutex_exit(hash_lock);
6370 mutex_exit(hash_lock);
6421 kmutex_t *hash_lock = HDR_LOCK(hdr);
6422 mutex_enter(hash_lock);
6425 * This assignment is only valid as long as the hash_lock is
6430 ASSERT3P(hash_lock, ==, HDR_LOCK(hdr));
6544 mutex_exit(hash_lock);
6571 mutex_exit(hash_lock);
6793 kmutex_t *hash_lock;
6799 exists = buf_hash_insert(hdr, &hash_lock);
6814 mutex_exit(hash_lock);
6815 exists = buf_hash_insert(hdr, &hash_lock);
6837 mutex_exit(hash_lock);
8434 kmutex_t *hash_lock;
8457 hash_lock = HDR_LOCK(hdr);
8464 if (!mutex_tryenter(hash_lock)) {
8488 mutex_enter(hash_lock);
8489 mutex_exit(hash_lock);
8528 mutex_exit(hash_lock);
8707 kmutex_t *hash_lock;
8721 hash_lock = HDR_LOCK(hdr);
8722 mutex_enter(hash_lock);
8723 ASSERT3P(hash_lock, ==, HDR_LOCK(hdr));
8788 mutex_exit(hash_lock);
8830 mutex_exit(hash_lock);
8833 mutex_exit(hash_lock);
8921 kmutex_t *hash_lock;
9041 hash_lock = HDR_LOCK(hdr);
9048 if (!mutex_tryenter(hash_lock)) {
9054 mutex_enter(hash_lock);
9055 mutex_exit(hash_lock);
9074 mutex_exit(hash_lock);
9102 mutex_exit(hash_lock);
9332 kmutex_t *hash_lock;
9335 hash_lock = HDR_LOCK(hdr);
9336 if (!mutex_tryenter(hash_lock)) {
9351 mutex_exit(hash_lock);
9356 mutex_exit(hash_lock);
9377 mutex_exit(hash_lock);
9425 mutex_exit(hash_lock);
9460 mutex_exit(hash_lock);
10588 kmutex_t *hash_lock;
10618 exists = buf_hash_insert(hdr, &hash_lock);
10647 mutex_exit(hash_lock);