Whamcloud - gitweb
Branch b1_4
authoradilger <adilger>
Mon, 6 Jun 2005 21:33:10 +0000 (21:33 +0000)
committeradilger <adilger>
Mon, 6 Jun 2005 21:33:10 +0000 (21:33 +0000)
Move class_fail_export() outside #ifdef __KERNEL__ for liblustre to compile
(even though this is a server-side only function).
b=5921

lustre/obdclass/genops.c

index d7dfff4..5a0060f 100644 (file)
@@ -985,39 +985,6 @@ int oig_wait(struct obd_io_group *oig)
 }
 EXPORT_SYMBOL(oig_wait);
 
-/* Ping evictor thread */
-#define D_PET D_HA
-
-#ifdef __KERNEL__
-#define PET_READY     1
-#define PET_TERMINATE 2
-
-static int               pet_refcount = 0;
-static int               pet_state;
-static wait_queue_head_t pet_waitq;
-static struct obd_export *pet_exp = NULL;
-static spinlock_t        pet_lock = SPIN_LOCK_UNLOCKED;
-
-static int ping_evictor_wake(struct obd_export *exp)
-{
-        spin_lock(&pet_lock);
-        if (pet_exp) {
-                /* eventually the new obd will call here again. */
-                spin_unlock(&pet_lock);
-                return 1;
-        }
-        pet_exp = exp;
-        spin_unlock(&pet_lock);
-
-        /* We have to make sure the obd isn't destroyed between now and when
-           the ping evictor runs. We'll take a reference here, and drop it
-           when we finish in the evictor.  We don't really care about this
-           export in particular; we just need one to keep the obd. */
-        class_export_get(pet_exp);
-        wake_up(&pet_waitq);
-        return 0;
-}
-
 void class_fail_export(struct obd_export *exp)
 {
         int rc, already_failed;
@@ -1029,7 +996,7 @@ void class_fail_export(struct obd_export *exp)
         spin_unlock_irqrestore(&exp->exp_lock, flags);
 
         if (already_failed) {
-                CDEBUG(D_PET, "disconnecting dead export %p/%s; skipping\n",
+                CDEBUG(D_HA, "disconnecting dead export %p/%s; skipping\n",
                        exp, exp->exp_client_uuid.uuid);
                 return;
         }
@@ -1053,6 +1020,39 @@ void class_fail_export(struct obd_export *exp)
 }
 EXPORT_SYMBOL(class_fail_export);
 
+/* Ping evictor thread */
+#define D_PET D_HA
+
+#ifdef __KERNEL__
+#define PET_READY     1
+#define PET_TERMINATE 2
+
+static int               pet_refcount = 0;
+static int               pet_state;
+static wait_queue_head_t pet_waitq;
+static struct obd_export *pet_exp = NULL;
+static spinlock_t        pet_lock = SPIN_LOCK_UNLOCKED;
+
+static int ping_evictor_wake(struct obd_export *exp)
+{
+        spin_lock(&pet_lock);
+        if (pet_exp) {
+                /* eventually the new obd will call here again. */
+                spin_unlock(&pet_lock);
+                return 1;
+        }
+        pet_exp = exp;
+        spin_unlock(&pet_lock);
+
+        /* We have to make sure the obd isn't destroyed between now and when
+           the ping evictor runs. We'll take a reference here, and drop it
+           when we finish in the evictor.  We don't really care about this
+           export in particular; we just need one to keep the obd. */
+        class_export_get(pet_exp);
+        wake_up(&pet_waitq);
+        return 0;
+}
+
 static int ping_evictor_main(void *arg)
 {
         struct list_head *pos, *n;