diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-12-03 12:57:13 +0200 |
---|---|---|
committer | Amar Tumballi <amarts@gmail.com> | 2019-12-18 03:47:42 +0000 |
commit | 194e4216c8e30612f96f8f3712fdb3f1c96b3a08 (patch) | |
tree | de825272940d753f129b43187837f7f5c3584d69 /xlators/mgmt/glusterd/src/glusterd.c | |
parent | 6f6b253deed134c5fee37e1e3d2fd44b18e1db6e (diff) |
[RFC]#ifdef gNFS related code if we are not compiling gNFS
If we are not compiling gNFS (--enable-gnfs is not given in the
./configure script params), there is little point in compiling code
that is related to it.
This patch tries to eliminate it.
My hope (and it's not clear from the code ) is that I did not break
the NFS Ganesha support as well.
Other than that, tried to compile with and without anad it looks sane.
Change-Id: I8d6c98066b9fceab4ec10fc6f5e81ab069e853bd
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index c17f2859d9b..cd2c5da628b 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -37,7 +37,9 @@ #include "glusterd-locks.h" #include "glusterd-svc-mgmt.h" #include "glusterd-shd-svc.h" +#ifdef BUILD_GNFS #include "glusterd-nfs-svc.h" +#endif #include "glusterd-bitd-svc.h" #include "glusterd-scrub-svc.h" #include "glusterd-quotad-svc.h" @@ -1562,6 +1564,7 @@ init(xlator_t *this) exit(1); } +#ifdef BUILD_GNFS ret = glusterd_init_var_run_dirs(this, rundir, GLUSTERD_NFS_RUN_DIR); if (ret) { gf_msg(this->name, GF_LOG_CRITICAL, 0, GD_MSG_CREATE_DIR_FAILED, @@ -1569,6 +1572,7 @@ init(xlator_t *this) "nfs running directory"); exit(1); } +#endif ret = glusterd_init_var_run_dirs(this, rundir, GLUSTERD_QUOTAD_RUN_DIR); if (ret) { @@ -1662,6 +1666,7 @@ init(xlator_t *this) exit(1); } +#ifdef BUILD_GNFS len = snprintf(storedir, sizeof(storedir), "%s/nfs", workdir); if ((len < 0) || (len >= sizeof(storedir))) { exit(1); @@ -1674,7 +1679,7 @@ init(xlator_t *this) storedir, errno); exit(1); } - +#endif len = snprintf(storedir, sizeof(storedir), "%s/bitd", workdir); if ((len < 0) || (len >= sizeof(storedir))) { exit(1); @@ -1921,7 +1926,9 @@ init(xlator_t *this) glusterd_mgmt_v3_lock_timer_init(); glusterd_txn_opinfo_dict_init(); +#ifdef BUILD_GNFS glusterd_nfssvc_build(&conf->nfs_svc); +#endif glusterd_quotadsvc_build(&conf->quotad_svc); glusterd_bitdsvc_build(&conf->bitd_svc); glusterd_scrubsvc_build(&conf->scrub_svc); |