Lines Matching refs:spa_keystore

403 	ASSERT(RW_LOCK_HELD(&spa->spa_keystore.sk_wkeys_lock));  in spa_keystore_wkey_hold_ddobj_impl()
409 found_wkey = avl_find(&spa->spa_keystore.sk_wkeys, &search_wkey, NULL); in spa_keystore_wkey_hold_ddobj_impl()
435 if (!RW_WRITE_HELD(&spa->spa_keystore.sk_wkeys_lock)) { in spa_keystore_wkey_hold_dd()
436 rw_enter(&spa->spa_keystore.sk_wkeys_lock, RW_READER); in spa_keystore_wkey_hold_dd()
452 rw_exit(&spa->spa_keystore.sk_wkeys_lock); in spa_keystore_wkey_hold_dd()
459 rw_exit(&spa->spa_keystore.sk_wkeys_lock); in spa_keystore_wkey_hold_dd()
636 ASSERT(RW_LOCK_HELD(&spa->spa_keystore.sk_dk_lock)); in spa_keystore_dsl_key_hold_impl()
642 found_dck = avl_find(&spa->spa_keystore.sk_dsl_keys, &search_dck, NULL); in spa_keystore_dsl_key_hold_impl()
670 rw_enter(&spa->spa_keystore.sk_dk_lock, RW_READER); in spa_keystore_dsl_key_hold_dd()
672 rw_exit(&spa->spa_keystore.sk_dk_lock); in spa_keystore_dsl_key_hold_dd()
699 rw_enter(&spa->spa_keystore.sk_dk_lock, RW_WRITER); in spa_keystore_dsl_key_hold_dd()
702 (void) avl_find(&spa->spa_keystore.sk_dsl_keys, dck_io, &where); in spa_keystore_dsl_key_hold_dd()
703 avl_insert(&spa->spa_keystore.sk_dsl_keys, dck_io, where); in spa_keystore_dsl_key_hold_dd()
712 rw_exit(&spa->spa_keystore.sk_dk_lock); in spa_keystore_dsl_key_hold_dd()
720 rw_enter(&spa->spa_keystore.sk_dk_lock, RW_WRITER); in spa_keystore_dsl_key_rele()
723 avl_remove(&spa->spa_keystore.sk_dsl_keys, dck); in spa_keystore_dsl_key_rele()
727 rw_exit(&spa->spa_keystore.sk_dk_lock); in spa_keystore_dsl_key_rele()
737 rw_enter(&spa->spa_keystore.sk_wkeys_lock, RW_WRITER); in spa_keystore_load_wkey_impl()
740 found_wkey = avl_find(&spa->spa_keystore.sk_wkeys, wkey, &where); in spa_keystore_load_wkey_impl()
745 avl_insert(&spa->spa_keystore.sk_wkeys, wkey, where); in spa_keystore_load_wkey_impl()
747 rw_exit(&spa->spa_keystore.sk_wkeys_lock); in spa_keystore_load_wkey_impl()
752 rw_exit(&spa->spa_keystore.sk_wkeys_lock); in spa_keystore_load_wkey_impl()
867 rw_enter(&spa->spa_keystore.sk_wkeys_lock, RW_WRITER); in spa_keystore_unload_wkey_impl()
870 found_wkey = avl_find(&spa->spa_keystore.sk_wkeys, in spa_keystore_unload_wkey_impl()
879 avl_remove(&spa->spa_keystore.sk_wkeys, found_wkey); in spa_keystore_unload_wkey_impl()
881 rw_exit(&spa->spa_keystore.sk_wkeys_lock); in spa_keystore_unload_wkey_impl()
889 rw_exit(&spa->spa_keystore.sk_wkeys_lock); in spa_keystore_unload_wkey_impl()
981 rw_enter(&spa->spa_keystore.sk_km_lock, RW_WRITER); in key_mapping_rele()
983 rw_exit(&spa->spa_keystore.sk_km_lock); in key_mapping_rele()
987 avl_remove(&spa->spa_keystore.sk_key_mappings, km); in key_mapping_rele()
988 rw_exit(&spa->spa_keystore.sk_km_lock); in key_mapping_rele()
1020 rw_enter(&spa->spa_keystore.sk_km_lock, RW_WRITER); in spa_keystore_create_mapping()
1030 found_km = avl_find(&spa->spa_keystore.sk_key_mappings, km, &where); in spa_keystore_create_mapping()
1038 avl_insert(&spa->spa_keystore.sk_key_mappings, km, where); in spa_keystore_create_mapping()
1043 rw_exit(&spa->spa_keystore.sk_km_lock); in spa_keystore_create_mapping()
1064 rw_enter(&spa->spa_keystore.sk_km_lock, RW_READER); in spa_keystore_remove_mapping()
1067 found_km = avl_find(&spa->spa_keystore.sk_key_mappings, in spa_keystore_remove_mapping()
1074 rw_exit(&spa->spa_keystore.sk_km_lock); in spa_keystore_remove_mapping()
1081 rw_exit(&spa->spa_keystore.sk_km_lock); in spa_keystore_remove_mapping()
1106 rw_enter(&spa->spa_keystore.sk_km_lock, RW_READER); in spa_keystore_lookup_key()
1109 found_km = avl_find(&spa->spa_keystore.sk_key_mappings, &search_km, in spa_keystore_lookup_key()
1119 rw_exit(&spa->spa_keystore.sk_km_lock); in spa_keystore_lookup_key()
1126 rw_exit(&spa->spa_keystore.sk_km_lock); in spa_keystore_lookup_key()
1415 ASSERT(RW_WRITE_HELD(&dp->dp_spa->spa_keystore.sk_wkeys_lock)); in spa_keystore_change_key_sync_impl()
1566 rw_enter(&spa->spa_keystore.sk_wkeys_lock, RW_WRITER); in spa_keystore_change_key_sync()
1577 found_wkey = avl_find(&spa->spa_keystore.sk_wkeys, &wkey_search, NULL); in spa_keystore_change_key_sync()
1580 avl_remove(&spa->spa_keystore.sk_wkeys, found_wkey); in spa_keystore_change_key_sync()
1585 (void) avl_find(&spa->spa_keystore.sk_wkeys, wkey, &where); in spa_keystore_change_key_sync()
1586 avl_insert(&spa->spa_keystore.sk_wkeys, wkey, where); in spa_keystore_change_key_sync()
1591 rw_exit(&spa->spa_keystore.sk_wkeys_lock); in spa_keystore_change_key_sync()
1742 rw_enter(&dp->dp_spa->spa_keystore.sk_wkeys_lock, RW_WRITER); in dsl_dataset_promote_crypt_sync()
1745 rw_exit(&dp->dp_spa->spa_keystore.sk_wkeys_lock); in dsl_dataset_promote_crypt_sync()