dog command needs to read/write inode objects for various operations e.g. taking snapshot. The operations shouldn't be prevented by locks acquired by other clients (QEMU and tgt). SD_OP_GET_VDI_INFO doesn't try to acquire the lock, so dog command should use it unconditionally.
Cc: Fabian Zimmermann <dev....@gmail.com> Cc: Valerio Pachera <siri...@gmail.com> Signed-off-by: Hitoshi Mitake <mitake.hito...@lab.ntt.co.jp> --- dog/vdi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dog/vdi.c b/dog/vdi.c index 2e3f7b3..739a0af 100644 --- a/dog/vdi.c +++ b/dog/vdi.c @@ -346,10 +346,7 @@ static int find_vdi_name(const char *vdiname, uint32_t snapid, const char *tag, if (tag) pstrcpy(buf + SD_MAX_VDI_LEN, SD_MAX_VDI_TAG_LEN, tag); - if (for_snapshot) - sd_init_req(&hdr, SD_OP_GET_VDI_INFO); - else - sd_init_req(&hdr, SD_OP_LOCK_VDI); + sd_init_req(&hdr, SD_OP_GET_VDI_INFO); hdr.data_length = SD_MAX_VDI_LEN + SD_MAX_VDI_TAG_LEN; hdr.flags = SD_FLAG_CMD_WRITE; hdr.vdi.snapid = snapid; -- 1.8.3.2 -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog