Changeset View
Changeset View
Standalone View
Standalone View
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
Show First 20 Lines • Show All 1,704 Lines • ▼ Show 20 Lines | |||||
done: | done: | ||||
/* | /* | ||||
* Add this range to the dnode range list. | * Add this range to the dnode range list. | ||||
* We will finish up this free operation in the syncing phase. | * We will finish up this free operation in the syncing phase. | ||||
*/ | */ | ||||
mutex_enter(&dn->dn_mtx); | mutex_enter(&dn->dn_mtx); | ||||
int txgoff = tx->tx_txg & TXG_MASK; | int txgoff = tx->tx_txg & TXG_MASK; | ||||
if (dn->dn_free_ranges[txgoff] == NULL) { | if (dn->dn_free_ranges[txgoff] == NULL) { | ||||
dn->dn_free_ranges[txgoff] = range_tree_create(NULL, NULL); | dn->dn_free_ranges[txgoff] = range_tree_create(NULL, NULL, &dn->dn_mtx); | ||||
} | } | ||||
range_tree_clear(dn->dn_free_ranges[txgoff], blkid, nblks); | range_tree_clear(dn->dn_free_ranges[txgoff], blkid, nblks); | ||||
range_tree_add(dn->dn_free_ranges[txgoff], blkid, nblks); | range_tree_add(dn->dn_free_ranges[txgoff], blkid, nblks); | ||||
dprintf_dnode(dn, "blkid=%llu nblks=%llu txg=%llu\n", | dprintf_dnode(dn, "blkid=%llu nblks=%llu txg=%llu\n", | ||||
blkid, nblks, tx->tx_txg); | blkid, nblks, tx->tx_txg); | ||||
mutex_exit(&dn->dn_mtx); | mutex_exit(&dn->dn_mtx); | ||||
dbuf_free_range(dn, blkid, blkid + nblks - 1, tx); | dbuf_free_range(dn, blkid, blkid + nblks - 1, tx); | ||||
▲ Show 20 Lines • Show All 291 Lines • Show Last 20 Lines |