Lines Matching defs:txh

104 	dmu_tx_hold_t *txh;
129 txh = kmem_zalloc(sizeof (dmu_tx_hold_t), KM_SLEEP);
130 txh->txh_tx = tx;
131 txh->txh_dnode = dn;
132 refcount_create(&txh->txh_space_towrite);
133 refcount_create(&txh->txh_space_tofree);
134 refcount_create(&txh->txh_space_tooverwrite);
135 refcount_create(&txh->txh_space_tounref);
136 refcount_create(&txh->txh_memory_tohold);
137 refcount_create(&txh->txh_fudge);
139 txh->txh_type = type;
140 txh->txh_arg1 = arg1;
141 txh->txh_arg2 = arg2;
143 list_insert_tail(&tx->tx_holds, txh);
145 return (txh);
178 dmu_tx_count_twig(dmu_tx_hold_t *txh, dnode_t *dn, dmu_buf_impl_t *db,
211 (void) refcount_add_many(&txh->txh_space_tooverwrite,
214 (void) refcount_add_many(&txh->txh_space_towrite,
219 (void) refcount_add_many(&txh->txh_space_tounref,
223 dmu_tx_count_twig(txh, dn, parent, level + 1,
229 dmu_tx_count_write(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
231 dnode_t *dn = txh->txh_dnode;
240 max_bs = highbit64(txh->txh_tx->tx_objset->os_recordsize) - 1;
336 txh->txh_tx->tx_err = err;
340 dmu_tx_count_twig(txh, dn, db, 0, start, B_FALSE,
353 &txh->txh_fudge,
371 (void) refcount_add_many(&txh->txh_space_towrite,
387 (void) refcount_add_many(&txh->txh_space_towrite,
394 (void) refcount_add_many(&txh->txh_space_towrite,
400 if (refcount_count(&txh->txh_space_towrite) +
401 refcount_count(&txh->txh_space_tooverwrite) >
406 txh->txh_tx->tx_err = err;
410 dmu_tx_count_dnode(dmu_tx_hold_t *txh)
412 dnode_t *dn = txh->txh_dnode;
413 dnode_t *mdn = DMU_META_DNODE(txh->txh_tx->tx_objset);
420 (void) refcount_add_many(&txh->txh_space_tooverwrite,
422 (void) refcount_add_many(&txh->txh_space_tounref, space, FTAG);
424 (void) refcount_add_many(&txh->txh_space_towrite, space, FTAG);
426 (void) refcount_add_many(&txh->txh_space_tounref,
435 dmu_tx_hold_t *txh;
441 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
443 if (txh == NULL)
446 dmu_tx_count_write(txh, off, len);
447 dmu_tx_count_dnode(txh);
451 dmu_tx_count_free(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
455 dnode_t *dn = txh->txh_dnode;
457 spa_t *spa = txh->txh_tx->tx_pool->dp_spa;
526 txh->txh_tx->tx_err = err;
546 txh->txh_tx->tx_err = err;
550 (void) refcount_add_many(&txh->txh_memory_tohold,
563 txh->txh_tx->tx_err = err;
604 (void) refcount_add_many(&txh->txh_memory_tohold,
613 (void) refcount_add_many(&txh->txh_fudge,
616 (void) refcount_add_many(&txh->txh_memory_tohold,
619 (void) refcount_add_many(&txh->txh_space_tofree, space, FTAG);
620 (void) refcount_add_many(&txh->txh_space_tounref, unref, FTAG);
634 dmu_tx_hold_t *txh;
636 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
646 (void) refcount_add_many(&txh->txh_space_tofree,
648 (void) refcount_add_many(&txh->txh_space_tounref,
655 dmu_tx_hold_t *txh;
662 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
664 if (txh == NULL)
666 dn = txh->txh_dnode;
667 dmu_tx_count_dnode(txh);
685 dmu_tx_count_write(txh, 0, dn->dn_datablksz);
689 dmu_tx_count_write(txh, off, 1);
692 dmu_tx_count_write(txh, off+len, 1);
740 dmu_tx_count_free(txh, off, len);
746 dmu_tx_hold_t *txh;
752 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
754 if (txh == NULL)
756 dn = txh->txh_dnode;
758 dmu_tx_count_dnode(txh);
766 dmu_tx_count_write(txh, 0, 2 << fzap_default_block_shift);
792 (void) refcount_add_many(&txh->txh_space_tooverwrite,
795 (void) refcount_add_many(&txh->txh_space_towrite,
799 (void) refcount_add_many(&txh->txh_space_tounref,
818 &txh->txh_space_towrite, &txh->txh_space_tooverwrite);
838 (void) refcount_add_many(&txh->txh_space_towrite,
841 (void) refcount_add_many(&txh->txh_space_tooverwrite,
850 dmu_tx_hold_t *txh;
854 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
856 if (txh)
857 dmu_tx_count_dnode(txh);
863 dmu_tx_hold_t *txh;
866 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
869 (void) refcount_add_many(&txh->txh_space_towrite, space, FTAG);
875 dmu_tx_hold_t *txh;
889 for (txh = list_head(&tx->tx_holds); txh;
890 txh = list_next(&tx->tx_holds, txh)) {
891 if (txh->txh_dnode && txh->txh_dnode->dn_object == object)
902 dmu_tx_hold_t *txh;
923 for (txh = list_head(&tx->tx_holds); txh;
924 txh = list_next(&tx->tx_holds, txh)) {
926 if (txh->txh_dnode == dn && txh->txh_type != THT_NEWOBJECT)
928 if (txh->txh_dnode == NULL || txh->txh_dnode == dn) {
934 (txh->txh_arg1 >> shift);
936 ((txh->txh_arg1 + txh->txh_arg2 - 1) >> shift);
941 dprintf("found txh type %x beginblk=%llx endblk=%llx\n",
942 txh->txh_type, beginblk, endblk);
944 switch (txh->txh_type) {
972 txh->txh_arg2 == DMU_OBJECT_END))
1158 dmu_tx_hold_t *txh;
1201 for (txh = list_head(&tx->tx_holds); txh;
1202 txh = list_next(&tx->tx_holds, txh)) {
1203 dnode_t *dn = txh->txh_dnode;
1208 tx->tx_needassign_txh = txh;
1217 towrite += refcount_count(&txh->txh_space_towrite);
1218 tofree += refcount_count(&txh->txh_space_tofree);
1219 tooverwrite += refcount_count(&txh->txh_space_tooverwrite);
1220 tounref += refcount_count(&txh->txh_space_tounref);
1221 tohold += refcount_count(&txh->txh_memory_tohold);
1222 fudge += refcount_count(&txh->txh_fudge);
1271 dmu_tx_hold_t *txh;
1282 for (txh = list_head(&tx->tx_holds); txh != tx->tx_needassign_txh;
1283 txh = list_next(&tx->tx_holds, txh)) {
1284 dnode_t *dn = txh->txh_dnode;
1428 dmu_tx_hold_t *txh;
1430 while ((txh = list_head(&tx->tx_holds)) != NULL) {
1431 dnode_t *dn = txh->txh_dnode;
1433 list_remove(&tx->tx_holds, txh);
1434 refcount_destroy_many(&txh->txh_space_towrite,
1435 refcount_count(&txh->txh_space_towrite));
1436 refcount_destroy_many(&txh->txh_space_tofree,
1437 refcount_count(&txh->txh_space_tofree));
1438 refcount_destroy_many(&txh->txh_space_tooverwrite,
1439 refcount_count(&txh->txh_space_tooverwrite));
1440 refcount_destroy_many(&txh->txh_space_tounref,
1441 refcount_count(&txh->txh_space_tounref));
1442 refcount_destroy_many(&txh->txh_memory_tohold,
1443 refcount_count(&txh->txh_memory_tohold));
1444 refcount_destroy_many(&txh->txh_fudge,
1445 refcount_count(&txh->txh_fudge));
1446 kmem_free(txh, sizeof (dmu_tx_hold_t));
1471 for (dmu_tx_hold_t *txh = list_head(&tx->tx_holds); txh != NULL;
1472 txh = list_next(&tx->tx_holds, txh)) {
1473 dnode_t *dn = txh->txh_dnode;
1601 dmu_tx_hold_t *txh;
1603 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, object,
1606 dn = txh->txh_dnode;
1613 (void) refcount_add_many(&txh->txh_space_towrite,
1621 (void) refcount_add_many(&txh->txh_space_tooverwrite,
1624 (void) refcount_add_many(&txh->txh_space_towrite,
1628 (void) refcount_add_many(&txh->txh_space_tounref,