[sheepdog] [PATCH] dog: fix segfault bug of getting snapshot for "LOCK_STATE_SHARED" VDI.
Teruaki Ishizaki
ishizaki.teruaki at lab.ntt.co.jp
Wed Dec 3 09:24:21 CET 2014
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>
---
dog/vdi.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dog/vdi.c b/dog/vdi.c
index db4cdd7..5353062 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.7.1
More information about the sheepdog
mailing list