[sheepdog] [PATCH v1] dog/vdi: fix bug in dog vdi check
Bingpeng Zhu
nkuzbp at foxmail.com
Thu Aug 28 13:02:56 CEST 2014
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(-)
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
More information about the sheepdog
mailing list