Whamcloud - gitweb
b=17686
authoryury <yury>
Tue, 18 Nov 2008 20:57:13 +0000 (20:57 +0000)
committeryury <yury>
Tue, 18 Nov 2008 20:57:13 +0000 (20:57 +0000)
r=panda,shadow

- fixes race in ptlrpcd (happens when stopping ptlrpcd right after adding new req to it) which leads to hanging new added rpc whcih in turn leads to keeping ref to import, obd that makes it impossible to cleanup;

- cleanups and more debugs in recov_thread to detect things like this.

lustre/include/lustre_net.h

index 821d4ad..25ddddf 100644 (file)
@@ -640,7 +640,7 @@ struct ptlrpc_service {
 
 struct ptlrpcd_ctl {
         /**
-         * Ptlrpc thread control flags (LIOD_START, LIOD_STOP, LIOD_STOP_FORCE)
+         * Ptlrpc thread control flags (LIOD_START, LIOD_STOP, LIOD_FORCE)
          */
         unsigned long               pc_flags;
         /**
@@ -695,10 +695,11 @@ enum ptlrpcd_ctl_flags {
          */
         LIOD_STOP        = 1 << 1,
         /**
-         * Ptlrpc thread stop force flag. This will cause also 
-         * aborting any inflight rpcs handled by thread.
+         * Ptlrpc thread force flag (only stop force so far).
+         * This will cause aborting any inflight rpcs handled
+         * by thread if LIOD_STOP is specified.
          */
-        LIOD_STOP_FORCE  = 1 << 2
+        LIOD_FORCE       = 1 << 2
 };
 
 /* ptlrpc/events.c */