[sheepdog] [PATCH] sheep: forbid double locking by single tgtd

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Thu Oct 2 11:24:05 CEST 2014


Previous tgtd could cause double locking as an ordinal action. But
recent change
(https://github.com/fujita/tgt/commit/744aa51940c10c7986fc3911eb3ea44d6116ed45)
removed this confusing action. So this patch let sheep forbid the
double locking.

Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
 sheep/vdi.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sheep/vdi.c b/sheep/vdi.c
index 5874c29..c8fdf4a 100644
--- a/sheep/vdi.c
+++ b/sheep/vdi.c
@@ -363,13 +363,9 @@ static bool add_new_participant(struct vdi_state_entry *entry,
 		if (node_id_cmp(&entry->participants[i], owner))
 			continue;
 
-		/*
-		 * already exist, VDI locking with reloading inode causes
-		 * this case
-		 */
-		sd_debug("%s is already locking %"PRIx32, node_id_to_str(owner),
+		sd_err("%s is already locking %"PRIx32, node_id_to_str(owner),
 			 entry->vid);
-		return true;
+		return false;
 	}
 
 	idx = entry->nr_participants++;
-- 
1.8.3.2




More information about the sheepdog mailing list