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

Commits on Jan 5, 2019

  1. making sure the last quiesced txg is synced

    Fixed a potential bug as described in openzfs#8233:
    
    Consider this scenario (see [txg.c](https://github.com/zfsonlinux/zfs/blob/06f3fc2a4b097545259935d54634c5c6f49ed20f/module/zfs/txg.c) ):
    There is heavy write load when the pool exports.
    After `txg_sync_stop`'s call of `txg_wait_synced` returns, many more txgs get processed, but right before` txg_sync_stop` gets `tx_sync_lock`, the following happens:
    
    - `txg_sync_thread` begins waiting on `tx_sync_more_cv`.
    - `txg_quiesce_thread` gets done with `txg_quiesce(dp, txg)`.
    - `txg_sync_stop` gets `tx_sync_lock` first, calls `cv_broadcast`s with `tx_exiting` == 1, and waits for exits.
    - `txg_sync_thread` wakes up first and exits.
    - Finally, `txg_quiesce_thread` gets `tx_sync_lock`, and calls `cv_broadcast(&tx->tx_sync_more_cv)`, 
    but `txg_sync_thread` is already gone, and the txg in `txg_quiesce(dp, txg)` above never gets synced.
    
    Signed-off-by: Leap Second <leapsecond@protonmail.com>
    xwcal committed Jan 5, 2019
    Configuration menu
    Copy the full SHA
    1e05119 View commit details
    Browse the repository at this point in the history
  2. style fixes

    Fixed checkstyle complaints:
    ./module/zfs/txg.c: 558: line > 80 characters
    ./module/zfs/txg.c: 562: line > 80 characters
    
    Signed-off-by: Leap Second <leapsecond@protonmail.com>
    xwcal committed Jan 5, 2019
    Configuration menu
    Copy the full SHA
    80f4270 View commit details
    Browse the repository at this point in the history
  3. style fixes 2

    Addressed checkstype complaints:
    ./module/zfs/txg.c: 559: continuation should be indented 4 spaces
    ./module/zfs/txg.c: 564: continuation should be indented 4 spaces
    
    Signed-off-by: Leap Second <leapsecond@protonmail.com>
    xwcal committed Jan 5, 2019
    Configuration menu
    Copy the full SHA
    e3070bb View commit details
    Browse the repository at this point in the history
  4. style fixes 3

    Addressed checkstyle complaints:
    ./module/zfs/txg.c: 559: spaces instead of tabs
    ./module/zfs/txg.c: 559: continuation should be indented 4 spaces
    ./module/zfs/txg.c: 564: spaces instead of tabs
    ./module/zfs/txg.c: 564: continuation should be indented 4 spaces
    
    Signed-off-by: Leap Second <leapsecond@protonmail.com>
    xwcal committed Jan 5, 2019
    Configuration menu
    Copy the full SHA
    4c11367 View commit details
    Browse the repository at this point in the history

Commits on Jan 8, 2019

  1. simplified logic

    Signed-off-by: Leap Second <leapsecond@protonmail.com>
    xwcal committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    c82de60 View commit details
    Browse the repository at this point in the history
  2. removed garbage

    Signed-off-by: Leap Second <leapsecond@protonmail.com>
    xwcal committed Jan 8, 2019
    Configuration menu
    Copy the full SHA
    025861a View commit details
    Browse the repository at this point in the history