[stgt] [PATCH] SBC add support for removable SBC devices
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Fri Jan 27 05:11:27 CET 2012
On Fri, 27 Jan 2012 15:01:27 +1100
ronnie sahlberg <ronniesahlberg at gmail.com> wrote:
> From 9875346857c9d1c383c5da91b0f9cb097fe068cf Mon Sep 17 00:00:00 2001
> From: Ronnie Sahlberg <ronniesahlberg at gmail.com>
> Date: Thu, 26 Jan 2012 11:05:09 +1100
> Subject: [PATCH] SBC: Support removable devices for SBC
>
> SBC supports removable devices.
> See SBC 4.3.1 REMOVABLE MEDIUM OVERVIEW
>
> TEST UNIT READY, START STOP UNIT and PREVENT ALLOW MEDIUM REMOVAL
> already provide the required behaviour described in 4.3.1
>
> This patch adds support for the SBC medium access opcodes to return
> check condition/not ready/medium not present
> for any calls when the devie is set in offline mode.
>
> regards
> ronnie sahlberg
>
> Signed-off-by: Ronnie Sahlberg <ronniesahlberg at gmail.com>
> ---
> usr/sbc.c | 35 ++++++++++++++++++++++++++++++++++-
> 1 files changed, 34 insertions(+), 1 deletions(-)
>
> diff --git a/usr/sbc.c b/usr/sbc.c
> index 8330291..b96cc7a 100644
> --- a/usr/sbc.c
> +++ b/usr/sbc.c
> @@ -154,6 +154,12 @@ static int sbc_rw(int host_no, struct scsi_cmd *cmd)
> if (ret)
> return SAM_STAT_RESERVATION_CONFLICT;
>
> + if (cmd->dev->attrs.removable && !cmd->dev->attrs.online) {
Only if cmd->dev->attrs.removable is true, cmd->dev->attrs.online can
be true? No?
Thanks a lot!
--
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