}
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;
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;
}
}
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;