target: return CONFLICT only when SA key unmatched
authorSteven Allen <steven.allen@purestorage.com>
Fri, 24 Oct 2014 22:18:26 +0000 (15:18 -0700)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 3 Nov 2014 06:04:57 +0000 (22:04 -0800)
commitb6932ee35f1c1364dcea0e691b2feb912a6777e5
tree3fb9e947540d6cc9ae2368d74d3d175fee2afdf7
parent3b726ae2de02a406cc91903f80132daee37b6f1b
target: return CONFLICT only when SA key unmatched

PREEMPT (and PREEMPT AND ABORT) should return CONFLICT iff a specified
SERVICE ACTION RESERVATION KEY is specified and matches no existing
persistent reservation.

Without this patch, a PREEMPT will return CONFLICT if either all
reservations are held by the initiator (self preemption) or there is
nothing to preempt. According to the spec, both of these cases should
succeed.

Signed-off-by: Steven Allen <steven.allen@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_pr.c