From 549231dda9769f23eebf039bc0f7c34a4c086270 Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Tue, 19 Feb 2013 16:27:54 +0530 Subject: glusterd: Added the validation function for subvols-per-directory Change-Id: Ie2259023b9001311a2032792639c3093054f6750 BUG: 896431 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/4552 Reviewed-by: Jeff Darcy Tested-by: Gluster Build System --- xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-ops.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index ac8925e54..bc5f8f2a7 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -1504,8 +1504,12 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr) /* dist-leaf-count is the count of brick nodes for a given subvolume of distribute */ - volinfo->dist_leaf_count = (volinfo->stripe_count * - volinfo->replica_count); + volinfo->dist_leaf_count = glusterd_get_dist_leaf_count (volinfo); + + /* subvol_count is the count of number of subvolumes present + for a given distribute volume */ + volinfo->subvol_count = (volinfo->brick_count / + volinfo->dist_leaf_count); /* Keep sub-count same as earlier, for the sake of backward compatibility */ -- cgit