| 2450 | } livelist_delete_arg_t; |
| 2451 | |
| 2452 | static void |
| 2453 | livelist_delete_sync(void *arg, dmu_tx_t *tx) |
| 2454 | { |
| 2455 | livelist_delete_arg_t *lda = arg; |
| 2456 | spa_t *spa = lda->spa; |
| 2457 | uint64_t ll_obj = lda->ll_obj; |
| 2458 | uint64_t zap_obj = lda->zap_obj; |
| 2459 | objset_t *mos = spa->spa_meta_objset; |
| 2460 | uint64_t count; |
| 2461 | |
| 2462 | /* free the livelist and decrement the feature count */ |
| 2463 | VERIFY0(zap_remove_int(mos, zap_obj, ll_obj, tx)); |
| 2464 | dsl_deadlist_free(mos, ll_obj, tx); |
| 2465 | spa_feature_decr(spa, SPA_FEATURE_LIVELIST, tx); |
| 2466 | VERIFY0(zap_count(mos, zap_obj, &count)); |
| 2467 | if (count == 0) { |
| 2468 | /* no more livelists to delete */ |
| 2469 | VERIFY0(zap_remove(mos, DMU_POOL_DIRECTORY_OBJECT, |
| 2470 | DMU_POOL_DELETED_CLONES, tx)); |
| 2471 | VERIFY0(zap_destroy(mos, zap_obj, tx)); |
| 2472 | spa->spa_livelists_to_delete = 0; |
| 2473 | spa_notify_waiters(spa); |
| 2474 | } |
| 2475 | } |
| 2476 | |
| 2477 | /* |
| 2478 | * Load in the value for the livelist to be removed and open it. Then, |
nothing calls this directly
no test coverage detected