On Thu, Aug 27, 2015 at 02:41:02PM +0200, Hannes Reinecke wrote:
>               }
>  
>               err = alua_check_sense(sdev, &sense_hdr);
> -             if (err == ADD_TO_MLQUEUE && time_before(jiffies, expiry))
> +             if (err == ADD_TO_MLQUEUE && time_before(jiffies, expiry)) {
> +                     sdev_printk(KERN_ERR, sdev, "%s: rtpg retry\n",
> +                                 ALUA_DH_NAME);
> +                     scsi_print_sense_hdr(sdev, ALUA_DH_NAME, &sense_hdr);
>                       goto retry;
> -             sdev_printk(KERN_INFO, sdev,
> -                         "%s: rtpg sense code %02x/%02x/%02x\n",
> -                         ALUA_DH_NAME, sense_hdr.sense_key,
> -                         sense_hdr.asc, sense_hdr.ascq);
> -             err = SCSI_DH_IO;
> +             }
> +             sdev_printk(KERN_ERR, sdev, "%s: rtpg failed\n",
> +                         ALUA_DH_NAME);
> +             scsi_print_sense_hdr(sdev, ALUA_DH_NAME, &sense_hdr);
> +             return SCSI_DH_IO;
>       }
> -     if (err != SCSI_DH_OK)
> -             return err;

I think you need to keep this if, given that submit_rtpg can return
others error than SCSI_DH_IO as well.

While you're at it you might remove the h->senselen check, and
kill the assignment of the scsi_normalize_sense bool return value
to the err variable similar to how you did in stpg_endio. 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to