• Hannes Reinecke's avatar
    scsi: scsi_error: count medium access timeout only once per EH run · 7a38dc0b
    Hannes Reinecke authored
    The current medium access timeout counter will be increased for
    each command, so if there are enough failed commands we'll hit
    the medium access timeout for even a single device failure and
    the following kernel message is displayed:
    
    sd H:C:T:L: [sdXY] Medium access timeout failure. Offlining disk!
    
    Fix this by making the timeout per EH run, ie the counter will
    only be increased once per device and EH run.
    
    Fixes: 18a4d0a2 ("[SCSI] Handle disk devices which can not process medium access commands")
    Cc: Ewan Milne <emilne@redhat.com>
    Cc: Lawrence Obermann <loberman@redhat.com>
    Cc: Benjamin Block <bblock@linux.vnet.ibm.com>
    Cc: Steffen Maier <maier@linux.vnet.ibm.com>
    Signed-off-by: default avatarHannes Reinecke <hare@suse.com>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    7a38dc0b
scsi_error.c 68.7 KB