MCPcopy Create free account
hub / github.com/F-Stack/f-stack / livelist_delete_sync

Function livelist_delete_sync

freebsd/contrib/openzfs/module/zfs/spa.c:2452–2475  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2450} livelist_delete_arg_t;
2451
2452static void
2453livelist_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,

Callers

nothing calls this directly

Calls 7

zap_remove_intFunction · 0.85
dsl_deadlist_freeFunction · 0.85
spa_feature_decrFunction · 0.85
zap_countFunction · 0.85
zap_removeFunction · 0.85
zap_destroyFunction · 0.85
spa_notify_waitersFunction · 0.85

Tested by

no test coverage detected