Lines Matching defs:locks
73 * There are three basic locks for managing spa_t structures:
164 * To read the configuration, it suffices to hold one of these locks as reader.
165 * To modify the configuration, you must hold all locks as writer. To modify
169 * We use these distinct config locks to avoid recursive lock entry.
174 * The spa config locks cannot be normal rwlocks because we need the
211 * other locks, and lower than all of them, to ensure that it's safe
480 spa_config_tryenter(spa_t *spa, int locks, const void *tag, krw_t rw)
484 if (!(locks & (1 << i)))
490 spa_config_exit(spa, locks & ((1 << i) - 1),
498 spa_config_exit(spa, locks & ((1 << i) - 1),
511 spa_config_enter_impl(spa_t *spa, int locks, const void *tag, krw_t rw,
523 if (!(locks & (1 << i)))
543 ASSERT3U(wlocks_held, <=, locks);
547 spa_config_enter(spa_t *spa, int locks, const void *tag, krw_t rw)
549 spa_config_enter_impl(spa, locks, tag, rw, 0);
562 spa_config_enter_mmp(spa_t *spa, int locks, const void *tag, krw_t rw)
564 spa_config_enter_impl(spa, locks, tag, rw, 1);
568 spa_config_exit(spa_t *spa, int locks, const void *tag)
573 if (!(locks & (1 << i)))
588 spa_config_held(spa_t *spa, int locks, krw_t rw)
594 if (!(locks & (1 << i)))
1399 int locks = SCL_STATE_ALL | oplocks;
1411 int low = locks & ~(SCL_ZIO - 1);
1412 int high = locks & ~low;
1418 spa_config_enter(spa, locks, spa, RW_WRITER);
1420 spa->spa_vdev_locks = locks;
2835 * config locks, so it is sufficient to hold SCL_VDEV as reader when