Whamcloud - gitweb
LU-9119 lnet: fix race in lnet shutdown path
[fs/lustre-release.git] / lnet / include / lnet / lib-types.h
index cfa4c39..c72771c 100644 (file)
@@ -734,6 +734,11 @@ struct lnet_msg_container {
 #define LNET_RC_STATE_RUNNING          1       /* started up OK */
 #define LNET_RC_STATE_STOPPING         2       /* telling thread to stop */
 
+/* LNet states */
+#define LNET_STATE_SHUTDOWN            0       /* not started */
+#define LNET_STATE_RUNNING             1       /* started up OK */
+#define LNET_STATE_STOPPING            2       /* telling thread to stop */
+
 typedef struct lnet {
        /* CPU partition table of LNet */
        struct cfs_cpt_table            *ln_cpt_table;
@@ -812,8 +817,8 @@ typedef struct lnet {
        int                             ln_niinit_self;
        /* LNetNIInit/LNetNIFini counter */
        int                             ln_refcount;
-       /* shutdown in progress */
-       int                             ln_shutdown;
+       /* SHUTDOWN/RUNNING/STOPPING */
+       int                             ln_state;
 
        int                             ln_routing;     /* am I a router? */
        lnet_pid_t                      ln_pid;         /* requested pid */