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/cmd/ztest/ztest.c
          +++ new/usr/src/cmd/ztest/ztest.c
↓ open down ↓ 4505 lines elided ↑ open up ↑
4506 4506           * synced, it is difficult to reliably determine whether a commit
4507 4507           * callback hasn't been called due to high load or due to a flawed
4508 4508           * implementation.
4509 4509           *
4510 4510           * In practice, we will assume that if after a certain number of txgs a
4511 4511           * commit callback hasn't been called, then most likely there's an
4512 4512           * implementation bug..
4513 4513           */
4514 4514          tmp_cb = list_head(&zcl.zcl_callbacks);
4515 4515          if (tmp_cb != NULL &&
4516      -            tmp_cb->zcd_txg > txg - ZTEST_COMMIT_CALLBACK_THRESH) {
     4516 +            (txg - ZTEST_COMMIT_CALLBACK_THRESH) > tmp_cb->zcd_txg) {
4517 4517                  fatal(0, "Commit callback threshold exceeded, oldest txg: %"
4518 4518                      PRIu64 ", open txg: %" PRIu64 "\n", tmp_cb->zcd_txg, txg);
4519 4519          }
4520 4520  
4521 4521          /*
4522 4522           * Let's find the place to insert our callbacks.
4523 4523           *
4524 4524           * Even though the list is ordered by txg, it is possible for the
4525 4525           * insertion point to not be the end because our txg may already be
4526 4526           * quiescing at this point and other callbacks in the open txg
↓ open down ↓ 1685 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX