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

deadlock between mm_sem and tx assign in zfs_write() and page fault #7939

Merged
merged 6 commits into from
Oct 16, 2018

Commits on Oct 8, 2018

  1. fix write IO hang.

    The bug time sequence:
    1. context openzfs#1, `zfs_write` assign a txg "n".
    2. In a same process, context openzfs#2, mmap page fault (which means the
       `mm_sem` is hold) occurred, `zfs_dirty_inode` open a txg failed,
       and wait previous txg "n" completed.
    3. context openzfs#1 call `uiomove` to write, however page fault is occurred
       in `uiomove`, which means it need `mm_sem`, but `mm_sem` is hold by
       context openzfs#2, so it stuck and can't complete,  then txg "n" will
       not complete.
    
    So context openzfs#1 and context openzfs#2 trap into the "dead lock".
    
    Signed-off-by: Grady Wong <grady.w@xtaotech.com>
    Grady Wong committed Oct 8, 2018
    Configuration menu
    Copy the full SHA
    6458894 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2018

  1. return EFAULT in uio_prefaultpages

    Signed-off-by: Grady Wong <grady.w@xtaotech.com>
    Grady Wong committed Oct 9, 2018
    Configuration menu
    Copy the full SHA
    9f7221f View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2018

  1. update mmapwrite unittest.

    Signed-off-by: Grady Wong <grady.w@xtaotech.com>
    Grady Wong committed Oct 11, 2018
    Configuration menu
    Copy the full SHA
    8e221f6 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2018

  1. Explain why zfs_dirty_inode need TXG_WAIT

    Signed-off-by: Grady Wong <grady.w@xtaotech.com>
    Grady Wong committed Oct 13, 2018
    Configuration menu
    Copy the full SHA
    102619e View commit details
    Browse the repository at this point in the history

Commits on Oct 15, 2018

  1. Restore the zfs_dirty_inode

    Signed-off-by: Grady Wong <grady.w@xtaotech.com>
    wgqimut committed Oct 15, 2018
    Configuration menu
    Copy the full SHA
    cfce4c2 View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2018

  1. can't abort tx when write error.

    Signed-off-by: Grady Wong <grady.w@xtaotech.com>
    wgqimut committed Oct 16, 2018
    Configuration menu
    Copy the full SHA
    9cc3613 View commit details
    Browse the repository at this point in the history