From: Stefan Hajnoczi <stefanha@redhat.com>
To: target-devel@vger.kernel.org,
"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: LIO PERSISTENT RESERVE OUT PREEMPT spec compliance
Date: Wed, 1 Apr 2026 08:46:26 -0400 [thread overview]
Message-ID: <20260401124626.GA266484@fedora> (raw)
[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]
Hi,
I've noticed differences in behavior between LIO and HPE 3PAR storage
when handling PERSISTENT RESERVE OUT commands with the PREEMPT service
action.
I'd like to confirm what the behavior should be and will send patches if
necessary:
1. Not ignoring the TYPE field when removing reservations
LIO always checks the TYPE field for PREEMPT and fails requests that
have an invalid TYPE field value (e.g. 0). PREEMPT can be used to remove
registrations (rather than preempting reservations) and in that case
SPC-6 5.14.11.2.5 Removing registrations says "b) ignore the contents of
the SCOPE field and the TYPE field". My interpretation is that LIO
should not check the TYPE field here and it is currently not
spec-compliant.
I compared against HPE 3PAR storage and found that it completes the
command successfully.
2. Removing the I_T nexus registration sending the PREEMPT
When handling a PREEMPT that removes registrations (rather than
preempting reservations), LIO removes all registrations with the given
service action reservation key, including the I_T nexus sending the
PREEMPT.
I think this behavior is supported by SPC-6 5.14.11.2.5 Removing
registrations which says "a) remove the registrations for all I_T
nexuses specified by the SERVICE ACTION RESERVATION KEY field". In other
places the spec explicitly says "except the I_T nexus that is being used
for the PERSISTENT RESERVE OUT command", so I think LIO is correct to
really remove all registrations for the given key.
Note however that HPE 3PAR storage does not remove the registration for
the I_T nexus sending the PREEMPT, so there is a behavioral difference
between LIO and 3PAR.
Thoughts?
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2026-04-01 12:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-01 12:46 Stefan Hajnoczi [this message]
2026-04-01 15:56 ` LIO PERSISTENT RESERVE OUT PREEMPT spec compliance Bart Van Assche
2026-04-01 17:09 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260401124626.GA266484@fedora \
--to=stefanha@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=target-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox