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-utils.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 64f45f247..e151b2f71 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -4106,6 +4106,15 @@ glusterd_restart_gsyncds (glusterd_conf_t *conf) return ret; } +inline int +glusterd_get_dist_leaf_count (glusterd_volinfo_t *volinfo) +{ + int rcount = volinfo->replica_count; + int scount = volinfo->stripe_count; + + return (rcount ? rcount : 1) * (scount ? scount : 1); +} + int glusterd_get_brickinfo (xlator_t *this, const char *brickname, int port, gf_boolean_t localhost, glusterd_brickinfo_t **brickinfo) -- cgit