• Tomasz Majchrzak's avatar
    md: wake up personality thread after array state update · 91a6c4ad
    Tomasz Majchrzak authored
    When raid1/raid10 array fails to write to one of the drives, the request
    is added to bio_end_io_list and finished by personality thread. The
    thread doesn't handle it as long as MD_CHANGE_PENDING flag is set. In
    case of external metadata this flag is cleared, however the thread is
    not woken up. It causes request to be blocked for few seconds (until
    another action on the array wakes up the thread) or to get stuck
    indefinitely.
    
    Wake up personality thread once MD_CHANGE_PENDING has been cleared.
    Moving 'restart_array' call after the flag is cleared it not a solution
    because in read-write mode the call doesn't wake up the thread.
    Signed-off-by: default avatarTomasz Majchrzak <tomasz.majchrzak@intel.com>
    Signed-off-by: default avatarShaohua Li <shli@fb.com>
    91a6c4ad
md.c 233 KB