- enum nrs_tbf_cmd_type tc_cmd;
- char *tc_name;
- __u64 tc_rpc_rate;
- struct list_head tc_nids;
- char *tc_nids_str;
- struct list_head tc_jobids;
- char *tc_jobids_str;
- __u32 tc_valid_types;
- __u32 tc_rule_flags;
+ enum nrs_tbf_cmd_type tc_cmd;
+ char *tc_name;
+ union {
+ struct nrs_tbf_cmd_start {
+ __u64 ts_rpc_rate;
+ struct list_head ts_nids;
+ char *ts_nids_str;
+ struct list_head ts_jobids;
+ char *ts_jobids_str;
+ struct cfs_bitmap *ts_opcodes;
+ char *ts_opcodes_str;
+ struct list_head ts_conds;
+ char *ts_conds_str;
+ __u32 ts_valid_type;
+ __u32 ts_rule_flags;
+ char *ts_next_name;
+ } tc_start;
+ struct nrs_tbf_cmd_change {
+ __u64 tc_rpc_rate;
+ char *tc_next_name;
+ } tc_change;
+ } u;
+};
+
+enum nrs_tbf_field {
+ NRS_TBF_FIELD_NID,
+ NRS_TBF_FIELD_JOBID,
+ NRS_TBF_FIELD_OPCODE,
+ NRS_TBF_FIELD_MAX
+};
+
+struct nrs_tbf_expression {
+ enum nrs_tbf_field te_field;
+ struct list_head te_cond;
+ struct cfs_bitmap *te_opcodes;
+ struct list_head te_linkage;
+};
+
+struct nrs_tbf_conjunction {
+ /**
+ * link to disjunction.
+ */
+ struct list_head tc_linkage;
+ /**
+ * list of logical conjunction
+ */
+ struct list_head tc_expressions;