Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

making sure the last quiesced txg is synced #8239

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions module/zfs/txg.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,16 @@ txg_sync_thread(void *arg)
txg_thread_wait(tx, &cpr, &tx->tx_quiesce_done_cv, 0);
}

if (tx->tx_exiting)
txg_thread_exit(tx, &cpr, &tx->tx_sync_thread);
xwcal marked this conversation as resolved.
Show resolved Hide resolved
/*
* Wait until the quiesce thread has exited to ensure every
* quiesced txg has been synced before exiting.
*/
if (tx->tx_exiting) {
xwcal marked this conversation as resolved.
Show resolved Hide resolved
while (tx->tx_threads != 1)
txg_thread_wait(tx, &cpr, &tx->tx_exit_cv, 0);
if (tx->tx_quiesced_txg == 0)
xwcal marked this conversation as resolved.
Show resolved Hide resolved
txg_thread_exit(tx, &cpr, &tx->tx_sync_thread);
}

/*
* Consume the quiesced txg which has been handed off to
Expand Down