Skip to content

Commit

Permalink
dm mpath: avoid storing private suspended state
Browse files Browse the repository at this point in the history
'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 <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Cc: Mike Anderson <andmike@linux.vnet.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Kiyoshi Ueda authored and Alasdair G Kergon committed Mar 6, 2010
1 parent c53a381 commit fce323d
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ struct multipath {
mempool_t *mpio_pool;

struct mutex work_mutex;

unsigned suspended; /* Don't create new I/O internally when set. */
};

/*
Expand Down Expand Up @@ -1278,7 +1276,6 @@ static void multipath_postsuspend(struct dm_target *ti)
struct multipath *m = ti->private;

mutex_lock(&m->work_mutex);
m->suspended = 1;
flush_multipath_work();
mutex_unlock(&m->work_mutex);
}
Expand All @@ -1291,10 +1288,6 @@ static void multipath_resume(struct dm_target *ti)
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);
Expand Down Expand Up @@ -1430,11 +1423,6 @@ static int multipath_message(struct dm_target *ti, unsigned argc, char **argv)

mutex_lock(&m->work_mutex);

if (m->suspended) {
r = -EBUSY;
goto out;
}

if (dm_suspended(ti)) {
r = -EBUSY;
goto out;
Expand Down

0 comments on commit fce323d

Please sign in to comment.