Whamcloud - gitweb
LU-398 ptlrpc: Add the NRS ORR and TRR policies
[fs/lustre-release.git] / lustre / ptlrpc / nrs.c
index a4c72c3..5343ab3 100644 (file)
@@ -1741,6 +1741,13 @@ out:
 
 /* ptlrpc/nrs_fifo.c */
 extern struct ptlrpc_nrs_pol_conf nrs_conf_fifo;
+#if defined HAVE_SERVER_SUPPORT && defined(__KERNEL__)
+/* ptlrpc/nrs_crr.c */
+extern struct ptlrpc_nrs_pol_conf nrs_conf_crrn;
+/* ptlrpc/nrs_orr.c */
+extern struct ptlrpc_nrs_pol_conf nrs_conf_orr;
+extern struct ptlrpc_nrs_pol_conf nrs_conf_trr;
+#endif
 
 /**
  * Adds all policies that ship with the ptlrpc module, to NRS core's list of
@@ -1761,6 +1768,20 @@ int ptlrpc_nrs_init(void)
        if (rc != 0)
                GOTO(fail, rc);
 
+#if defined HAVE_SERVER_SUPPORT && defined(__KERNEL__)
+       rc = ptlrpc_nrs_policy_register(&nrs_conf_crrn);
+       if (rc != 0)
+               GOTO(fail, rc);
+
+       rc = ptlrpc_nrs_policy_register(&nrs_conf_orr);
+       if (rc != 0)
+               GOTO(fail, rc);
+
+       rc = ptlrpc_nrs_policy_register(&nrs_conf_trr);
+       if (rc != 0)
+               GOTO(fail, rc);
+#endif
+
        RETURN(rc);
 fail:
        /**