[sheepdog] [PATCH stable-0.9 2/4] dog: fix segfault bug of getting snapshot for "LOCK_STATE_SHARED" VDI.
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Wed Dec 24 16:20:20 CET 2014
From: Teruaki Ishizaki <ishizaki.teruaki at lab.ntt.co.jp>
After iSCSI initiator logins to the iSCSI target of the VDI,
getting snapshot for that volume causes segault.
This patch fixes false loop.
Signed-off-by: Teruaki Ishizaki <ishizaki.teruaki at lab.ntt.co.jp>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
dog/vdi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dog/vdi.c b/dog/vdi.c
index c541706..1adf4bd 100644
--- a/dog/vdi.c
+++ b/dog/vdi.c
@@ -631,7 +631,7 @@ static int vdi_snapshot(int argc, char **argv)
nr_owners = 1;
} else {
/* tgt is using it */
- for (int j = 0; j < s->nr_participants; i++) {
+ for (int j = 0; j < s->nr_participants; j++) {
memset(&owners[nr_owners], 0,
sizeof(owners[nr_owners]));
memcpy(&owners[nr_owners],
--
1.9.1
More information about the sheepdog
mailing list