Re: [PATCH] Check protect info for WRITE10/12/16

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

 



On Sun, 5 Feb 2012 08:01:23 +1100
ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote:

> From 82366441826fb6f8dc72f2e1d94a7ea02ee6610e Mon Sep 17 00:00:00 2001
> From: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
> Date: Sun, 5 Feb 2012 07:22:29 +1100
> Subject: [PATCH] PROTECTION: Fail WRITE10/12/16 with wprotect!=0 with sense code
> 
> In SBC 4.21 Protection information model
> WRITE10/12/16 are listed as medium access commands.
> 
> 4.21.2.2 Type 0 protection
> Indicates that all such commands should fail if protect bits are !=0
> when the device is formatted with type 0 protection (==no protection)
> 
>       If type 0 protection is enabled and the RDPROTECT field, WRPROTECT field,
>       VRPROTECT field, or ORPROTECT field is set to a non-zero value, then
>       medium access commands are invalid and may be terminated by the device
>       server with CHECK CONDITION status with the sense key set to ILLEGAL
>       REQUEST and the additional sense code set to INVALID FIELD IN CDB
> 
> TGTD does not support protection information so we must fail these commands
> 
> Also update sbc_rw.c to send the right asc for protection errors for
> READ10/12/16
> 
> Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
> ---
>  usr/sbc.c |   10 ++++++----
>  1 files changed, 6 insertions(+), 4 deletions(-)

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux