• M
    dm mpath: allow ioctls to trigger pg init · 35991652
    Mikulas Patocka 提交于
    After the failure of a group of paths, any alternative paths that
    need initialising do not become available until further I/O is sent to
    the device.  Until this has happened, ioctls return -EAGAIN.
    
    With this patch, new paths are made available in response to an ioctl
    too.  The processing of the ioctl gets delayed until this has happened.
    
    Instead of returning an error, we submit a work item to kmultipathd
    (that will potentially activate the new path) and retry in ten
    milliseconds.
    
    Note that the patch doesn't retry an ioctl if the ioctl itself fails due
    to a path failure.  Such retries should be handled intelligently by the
    code that generated the ioctl in the first place, noting that some SCSI
    commands should not be retried because they are not idempotent (XOR write
    commands).  For commands that could be retried, there is a danger that
    if the device rejected the SCSI command, the path could be errorneously
    marked as failed, and the request would be retried on another path which
    might fail too.  It can be determined if the failure happens on the
    device or on the SCSI controller, but there is no guarantee that all
    SCSI drivers set these flags correctly.
    Signed-off-by: NMikulas Patocka <mpatocka@redhat.com>
    Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
    35991652
dm-mpath.c 39.6 KB