Re: [PATCH v3] SG_SCSI_RESET ioctl: add no_escalate values

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

 



On 10/18/2014 10:11 PM, Douglas Gilbert wrote:
> Further to a January 2013 thread titled: "[PATCH] SG_SCSI_RESET ioctl
> should only perform requested operation" by Jeremy Linton a patch (v3)
> is presented that expands the existing ioctl to include "no_escalate"
> versions to the existing resets. This requires no changes to SCSI low
> level drivers (LLDs); it adds several more finely tuned reset options
> to the user space. For example:
> 
>   /* This call remains the same, with the same escalating semantics
>    * if the device (LU) reset fail. That is: on failure to try a
>    * target reset and if that fails, try a bus reset, and if that fails
>    * try a host (i.e. LLD) reset. */
>   val = SG_SCSI_RESET_DEVICE;
>   res = ioctl(<sg_or_block_fd>, SG_SCSI_RESET, &val);
> 
>   /* What follows is a new option introduced by this patch series. Only
>    * a device reset is attempted. If that fails then an appropriate
>    * error code is provided. N.B. There is no reset escalation. */
>   val = SG_SCSI_RESET_DEVICE | SG_SCSI_RESET_NO_ESCALATE;
>   res = ioctl(<sg_or_block_fd>, SG_SCSI_RESET, &val);
> 
> This patches applies to lk 3.17.0 and Christoph's drivers-for-3.18
> tree. The sg_reset utility has been extended to use this new option
> since sg3_utils-1.36 package which was released on 20130531.
> 
> v3 of this patch changes adding, subtracting and arithmetic
> comparisons to the corresponding bitwise logical operations.
> For example 'SG_SCSI_RESET_DEVICE + SG_SCSI_RESET_NO_ESCALATE' has
> been changed to 'SG_SCSI_RESET_DEVICE | SG_SCSI_RESET_NO_ESCALATE'.
> 
> ChangeLog:
>   - modify SG_SCSI_RESET ioctl so the SG_SCSI_RESET_NO_ESCALATE
>     value may be OR-ed to the existing values. If so the existing
>     device->target->bus->host escalation does not occur. The
>     SG_SCSI_RESET ioctl is modified in both the sg driver and
>     scsi_ioctl.c (so block devices can use it).
>   - modify scsi_reset_provider() in the scsi_error.c file in a
>     similar way to support this additional functionality.
> 
> Signed-off-by: Douglas Gilbert <dgilbert@xxxxxxxxxxxx>

Reviewed-by: Hannes Reinecke <hare@xxxxxxx>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@xxxxxxx			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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