09 Jun, 2016

1 commit

  • sas_ata_strategy_handler() adds the works of the ata error handler to
    system_unbound_wq. This workqueue asynchronously runs work items, so the
    ata error handler will be performed concurrently on different CPUs. In
    this case, ->host_failed will be decreased simultaneously in
    scsi_eh_finish_cmd() on different CPUs, and become abnormal.

    It will lead to permanently inequality between ->host_failed and
    ->host_busy, and scsi error handler thread won't start running. IO
    errors after that won't be handled.

    Since all scmds must have been handled in the strategy handler, just
    remove the decrement in scsi_eh_finish_cmd() and zero ->host_busy after
    the strategy handler to fix this race.

    Fixes: 50824d6c5657 ("[SCSI] libsas: async ata-eh")
    Cc: stable@vger.kernel.org
    Signed-off-by: Wei Fang
    Reviewed-by: James Bottomley
    Signed-off-by: Martin K. Petersen

    Wei Fang
     

29 Oct, 2014

1 commit


19 Dec, 2013

1 commit


31 Mar, 2011

1 commit


30 Nov, 2006

1 commit


04 Oct, 2006

2 commits


11 Apr, 2006

1 commit

  • Overriding the whole EH code is a per-transport, not per-host thing.
    Move ->eh_strategy_handler to the transport class, same as
    ->eh_timed_out.

    Downside is that scsi_host_alloc can't check for the total lack of EH
    anymore, but the transition period from old EH where we needed it is
    long gone already.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jeff Garzik

    Christoph Hellwig
     

07 Nov, 2005

1 commit


11 Sep, 2005

1 commit