[sheepdog-users] [PATCH stable-0.7 2/2] dog: remove needless checking of vdi creation
Hitoshi Mitake
mitake.hitoshi at lab.ntt.co.jp
Wed Jan 29 11:26:48 CET 2014
The removed check can be done in sheep side.
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
dog/vdi.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/dog/vdi.c b/dog/vdi.c
index 998ccd0..6c1a10d 100644
--- a/dog/vdi.c
+++ b/dog/vdi.c
@@ -497,7 +497,7 @@ static int vdi_create(int argc, char **argv)
uint64_t size;
uint32_t vid;
uint64_t oid;
- uint32_t idx, max_idx, nr_copies = vdi_cmd_data.nr_copies;
+ uint32_t idx, max_idx;
struct sd_inode *inode = NULL;
int ret;
@@ -513,12 +513,6 @@ static int vdi_create(int argc, char **argv)
return EXIT_USAGE;
}
- if (nr_copies > sd_nodes_nr) {
- sd_err("There are not enough nodes(%d) to hold the copies(%d)",
- sd_nodes_nr, nr_copies);
- return EXIT_USAGE;
- }
-
ret = do_vdi_create(vdiname, size, 0, &vid, false,
vdi_cmd_data.nr_copies);
if (ret != EXIT_SUCCESS || !vdi_cmd_data.prealloc)
--
1.7.10.4
More information about the sheepdog-users
mailing list