Skip to content

Commit

Permalink
dm mpath: move trigger_event to system workqueue
Browse files Browse the repository at this point in the history
The same workqueue is used both for sending uevents and processing queued I/O.
Deadlock has been reported in RHEL5 when sending a uevent was blocked waiting
for the queued I/O to be processed.  Use scheduled_work() for the asynchronous
uevents instead.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Alasdair G Kergon committed Jan 6, 2009
1 parent 784aae7 commit fe9cf30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ static int fail_path(struct pgpath *pgpath)
dm_path_uevent(DM_UEVENT_PATH_FAILED, m->ti,
pgpath->path.dev->name, m->nr_valid_paths);

queue_work(kmultipathd, &m->trigger_event);
schedule_work(&m->trigger_event);
queue_work(kmultipathd, &pgpath->deactivate_path);

out:
Expand Down Expand Up @@ -932,7 +932,7 @@ static int reinstate_path(struct pgpath *pgpath)
dm_path_uevent(DM_UEVENT_PATH_REINSTATED, m->ti,
pgpath->path.dev->name, m->nr_valid_paths);

queue_work(kmultipathd, &m->trigger_event);
schedule_work(&m->trigger_event);

out:
spin_unlock_irqrestore(&m->lock, flags);
Expand Down Expand Up @@ -976,7 +976,7 @@ static void bypass_pg(struct multipath *m, struct priority_group *pg,

spin_unlock_irqrestore(&m->lock, flags);

queue_work(kmultipathd, &m->trigger_event);
schedule_work(&m->trigger_event);
}

/*
Expand Down Expand Up @@ -1006,7 +1006,7 @@ static int switch_pg_num(struct multipath *m, const char *pgstr)
}
spin_unlock_irqrestore(&m->lock, flags);

queue_work(kmultipathd, &m->trigger_event);
schedule_work(&m->trigger_event);
return 0;
}

Expand Down

0 comments on commit fe9cf30

Please sign in to comment.