simplified logic

Signed-off-by: Leap Second <leapsecond@protonmail.com>
This commit is contained in:
seekfirstleapsecond 2019-01-07 17:37:52 -08:00 committed by GitHub
parent 4c113673e9
commit c82de60a78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 11 deletions

View File

@ -550,19 +550,15 @@ txg_sync_thread(void *arg)
txg_thread_wait(tx, &cpr, &tx->tx_quiesce_done_cv, 0);
}
/*
* Wait until the quiesce thread has exited to ensure every
* quiesced txg has been synced before exiting.
*/
if (tx->tx_exiting) {
if (checked_quiescing) {
while (tx->tx_threads != 1)
txg_thread_wait(tx, &cpr, &tx->tx_exit_cv, 0);
if (tx->tx_quiesced_txg == 0)
txg_thread_exit(tx, &cpr, &tx->tx_sync_thread);
} else {
while (tx->tx_threads != 1)
txg_thread_wait(tx, &cpr,
&tx->tx_exit_cv, 0);
if (tx->tx_quiesced_txg)
checked_quiescing = B_TRUE;
else
txg_thread_exit(tx, &cpr,
&tx->tx_sync_thread);
}
}
/*