LIO PERSISTENT RESERVE OUT PREEMPT spec compliance
Subsystems (2)
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
Quoted 1 line · Stefan Hajnoczi
Thoughts?
There is a persistent reservation compliance test suite in libiscsi. SCST passes that test suite if I remember correctly. It would be great if LIO would pass the tests from that test suite too. See also
https://github.com/sahlberg/libiscsi
Thanks,
Bart.
Quoted 7 lines · Bart Van Assche
Quoted 1 line · Stefan Hajnoczi
Thoughts?
There is a persistent reservation compliance test suite in libiscsi. SCST passes that test suite if I remember correctly. It would be great if LIO would pass the tests from that test suite too. See also
https://github.com/sahlberg/libiscsi
Hi Bart,
Thanks for sharing the libiscsi test suite.
Stefan