Lines Matching defs:txh
116 dmu_tx_hold_t *txh;
134 txh = kmem_zalloc(sizeof (dmu_tx_hold_t), KM_SLEEP);
135 txh->txh_tx = tx;
136 txh->txh_dnode = dn;
137 zfs_refcount_create(&txh->txh_space_towrite);
138 zfs_refcount_create(&txh->txh_memory_tohold);
139 txh->txh_type = type;
140 txh->txh_arg1 = arg1;
141 txh->txh_arg2 = arg2;
142 list_insert_tail(&tx->tx_holds, txh);
144 return (txh);
152 dmu_tx_hold_t *txh;
162 txh = dmu_tx_hold_dnode_impl(tx, dn, type, arg1, arg2);
165 return (txh);
231 dmu_tx_count_write(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
233 dnode_t *dn = txh->txh_dnode;
239 (void) zfs_refcount_add_many(&txh->txh_space_towrite, len, FTAG);
255 txh->txh_tx->tx_err = err;
267 txh->txh_tx->tx_err = err;
277 txh->txh_tx->tx_err = err;
288 txh->txh_tx->tx_err = err;
295 txh->txh_tx->tx_err = err;
301 dmu_tx_count_append(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
303 dnode_t *dn = txh->txh_dnode;
309 (void) zfs_refcount_add_many(&txh->txh_space_towrite, len, FTAG);
324 txh->txh_tx->tx_err = err;
336 txh->txh_tx->tx_err = err;
342 txh->txh_tx->tx_err = err;
348 dmu_tx_count_dnode(dmu_tx_hold_t *txh)
350 (void) zfs_refcount_add_many(&txh->txh_space_towrite,
357 dmu_tx_hold_t *txh;
363 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
365 if (txh != NULL) {
366 dmu_tx_count_write(txh, off, len);
367 dmu_tx_count_dnode(txh);
374 dmu_tx_hold_t *txh;
380 txh = dmu_tx_hold_dnode_impl(tx, dn, THT_WRITE, off, len);
381 if (txh != NULL) {
382 dmu_tx_count_write(txh, off, len);
383 dmu_tx_count_dnode(txh);
395 dmu_tx_hold_t *txh;
400 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
402 if (txh != NULL) {
403 dmu_tx_count_append(txh, off, len);
404 dmu_tx_count_dnode(txh);
411 dmu_tx_hold_t *txh;
416 txh = dmu_tx_hold_dnode_impl(tx, dn, THT_APPEND, off, DMU_OBJECT_END);
417 if (txh != NULL) {
418 dmu_tx_count_append(txh, off, len);
419 dmu_tx_count_dnode(txh);
438 dmu_tx_count_free(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
440 dmu_tx_t *tx = txh->txh_tx;
441 dnode_t *dn = txh->txh_dnode;
462 dmu_tx_count_write(txh, 0, dn->dn_datablksz);
466 dmu_tx_count_write(txh, off, 1);
469 dmu_tx_count_write(txh, off + len, 1);
505 (void) zfs_refcount_add_many(&txh->txh_memory_tohold,
526 dmu_tx_hold_t *txh;
528 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
530 if (txh != NULL) {
531 dmu_tx_count_dnode(txh);
532 dmu_tx_count_free(txh, off, len);
539 dmu_tx_hold_t *txh;
541 txh = dmu_tx_hold_dnode_impl(tx, dn, THT_FREE, off, len);
542 if (txh != NULL) {
543 dmu_tx_count_dnode(txh);
544 dmu_tx_count_free(txh, off, len);
549 dmu_tx_count_clone(dmu_tx_hold_t *txh, uint64_t off, uint64_t len)
555 dmu_tx_count_free(txh, off, len);
561 dmu_tx_hold_t *txh;
566 txh = dmu_tx_hold_dnode_impl(tx, dn, THT_CLONE, off, len);
567 if (txh != NULL) {
568 dmu_tx_count_dnode(txh);
569 dmu_tx_count_clone(txh, off, len);
574 dmu_tx_hold_zap_impl(dmu_tx_hold_t *txh, const char *name)
576 dmu_tx_t *tx = txh->txh_tx;
577 dnode_t *dn = txh->txh_dnode;
582 dmu_tx_count_dnode(txh);
593 (void) zfs_refcount_add_many(&txh->txh_space_towrite,
626 dmu_tx_hold_t *txh;
630 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
632 if (txh != NULL)
633 dmu_tx_hold_zap_impl(txh, name);
639 dmu_tx_hold_t *txh;
644 txh = dmu_tx_hold_dnode_impl(tx, dn, THT_ZAP, add, (uintptr_t)name);
645 if (txh != NULL)
646 dmu_tx_hold_zap_impl(txh, name);
652 dmu_tx_hold_t *txh;
656 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
658 if (txh)
659 dmu_tx_count_dnode(txh);
665 dmu_tx_hold_t *txh;
669 txh = dmu_tx_hold_dnode_impl(tx, dn, THT_BONUS, 0, 0);
670 if (txh)
671 dmu_tx_count_dnode(txh);
677 dmu_tx_hold_t *txh;
681 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset,
683 if (txh) {
685 &txh->txh_space_towrite, space, FTAG);
713 for (dmu_tx_hold_t *txh = list_head(&tx->tx_holds); txh != NULL;
714 txh = list_next(&tx->tx_holds, txh)) {
716 if (txh->txh_dnode == dn && txh->txh_type != THT_NEWOBJECT)
718 if (txh->txh_dnode == NULL || txh->txh_dnode == dn) {
724 (txh->txh_arg1 >> shift);
726 ((txh->txh_arg1 + txh->txh_arg2 - 1) >> shift);
731 dprintf("found txh type %x beginblk=%llx endblk=%llx\n",
732 txh->txh_type, (u_longlong_t)beginblk,
735 switch (txh->txh_type) {
758 txh->txh_arg2 == DMU_OBJECT_END))
783 txh->txh_arg2 == DMU_OBJECT_END))
814 txh->txh_type);
1074 for (dmu_tx_hold_t *txh = list_head(&tx->tx_holds); txh != NULL;
1075 txh = list_next(&tx->tx_holds, txh)) {
1076 dnode_t *dn = txh->txh_dnode;
1100 tx->tx_needassign_txh = txh;
1110 towrite += zfs_refcount_count(&txh->txh_space_towrite);
1111 tohold += zfs_refcount_count(&txh->txh_memory_tohold);
1143 for (dmu_tx_hold_t *txh = list_head(&tx->tx_holds);
1144 txh && txh != tx->tx_needassign_txh;
1145 txh = list_next(&tx->tx_holds, txh)) {
1146 dnode_t *dn = txh->txh_dnode;
1302 dmu_tx_hold_t *txh;
1304 while ((txh = list_head(&tx->tx_holds)) != NULL) {
1305 dnode_t *dn = txh->txh_dnode;
1307 list_remove(&tx->tx_holds, txh);
1308 zfs_refcount_destroy_many(&txh->txh_space_towrite,
1309 zfs_refcount_count(&txh->txh_space_towrite));
1310 zfs_refcount_destroy_many(&txh->txh_memory_tohold,
1311 zfs_refcount_count(&txh->txh_memory_tohold));
1312 kmem_free(txh, sizeof (dmu_tx_hold_t));
1331 for (dmu_tx_hold_t *txh = list_head(&tx->tx_holds); txh != NULL;
1332 txh = list_next(&tx->tx_holds, txh)) {
1333 dnode_t *dn = txh->txh_dnode;
1457 dmu_tx_hold_t *txh;
1459 txh = dmu_tx_hold_object_impl(tx, tx->tx_objset, object,
1461 if (txh != NULL)
1462 (void) zfs_refcount_add_many(&txh->txh_space_towrite,