Whamcloud - gitweb
LU-5319 mdc: manage number of modify RPCs in flight
[fs/lustre-release.git] / lustre / include / lustre_mdc.h
index 7ca89dc..f09f327 100644 (file)
@@ -165,6 +165,31 @@ static inline void mdc_put_rpc_lock(struct mdc_rpc_lock *lck,
        EXIT;
 }
 
+static inline void mdc_get_mod_rpc_slot(struct ptlrpc_request *req,
+                                       struct lookup_intent *it)
+{
+       struct client_obd *cli = &req->rq_import->imp_obd->u.cli;
+       __u32 opc;
+       __u16 tag;
+
+       opc = lustre_msg_get_opc(req->rq_reqmsg);
+       tag = obd_get_mod_rpc_slot(cli, opc, it);
+       lustre_msg_set_tag(req->rq_reqmsg, tag);
+}
+
+static inline void mdc_put_mod_rpc_slot(struct ptlrpc_request *req,
+                                       struct lookup_intent *it)
+{
+       struct client_obd *cli = &req->rq_import->imp_obd->u.cli;
+       __u32 opc;
+       __u16 tag;
+
+       opc = lustre_msg_get_opc(req->rq_reqmsg);
+       tag = lustre_msg_get_tag(req->rq_reqmsg);
+       obd_put_mod_rpc_slot(cli, opc, it, tag);
+}
+
+
 /**
  * Update the maximum possible easize.
  *