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

FUJITA Tomonori fujita.tomonori at lab.ntt.co.jp
Tue Sep 8 00:54:55 CEST 2009


On Mon, 07 Sep 2009 10:16:06 +0200
Florian Haas <florian.haas at linbit.com> 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.

I guess, if READ_CAPACITY_16 succeeds, MSCS goes forward.


diff --git a/usr/sbc.c b/usr/sbc.c
index cc308d4..88629e5 100644
--- a/usr/sbc.c
+++ b/usr/sbc.c
@@ -165,9 +165,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;
 
--
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