Skip to contentSkip to conversation

: SPC-3 defined compatible reservation handling (CRH=1)

PATCH New Nicholas A. Bellinger 1 participant 1 message Mar 8, 2010 SCSI

lore
Share & tools
lore
#0 lore raw

cover : SPC-3 defined compatible reservation handling (CRH=1)

From: Nicholas Bellinger <[email protected]>

Greetings SCSI folks

This patch series adds proper support for >= SPC-3 defined compatible reservation handling (CRH=1) within lio-core-2.6.git/drivers/target/target_core_pr.c. It also adds the necessary checks to handle when >= SPC-3 PR and legacy SPC-2 reservation logic is intermixed and RESERVATION_CONFLICT status should be returned.

The patch logic is following spc4r17 for CRH=1 and spc2r20 for PR <-> Legacy Reservation interaction, but it would be great if any other SCSI folks would have a look and verify.

Also, in order to test the >= SPC-3 PR + legacy SPC-2 intermixed RESERVATION_CONFLICT cases, I ended up adding simple legacy RESERVE/RELEASE support to sg_persist.

Doug, would you be willing to accept a patch so that sg3_utils can have this test case..?

Best,

--nab

Nicholas Bellinger (3):
[TCM/PR]: Add support for compatible reservation handling (CRH=1) [TCM]: Make legacy RESERVE_* and RELEASE_* use

    se_cmd_t->transport_emulate_cdb()

[TCM]: Release legacy SPC-2 reservation during TMR LUN_RESET

 drivers/target/target_core_pr.c        |  176 +++++++++++++++++++++++--------
 drivers/target/target_core_tmr.c       |   12 ++
 drivers/target/target_core_transport.c |   25 +++--
 include/target/target_core_base.h      |    2 -
 include/target/target_core_pr.h        |    1 +
 5 files changed, 158 insertions(+), 58 deletions(-)