Whamcloud - gitweb
LU-12580 lov: fix out of bound usercopy
[fs/lustre-release.git] / lustre / include / lustre_nrs.h
index 6552518..6397cf2 100644 (file)
@@ -380,6 +380,7 @@ struct ptlrpc_nrs {
 };
 
 #define NRS_POL_NAME_MAX               16
+#define NRS_POL_ARG_MAX                        16
 
 struct ptlrpc_nrs_pol_desc;
 
@@ -549,6 +550,10 @@ struct ptlrpc_nrs_pol_info {
         */
        char                            pi_name[NRS_POL_NAME_MAX];
        /**
+        * Policy argument
+        */
+       char                            pi_arg[NRS_POL_ARG_MAX];
+       /**
         * Current policy state
         */
        enum ptlrpc_nrs_pol_state       pi_state;
@@ -604,6 +609,10 @@ struct ptlrpc_nrs_policy {
         */
        long                            pol_ref;
        /**
+        * Human-readable policy argument
+        */
+       char                            pol_arg[NRS_POL_ARG_MAX];
+       /**
         * The NRS head this policy has been created at
         */
        struct ptlrpc_nrs              *pol_nrs;
@@ -666,6 +675,7 @@ enum {
 #include <lustre_nrs_tbf.h>
 #include <lustre_nrs_crr.h>
 #include <lustre_nrs_orr.h>
+#include <lustre_nrs_delay.h>
 
 /**
  * NRS request
@@ -691,7 +701,7 @@ struct ptlrpc_nrs_request {
        unsigned                        nr_enqueued:1;
        unsigned                        nr_started:1;
        unsigned                        nr_finalized:1;
-       cfs_binheap_node_t              nr_node;
+       struct cfs_binheap_node         nr_node;
 
        /**
         * Policy-specific fields, used for determining a request's scheduling
@@ -712,6 +722,10 @@ struct ptlrpc_nrs_request {
                 * TBF request definition
                 */
                struct nrs_tbf_req      tbf;
+               /**
+                * Fields for the delay policy
+                */
+               struct nrs_delay_req    delay;
        } nr_u;
        /**
         * Externally-registering policies may want to use this to allocate