[Sheepdog] [PATCH] fix a bug of copies calculation in delete_one()
Li Wenpeng
levin108 at gmail.com
Sat Apr 28 05:52:48 CEST 2012
From: levin li <xingke.lwp at taobao.com>
It tries to compare the nr_copies with inode->nr_copies,
but the inode has just been allocated, the nr_copies may
be zero or something random
Signed-off-by: levin li <xingke.lwp at taobao.com>
---
sheep/vdi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/sheep/vdi.c b/sheep/vdi.c
index 0788f26..0f17824 100644
--- a/sheep/vdi.c
+++ b/sheep/vdi.c
@@ -457,8 +457,6 @@ static void delete_one(struct work *work)
}
nr_copies = get_nr_copies(dw->vnodes);
- if (nr_copies > inode->nr_copies)
- nr_copies = inode->nr_copies;
ret = read_object(dw->vnodes, dw->epoch, vid_to_vdi_oid(vdi_id),
(void *)inode, sizeof(*inode),
--
1.7.10
More information about the sheepdog
mailing list