nrs_delay is intended for use on the client, but is currently disabled
for client-only builds. So move the ptlrpc_nrs_policy_register() call
outside of the #ifdef.
Also change the nrs modules that *are* server-only to not have #ifdef
in the C file, but that rather to be identified in the Makefile as
only being built when server code is wanted.
Test-Parameters: trivial
Signed-off-by: Mr NeilBrown <neilb@suse.de>
Change-Id: Ie25ed5ac837ff5f891824fad31ab258923840ec0
Reviewed-on: https://review.whamcloud.com/41127
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Chris Horn <chris.horn@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
ptlrpc_objs += llog_net.o llog_client.o llog_server.o import.o ptlrpcd.o
ptlrpc_objs += pers.o lproc_ptlrpc.o wiretest.o layout.o
ptlrpc_objs += sec.o sec_ctx.o sec_bulk.o sec_gc.o sec_config.o sec_lproc.o
ptlrpc_objs += llog_net.o llog_client.o llog_server.o import.o ptlrpcd.o
ptlrpc_objs += pers.o lproc_ptlrpc.o wiretest.o layout.o
ptlrpc_objs += sec.o sec_ctx.o sec_bulk.o sec_gc.o sec_config.o sec_lproc.o
-ptlrpc_objs += sec_null.o sec_plain.o nrs.o nrs_fifo.o nrs_crr.o nrs_orr.o
-ptlrpc_objs += nrs_tbf.o nrs_delay.o errno.o
+ptlrpc_objs += sec_null.o sec_plain.o nrs.o nrs_fifo.o nrs_delay.o
+ptlrpc_objs += errno.o
+
+nrs_server_objs := nrs_crr.o nrs_orr.o nrs_tbf.o
nodemap_objs := nodemap_handler.o nodemap_lproc.o nodemap_range.o
nodemap_objs += nodemap_idmap.o nodemap_rbtree.o nodemap_member.o
nodemap_objs += nodemap_storage.o
ptlrpc-objs := $(ldlm_objs) $(ptlrpc_objs) $(TARGET)barrier.o $(target_pool_objs)
nodemap_objs := nodemap_handler.o nodemap_lproc.o nodemap_range.o
nodemap_objs += nodemap_idmap.o nodemap_rbtree.o nodemap_member.o
nodemap_objs += nodemap_storage.o
ptlrpc-objs := $(ldlm_objs) $(ptlrpc_objs) $(TARGET)barrier.o $(target_pool_objs)
-@SERVER_TRUE@ptlrpc-objs += $(target_objs) $(nodemap_objs)
+@SERVER_TRUE@ptlrpc-objs += $(target_objs) $(nodemap_objs) $(nrs_server_objs)
EXTRA_DIST := $(ptlrpc_objs:.o=.c) ptlrpc_internal.h
EXTRA_DIST += $(nodemap_objs:.o=.c) nodemap_internal.h
EXTRA_DIST := $(ptlrpc_objs:.o=.c) ptlrpc_internal.h
EXTRA_DIST += $(nodemap_objs:.o=.c) nodemap_internal.h
+EXTRA_DIST += $(nrs_server_objs:.o=.c)
EXTRA_PRE_CFLAGS := -I@LUSTRE@/ldlm -I@LUSTRE@/target
EXTRA_PRE_CFLAGS := -I@LUSTRE@/ldlm -I@LUSTRE@/target
rc = ptlrpc_nrs_policy_register(&nrs_conf_tbf);
if (rc != 0)
GOTO(fail, rc);
rc = ptlrpc_nrs_policy_register(&nrs_conf_tbf);
if (rc != 0)
GOTO(fail, rc);
+#endif /* HAVE_SERVER_SUPPORT */
rc = ptlrpc_nrs_policy_register(&nrs_conf_delay);
if (rc != 0)
GOTO(fail, rc);
rc = ptlrpc_nrs_policy_register(&nrs_conf_delay);
if (rc != 0)
GOTO(fail, rc);
-#endif /* HAVE_SERVER_SUPPORT */
-#ifdef HAVE_SERVER_SUPPORT
#define DEBUG_SUBSYSTEM S_RPC
#include <obd_support.h>
#define DEBUG_SUBSYSTEM S_RPC
#include <obd_support.h>
/** @} CRR-N policy */
/** @} nrs */
/** @} CRR-N policy */
/** @} nrs */
-
-#endif /* HAVE_SERVER_SUPPORT */
* Author: Liang Zhen <liang@whamcloud.com>
* Author: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
*/
* Author: Liang Zhen <liang@whamcloud.com>
* Author: Nikitas Angelinas <nikitas_angelinas@xyratex.com>
*/
-#ifdef HAVE_SERVER_SUPPORT
/** @} ORR/TRR policy */
/** @} nrs */
/** @} ORR/TRR policy */
/** @} nrs */
-
-#endif /* HAVE_SERVER_SUPPORT */
-#ifdef HAVE_SERVER_SUPPORT
-
/**
* \addtogoup nrs
* @{
/**
* \addtogoup nrs
* @{
/** @} tbf */
/** @} nrs */
/** @} tbf */
/** @} nrs */
-
-#endif /* HAVE_SERVER_SUPPORT */
extern struct list_head ptlrpc_all_services;
extern struct mutex ptlrpc_all_services_mutex;
extern struct ptlrpc_nrs_pol_conf nrs_conf_fifo;
extern struct list_head ptlrpc_all_services;
extern struct mutex ptlrpc_all_services_mutex;
extern struct ptlrpc_nrs_pol_conf nrs_conf_fifo;
+extern struct ptlrpc_nrs_pol_conf nrs_conf_delay;
#ifdef HAVE_SERVER_SUPPORT
extern struct ptlrpc_nrs_pol_conf nrs_conf_crrn;
extern struct ptlrpc_nrs_pol_conf nrs_conf_orr;
extern struct ptlrpc_nrs_pol_conf nrs_conf_trr;
extern struct ptlrpc_nrs_pol_conf nrs_conf_tbf;
#ifdef HAVE_SERVER_SUPPORT
extern struct ptlrpc_nrs_pol_conf nrs_conf_crrn;
extern struct ptlrpc_nrs_pol_conf nrs_conf_orr;
extern struct ptlrpc_nrs_pol_conf nrs_conf_trr;
extern struct ptlrpc_nrs_pol_conf nrs_conf_tbf;
-extern struct ptlrpc_nrs_pol_conf nrs_conf_delay;
#endif /* HAVE_SERVER_SUPPORT */
/**
#endif /* HAVE_SERVER_SUPPORT */
/**