Re: [Iscsitarget-devel] stgt does not preempt SCSI-2 reservations; may break MS Cluster Service failover

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

 



On Tue, 8 Sep 2009 10:56:51 +0200
Lars Ellenberg <lars.ellenberg@xxxxxxxxxx> wrote:

> On Tue, Sep 08, 2009 at 07:54:55AM +0900, FUJITA Tomonori wrote:
> > On Mon, 07 Sep 2009 10:16:06 +0200
> > Florian Haas <florian.haas@xxxxxxxxxx> wrote:
> > 
> > > I am also failing to understand why the MS initiator would use the
> > > SERVICE ACTION IN detour when upon initial login it just uses standard
> > > INQUIRY commands and READ CAPACITY.
> > 
> > Linux kernel also tries READ_CAPACITY_16 first (it doesn't if it knows
> > that READ_CAPACITY_16 doesn't work with a device).
> > 
> > I think that rejecting READ_CAPACITY_16 with Reservation Conflict is
> > a bug. Can you try the following patch.
> 
> Being a SCSI illiterate myself,
> I certainly will not argue with someone working in the SCSI field
> for years about compliance with (already superseded) SCSI specs.
> 
> SCSI2 9.1.7 Reservations says
>  ... READ CAPACITY ... is unaffected by _extent_ reservations.
> 
> Now, a LUN reservation is or is not an extent reservation?
> 
> Is this a bug in the target implementation, or is it a bug in the
> initiator, trying a READ CAPACITY before a reservation?

It's a target bug. I've merged the following patch.

=
From: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
Subject: [PATCH] sbc: needs to perform READ CAPACITY even with a reserved lu

Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
---
 usr/sbc.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/usr/sbc.c b/usr/sbc.c
index cc308d4..710165d 100644
--- a/usr/sbc.c
+++ b/usr/sbc.c
@@ -128,9 +128,6 @@ static int sbc_read_capacity(int host_no, struct scsi_cmd *cmd)
 	unsigned char key = ILLEGAL_REQUEST;
 	uint16_t asc = ASC_LUN_NOT_SUPPORTED;
 
-	if (device_reserved(cmd))
-		return SAM_STAT_RESERVATION_CONFLICT;
-
 	if (!(scb[8] & 0x1) & (scb[2] | scb[3] | scb[4] | scb[5])) {
 		asc = ASC_INVALID_FIELD_IN_CDB;
 		goto sense;
@@ -165,9 +162,6 @@ static int sbc_service_action(int host_no, struct scsi_cmd *cmd)
 	uint32_t *data;
 	uint64_t size;
 
-	if (device_reserved(cmd))
-		return SAM_STAT_RESERVATION_CONFLICT;
-
 	if (cmd->scb[1] != SAI_READ_CAPACITY_16)
 		goto sense;
 
-- 
1.5.6.5

--
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