]> git.proxmox.com Git - mirror_zfs.git/commit - cmd/ztest/ztest.c
Fix commit callbacks
authorRicardo M. Correia <ricardo.correia@oracle.com>
Thu, 26 Aug 2010 17:17:18 +0000 (10:17 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 31 Aug 2010 15:38:44 +0000 (08:38 -0700)
commit090ff0929ec7a2e2e65efaaddb9981d15964f7d9
tree25ab0cc3af03704344eb6ae0341e686dc750c39d
parenta6098088eb706f643a726f71f22ea7126fcd822e
Fix commit callbacks

The upstream commit cb code had a few bugs:

1) The arguments of the list_move_tail() call in txg_dispatch_callbacks()
were reversed by mistake. This caused the commit callbacks to not be
called at all.

2) ztest had a bug in ztest_dmu_commit_callbacks() where "error" was not
initialized correctly. This seems to have caused the test to always take
the simulated error code path, which made ztest unable to detect whether
commit cbs were being called for transactions that successfuly complete.

3) ztest had another bug in ztest_dmu_commit_callbacks() where the commit
cb threshold was not being compared correctly.

4) The commit cb taskq was using 'max_ncpus * 2' as the maxalloc argument
of taskq_create(), which could have caused unnecessary delays in the txg
sync thread.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
cmd/ztest/ztest.c
module/zfs/txg.c