[PATCH] release SCSI2 reservation on nexus loss

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
---
 usr/target.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/usr/target.c b/usr/target.c
index a69fe0b..1b81d0d 100644
--- a/usr/target.c
+++ b/usr/target.c
@@ -294,6 +294,7 @@ int it_nexus_destroy(int tid, uint64_t itn_id)
 {
 	int i;
 	struct it_nexus *itn;
+	struct scsi_lu *lu;
 
 	dprintf("%d %" PRIu64 "\n", tid, itn_id);
 
@@ -305,6 +306,9 @@ int it_nexus_destroy(int tid, uint64_t itn_id)
 		if (!list_empty(&itn->cmd_hash_list[i]))
 			return -EBUSY;
 
+	list_for_each_entry(lu, &itn->nexus_target->device_list, device_siblings)
+		device_release(tid, itn_id, lu->lun, 0);
+
 	it_nexus_del_lu_info(itn);
 
 	list_del(&itn->nexus_siblings);
-- 
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux