Commit 89bfce76 authored by Bart Van Assche's avatar Bart Van Assche Committed by Mike Snitzer

dm mpath: split and rename activate_path() to prepare for its expanded use

activate_path() is renamed to activate_path_work() which now calls
activate_or_offline_path().  activate_or_offline_path() will be used
by the next commit.
Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
Cc: Hannes Reinecke <hare@suse.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 4617f564
...@@ -111,7 +111,8 @@ typedef int (*action_fn) (struct pgpath *pgpath); ...@@ -111,7 +111,8 @@ typedef int (*action_fn) (struct pgpath *pgpath);
static struct workqueue_struct *kmultipathd, *kmpath_handlerd; static struct workqueue_struct *kmultipathd, *kmpath_handlerd;
static void trigger_event(struct work_struct *work); static void trigger_event(struct work_struct *work);
static void activate_path(struct work_struct *work); static void activate_or_offline_path(struct pgpath *pgpath);
static void activate_path_work(struct work_struct *work);
static void process_queued_bios(struct work_struct *work); static void process_queued_bios(struct work_struct *work);
/*----------------------------------------------- /*-----------------------------------------------
...@@ -136,7 +137,7 @@ static struct pgpath *alloc_pgpath(void) ...@@ -136,7 +137,7 @@ static struct pgpath *alloc_pgpath(void)
if (pgpath) { if (pgpath) {
pgpath->is_active = true; pgpath->is_active = true;
INIT_DELAYED_WORK(&pgpath->activate_path, activate_path); INIT_DELAYED_WORK(&pgpath->activate_path, activate_path_work);
} }
return pgpath; return pgpath;
...@@ -1436,10 +1437,8 @@ static void pg_init_done(void *data, int errors) ...@@ -1436,10 +1437,8 @@ static void pg_init_done(void *data, int errors)
spin_unlock_irqrestore(&m->lock, flags); spin_unlock_irqrestore(&m->lock, flags);
} }
static void activate_path(struct work_struct *work) static void activate_or_offline_path(struct pgpath *pgpath)
{ {
struct pgpath *pgpath =
container_of(work, struct pgpath, activate_path.work);
struct request_queue *q = bdev_get_queue(pgpath->path.dev->bdev); struct request_queue *q = bdev_get_queue(pgpath->path.dev->bdev);
if (pgpath->is_active && !blk_queue_dying(q)) if (pgpath->is_active && !blk_queue_dying(q))
...@@ -1448,6 +1447,14 @@ static void activate_path(struct work_struct *work) ...@@ -1448,6 +1447,14 @@ static void activate_path(struct work_struct *work)
pg_init_done(pgpath, SCSI_DH_DEV_OFFLINED); pg_init_done(pgpath, SCSI_DH_DEV_OFFLINED);
} }
static void activate_path_work(struct work_struct *work)
{
struct pgpath *pgpath =
container_of(work, struct pgpath, activate_path.work);
activate_or_offline_path(pgpath);
}
static int noretry_error(int error) static int noretry_error(int error)
{ {
switch (error) { switch (error) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment