Whamcloud - gitweb
LU-8935 ptlrpc: missing barrier before wake_up
[fs/lustre-release.git] / lustre / include / lustre_net.h
index 14da6e2..f705ceb 100644 (file)
@@ -50,7 +50,7 @@
  *
  * @{
  */
-
+#include <linux/kobject.h>
 #include <linux/uio.h>
 #include <libcfs/libcfs.h>
 #include <lnet/nidstr.h>
@@ -967,6 +967,7 @@ struct ptlrpc_request {
         * rq_list
         */
        spinlock_t                       rq_lock;
+       spinlock_t                       rq_early_free_lock;
        /** client-side flags are serialized by rq_lock @{ */
        unsigned int rq_intr:1, rq_replied:1, rq_err:1,
                 rq_timedout:1, rq_resend:1, rq_restart:1,
@@ -998,6 +999,7 @@ struct ptlrpc_request {
                rq_allow_replay:1,
                /* bulk request, sent to server, but uncommitted */
                rq_unstable:1,
+               rq_early_free_repbuf:1, /* free reply buffer in advance */
                rq_allow_intr:1;
        /** @} */
 
@@ -1729,6 +1731,10 @@ struct ptlrpc_service {
        int                             srv_cpt_bits;
        /** CPT table this service is running over */
        struct cfs_cpt_table            *srv_cptable;
+
+       /* sysfs object */
+       struct kobject                  srv_kobj;
+       struct completion               srv_kobj_unregister;
        /**
         * partition data for ptlrpc service
         */
@@ -2261,6 +2267,7 @@ void ptlrpc_schedule_difficult_reply(struct ptlrpc_reply_state *rs);
 int ptlrpc_hpreq_handler(struct ptlrpc_request *req);
 struct ptlrpc_service *ptlrpc_register_service(
                                struct ptlrpc_service_conf *conf,
+                               struct kset *parent,
                                struct proc_dir_entry *proc_entry);
 void ptlrpc_stop_all_threads(struct ptlrpc_service *svc);
 
@@ -2510,6 +2517,7 @@ ptlrpc_client_recv_or_unlink(struct ptlrpc_request *req)
 static inline void
 ptlrpc_client_wake_req(struct ptlrpc_request *req)
 {
+       smp_mb();
        if (req->rq_set == NULL)
                wake_up(&req->rq_reply_waitq);
        else