Message ID | 1359447769-29362-1-git-send-email-namei.unix@gmail.com |
---|---|
State | New |
Headers | show |
At Tue, 29 Jan 2013 16:22:49 +0800, Liu Yuan wrote: > > 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> > --- > block/sheepdog.c | 1 + > 1 file changed, 1 insertion(+) > > 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; How about renaming base_vdi_id to vdi_id? What you want to send here is not a base vdi id. I think it's better to generalize the field name so that we can use it here without confusion. Thanks, Kazutaka
On 01/29/2013 04:51 PM, MORITA Kazutaka wrote: > At Tue, 29 Jan 2013 16:22:49 +0800, > Liu Yuan wrote: >> >> 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> >> --- >> block/sheepdog.c | 1 + >> 1 file changed, 1 insertion(+) >> >> 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; > > How about renaming base_vdi_id to vdi_id? What you want to send here > is not a base vdi id. I think it's better to generalize the field > name so that we can use it here without confusion. > Okay. I'll send v2 Thanks, Yuan
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;