[stgt] [PATCH] RELEASE6/10: Release of a lock that is not held is not an error.
fujita.tomonori at lab.ntt.co.jp
Fri Oct 5 12:09:39 CEST 2012
On Thu, 4 Oct 2012 19:50:17 -0700
Ronnie Sahlberg <ronniesahlberg at gmail.com> wrote:
> If an initiator sends a RELEASE6/10 but the initiator does not hold the reservation then nothing should happen. This is not an error.
> This patch corrects TGTD so that it will return SUCCESS for this condition.
> From SPC-2 7.16.1 :
> It is not an error for an application client to attempt to
> release a reservation that is not currently valid, or is held
> by another initiator. In this case, the device server shall
> return GOOD status without altering any other reservation.
> LIBISCSI contains a test for this, and TGTD now passes this test when this
> patch is applied :
> iscsi-test --test="*0420*" iscsi://127.0.0.1/iqn.ronnie.test/1
> Send RESERVE6 ... [OK]
> Send RELEASE6 ... [OK]
> Test that reservation works.
> Send RESERVE6 from Initiator 1. ... [OK]
> Send RESERVE6 from Initiator 2. Expect conflict. ... [OK]
> Send RELEASE6 from Initiator 2..Expect NO-OP. ... [OK]
> Send TESTUNITREADY from Initiator 1 ... [OK]
> Send TESTUNITREADY from Initiator 2. Expect conflict. ... [OK]
> Test that release actually works
> Send RELEASE6 from Initiator 1 ... [OK]
> Send RESERVE6 Initiator 2 ... [OK]
> Send RELEASE6 Initiator 2 ... [OK]
> TEST T0420_reserve6_simple [OK]
> Signed-off-by: Ronnie Sahlberg <ronniesahlberg at gmail.com>
> usr/target.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
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