qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Liu Yuan <tailai.ly@taobao.com>,
	MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Subject: [Qemu-devel] [PATCH 05/13] sheepdog: pass vdi_id to sheep daemon for sd_close()
Date: Fri,  1 Feb 2013 15:27:56 +0100	[thread overview]
Message-ID: <1359728884-19422-6-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1359728884-19422-1-git-send-email-stefanha@redhat.com>

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.

Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 block/sheepdog.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/block/sheepdog.c b/block/sheepdog.c
index 3e49bb8..d466b23 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -145,7 +145,7 @@ typedef struct SheepdogVdiReq {
     uint32_t id;
     uint32_t data_length;
     uint64_t vdi_size;
-    uint32_t base_vdi_id;
+    uint32_t vdi_id;
     uint32_t copies;
     uint32_t snapid;
     uint32_t pad[3];
@@ -1201,7 +1201,7 @@ static int do_sd_create(char *filename, int64_t vdi_size,
 
     memset(&hdr, 0, sizeof(hdr));
     hdr.opcode = SD_OP_NEW_VDI;
-    hdr.base_vdi_id = base_vid;
+    hdr.vdi_id = base_vid;
 
     wlen = SD_MAX_VDI_LEN;
 
@@ -1384,6 +1384,7 @@ static void sd_close(BlockDriverState *bs)
     memset(&hdr, 0, sizeof(hdr));
 
     hdr.opcode = SD_OP_RELEASE_VDI;
+    hdr.vdi_id = s->inode.vdi_id;
     wlen = strlen(s->name) + 1;
     hdr.data_length = wlen;
     hdr.flags = SD_FLAG_CMD_WRITE;
-- 
1.8.1

  parent reply	other threads:[~2013-02-01 14:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 14:27 [Qemu-devel] [PULL for-1.4 00/13] Block patches Stefan Hajnoczi
2013-02-01 14:27 ` [Qemu-devel] [PATCH 01/13] qemu-iotests: Add regression test for b7ab0fea Stefan Hajnoczi
2013-02-01 14:27 ` [Qemu-devel] [PATCH 02/13] block: Fix is_allocated_above with resized files Stefan Hajnoczi
2013-02-01 14:27 ` [Qemu-devel] [PATCH 03/13] block: Adds mirroring tests for resized images Stefan Hajnoczi
2013-02-01 14:27 ` [Qemu-devel] [PATCH 04/13] vmdk: Allow selecting SCSI adapter in image creation Stefan Hajnoczi
2013-02-01 14:27 ` Stefan Hajnoczi [this message]
2013-02-01 14:27 ` [Qemu-devel] [PATCH 06/13] bochs: Fix bdrv_open() error handling Stefan Hajnoczi
2013-02-01 14:27 ` [Qemu-devel] [PATCH 07/13] cloop: " Stefan Hajnoczi
2013-02-01 14:27 ` [Qemu-devel] [PATCH 08/13] vpc: " Stefan Hajnoczi
2013-02-01 14:28 ` [Qemu-devel] [PATCH 09/13] dmg: " Stefan Hajnoczi
2013-02-02 12:47   ` Blue Swirl
2013-02-01 14:28 ` [Qemu-devel] [PATCH 10/13] dmg: Use g_free instead of free Stefan Hajnoczi
2013-02-01 14:28 ` [Qemu-devel] [PATCH 11/13] parallels: Fix bdrv_open() error handling Stefan Hajnoczi
2013-02-01 14:28 ` [Qemu-devel] [PATCH 12/13] vmdk: Allow space in file name Stefan Hajnoczi
2013-02-01 14:28 ` [Qemu-devel] [PATCH 13/13] block/raw-posix: Build fix for O_ASYNC Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1359728884-19422-6-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=morita.kazutaka@lab.ntt.co.jp \
    --cc=qemu-devel@nongnu.org \
    --cc=tailai.ly@taobao.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).