mempool_t *mpio_pool;
struct mutex work_mutex;
+
+ unsigned suspended; /* Don't create new I/O internally when set. */
};
/*
struct multipath *m = ti->private;
mutex_lock(&m->work_mutex);
+ m->suspended = 1;
flush_multipath_work();
mutex_unlock(&m->work_mutex);
}
struct multipath *m = (struct multipath *) ti->private;
unsigned long flags;
+ mutex_lock(&m->work_mutex);
+ m->suspended = 0;
+ mutex_unlock(&m->work_mutex);
+
spin_lock_irqsave(&m->lock, flags);
m->queue_if_no_path = m->saved_queue_if_no_path;
spin_unlock_irqrestore(&m->lock, flags);
mutex_lock(&m->work_mutex);
+ if (m->suspended) {
+ r = -EBUSY;
+ goto out;
+ }
+
if (argc == 1) {
if (!strnicmp(argv[0], MESG_STR("queue_if_no_path"))) {
r = queue_if_no_path(m, 1, 0);