Re: [PATCH] Add support for SoftwareWriteProtect and fix bugs in modeselect

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

 



On Sat,  6 Jul 2013 23:13:16 -0700
Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx> wrote:

> Fix a bug in sbc_mode_page_update. We only have a subpagecode in byte 1
> IFF the SPF bit in byte 0 is set.
> 
> Add support for using modeselect for the CONTROLS page and set the
> mask to allow SWP to be changed.
> 
> Add a SWP flag to the device attributes and update this as the CONTROLS/SWP
> flag is set by the initiator.
> 
> Update SBC so that we treat writeprotect as either the current ->readonly flag
> that is used to se the hard property for the lun,   or the ->swp flag
> that is set in software by the initiators.
> Thus like on a real disk, SWP can be used to turn a read-write LUN to become
> temporarily readonly, but SWP can NOT be used to turn a physically readonly
> medium to become read-write.
> 
> Signed-off-by: Ronnie Sahlberg <ronniesahlberg@xxxxxxxxx>
> ---
>  usr/sbc.c    |   37 +++++++++++++++++++++++++++++++------
>  usr/spc.c    |    1 +
>  usr/target.c |    2 ++
>  usr/tgtd.h   |    1 +
>  4 files changed, 35 insertions(+), 6 deletions(-)

Looks good. 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