From fce323dd68e13354071538c765b062859e6f8286 Mon Sep 17 00:00:00 2001 From: Kiyoshi Ueda Date: Sat, 6 Mar 2010 02:29:59 +0000 Subject: [RHEL5.7 PATCH] dm mpath: avoid storing private suspended state Upstream commit fce323dd68e13354071538c765b062859e6f8286 Author: Kiyoshi Ueda Date: Sat Mar 6 02:29:59 2010 +0000 dm mpath: avoid storing private suspended state 'suspended' flag in struct multipath was introduced to check whether the multipath target is in suspended state, but the same check is done through dm_suspended() now, so remove the flag and related code. Signed-off-by: Kiyoshi Ueda Signed-off-by: Jun'ichi Nomura Cc: Mike Anderson Signed-off-by: Alasdair G Kergon --- drivers/md/dm-mpath.c | 12 ------------ 1 file changed, 12 deletions(-) Index: linux-rhel5/drivers/md/dm-mpath.c =================================================================== --- linux-rhel5.orig/drivers/md/dm-mpath.c +++ linux-rhel5/drivers/md/dm-mpath.c @@ -102,8 +102,6 @@ struct multipath { mempool_t *mpio_pool; struct mutex work_mutex; - - unsigned suspended; /* Don't create new I/O internally when set. */ }; /* @@ -1416,7 +1414,6 @@ static void multipath_postsuspend(struct struct multipath *m = ti->private; mutex_lock(&m->work_mutex); - m->suspended = 1; flush_multipath_work(m); mutex_unlock(&m->work_mutex); } @@ -1429,10 +1426,6 @@ static void multipath_resume(struct dm_t 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); @@ -1577,11 +1570,6 @@ static int multipath_message(struct dm_t mutex_lock(&m->work_mutex); - if (m->suspended) { - r = -EBUSY; - goto out; - } - if (dm_suspended(ti)) { r = -EBUSY; goto out;