Patchwork sheepdog: pass vdi_id to sheep daemon for sd_close()

login
register
mail settings
Submitter namei.unix@gmail.com
Date Jan. 29, 2013, 8:14 a.m.
Message ID <1359447298-24263-1-git-send-email-namei.unix@gmail.com>
Download mbox | patch
Permalink /patch/216452/
State New
Headers show

Comments

namei.unix@gmail.com - Jan. 29, 2013, 8:14 a.m.
From: Liu Yuan <tailai.ly@taobao.com>

Sheep daemon needs vdi_id to identify which vdi is closed to release resources
such as object cache.

Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
---
 block/sheepdog.c |    1 +
 1 file changed, 1 insertion(+)

Patch

diff --git a/block/sheepdog.c b/block/sheepdog.c
index 3e49bb8..97c76f5 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1384,6 +1384,7 @@  static void sd_close(BlockDriverState *bs)
     memset(&hdr, 0, sizeof(hdr));
 
     hdr.opcode = SD_OP_RELEASE_VDI;
+    hdr.base_vdi_id = s->inode.vdi_id;
     wlen = strlen(s->name) + 1;
     hdr.data_length = wlen;
     hdr.flags = SD_FLAG_CMD_WRITE;