From 635e35723782c5973941d1f2bb0d3065b49eac4c Mon Sep 17 00:00:00 2001
From: David Disseldorp <ddiss@suse.de>
Date: Mon, 31 Aug 2015 13:48:06 +0200
Subject: [PATCH] target/rbd: add stubbed out pr_register_and_move
Patch-mainline: Not yet, SES2 clustered LIO/RBD
References: fate#318836
Add a tcm_rbd_pr_ops handler for PR REGISTER AND MOVE requests. This
operation is currently unsupported by the RBD backend.
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
drivers/target/target_core_rbd.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/drivers/target/target_core_rbd.c
+++ b/drivers/target/target_core_rbd.c
@@ -2392,6 +2392,14 @@ err_info_free:
return ret;
}
+static sense_reason_t
+tcm_rbd_execute_pr_register_and_move(struct se_cmd *cmd, u64 old_key,
+ u64 new_key, bool aptpl, int unreg)
+{
+ pr_err("REGISTER AND MOVE not supported by RBD backend\n");
+ return TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE;
+}
+
static struct target_pr_ops tcm_rbd_pr_ops = {
.pr_read_keys = tcm_rbd_execute_pr_read_keys,
.pr_read_reservation = tcm_rbd_execute_pr_read_reservation,
@@ -2401,6 +2409,7 @@ static struct target_pr_ops tcm_rbd_pr_o
.pr_release = tcm_rbd_execute_pr_release,
.pr_clear = tcm_rbd_execute_pr_clear,
.pr_preempt = tcm_rbd_execute_pr_preempt,
+ .pr_register_and_move = tcm_rbd_execute_pr_register_and_move,
};
static const struct target_backend_ops tcm_rbd_ops = {