simplified logic
Signed-off-by: Leap Second <leapsecond@protonmail.com>
This commit is contained in:
parent
4c113673e9
commit
c82de60a78
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue