Print this page
3747 txg commit callbacks don't work
Submitted by:   Will Andrews <willa@spectralogic.com>
Reviewed by:    Matthew Ahrens <mahrens@delphix.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/fs/zfs/txg.c
          +++ new/usr/src/uts/common/fs/zfs/txg.c
↓ open down ↓ 409 lines elided ↑ open up ↑
 410  410                           */
 411  411                          tx->tx_commit_cb_taskq = taskq_create("tx_commit_cb",
 412  412                              max_ncpus, minclsyspri, max_ncpus, max_ncpus * 2,
 413  413                              TASKQ_PREPOPULATE);
 414  414                  }
 415  415  
 416  416                  cb_list = kmem_alloc(sizeof (list_t), KM_SLEEP);
 417  417                  list_create(cb_list, sizeof (dmu_tx_callback_t),
 418  418                      offsetof(dmu_tx_callback_t, dcb_node));
 419  419  
 420      -                list_move_tail(&tc->tc_callbacks[g], cb_list);
      420 +                list_move_tail(cb_list, &tc->tc_callbacks[g]);
 421  421  
 422  422                  (void) taskq_dispatch(tx->tx_commit_cb_taskq, (task_func_t *)
 423  423                      txg_do_callbacks, cb_list, TQ_SLEEP);
 424  424          }
 425  425  }
 426  426  
 427  427  static void
 428  428  txg_sync_thread(dsl_pool_t *dp)
 429  429  {
 430  430          spa_t *spa = dp->dp_spa;
↓ open down ↓ 377 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX