[sheepdog] [PATCH v1] dog/vdi: fix bug in dog vdi check

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Fri Aug 29 09:09:40 CEST 2014


At Thu, 28 Aug 2014 19:02:56 +0800,
Bingpeng Zhu wrote:
> 
> If condition is never satisfied since nr_copies
> is the minimum of inode->nr_copies and sd_zones_nr.
> 
> Signed-off-by: Bingpeng Zhu <bingpeng.zbp at alibaba-inc.com>
> ---
>  dog/vdi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.
Hitoshi

> 
> diff --git a/dog/vdi.c b/dog/vdi.c
> index 19da73e..8d9ee46 100644
> --- a/dog/vdi.c
> +++ b/dog/vdi.c
> @@ -2018,7 +2018,7 @@ int do_vdi_check(const struct sd_inode *inode)
>  	struct work_queue *wq;
>  	int nr_copies = min((int)inode->nr_copies, sd_zones_nr);
>  
> -	if (0 < inode->copy_policy && sd_zones_nr < nr_copies) {
> +	if (0 < inode->copy_policy && sd_zones_nr < (int)inode->nr_copies) {
>  		sd_err("ABORT: Not enough active zones for consistency-checking"
>  		       " erasure coded VDI");
>  		return EXIT_FAILURE;
> -- 
> 1.7.1
> 
> 
> 
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> http://lists.wpkg.org/mailman/listinfo/sheepdog



More information about the sheepdog mailing list