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.lem...@wdc.com> > --- > 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 <h...@suse.com>
Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking h...@suse.de +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)