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 <[email protected]>
---
 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

-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to