Re: [PATCH 1/6] scsi: Introduce scsi_zbc_noretry_cmd()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/01/2018 08:40 PM, Damien Le Moal wrote:
> For ZBC/ZAC devices, retrying a command with a condition known to lead
> to a failure is useless. One example is an unaligned write past the
> write pointer of a sequential zone. Retrying the same command will
> result in an error again.
> 
> Currently, these iknown error condition cases are handled in sd_zbc.c
> using the sd_zbc_complete() function which is called from sd_done() when
> a command completes. However, these known error conditions are not
> handled in libata, nor is scsi_noretry_cmd() considering them.
> 
> Fix this by introducing the function scsi_zbc_noretry_cmd() and use this
> function in scsi_noretry_cmd(). This allows simplifying
> sd_zbc_complete() which now only has to deal with report zones command
> reply.
> 
> scsi_zbc_noretry_cmd() is also exported so that it can be used from
> libata.
> 
> Signed-off-by: Damien Le Moal <damien.lemoal@xxxxxxx>
> ---
>  drivers/scsi/scsi_error.c | 66 +++++++++++++++++++++++++++++++++++++++++++++++
>  drivers/scsi/sd.c         |  2 +-
>  drivers/scsi/sd.h         |  8 +++---
>  drivers/scsi/sd_zbc.c     | 47 ++++-----------------------------
>  include/scsi/scsi_eh.h    |  1 +
>  5 files changed, 77 insertions(+), 47 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@xxxxxxxx>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@xxxxxxx			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux