[sheepdog] [PATCH v2 2/2] collie: make `collie vdi list` not read vdi_inuse bitmap
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Fri Aug 24 08:11:20 CEST 2012
At Fri, 24 Aug 2012 13:36:47 +0800,
levin li wrote:
>
> From: levin li <xingke.lwp at taobao.com>
>
>
> Signed-off-by: levin li <xingke.lwp at taobao.com>
> ---
> collie/common.c | 32 ++++++++++++++++----------------
> include/sheep.h | 5 +++++
> sheep/sheep_priv.h | 5 -----
> 3 files changed, 21 insertions(+), 21 deletions(-)
>
> diff --git a/collie/common.c b/collie/common.c
> index 364e36c..c03cab7 100644
> --- a/collie/common.c
> +++ b/collie/common.c
> @@ -126,16 +126,16 @@ int sd_write_object(uint64_t oid, uint64_t cow_oid, void *data, unsigned int dat
>
> int parse_vdi(vdi_parser_func_t func, size_t size, void *data)
> {
> - int ret, fd;
> + int ret, fd, count;
> + struct vdi_copy *vc;
> unsigned long nr;
> static struct sheepdog_inode i;
> struct sd_req req;
> - static DECLARE_BITMAP(vdi_inuse, SD_NR_VDIS);
> - unsigned int wlen = 0, rlen = sizeof(vdi_inuse) * 2;
> - char *buf;
> + struct sd_rsp *rsp = (struct sd_rsp *)&req;
> + unsigned int wlen = 0, rlen = SD_NR_VDIS;
Should be "rlen = SD_NR_VDIS * sizeof(*vc)"?
Thanks,
Kazutaka
More information about the sheepdog
mailing list