[stgt] [PATCH] Check protect info for WRITE10/12/16

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Sun Feb 5 00:08:59 CET 2012


On Sun, 5 Feb 2012 08:01:23 +1100
ronnie sahlberg <ronniesahlberg at gmail.com> wrote:

> From 82366441826fb6f8dc72f2e1d94a7ea02ee6610e Mon Sep 17 00:00:00 2001
> From: Ronnie Sahlberg <ronniesahlberg at gmail.com>
> 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 at gmail.com>
> ---
>  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 at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



More information about the stgt mailing list