aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2017-04-27 13:11:14 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-25 09:44:33 -0400
commit042d8dbf69c6ca0d542eaf41480d9303c36c56a9 (patch)
tree5522c486562067a05abf359681f894f78a1fcc3d /drivers/md
parente08047c90c8aa2c0bb2403c30b0692c7f147f200 (diff)
dm mpath: split and rename activate_path() to prepare for its expanded use
commit 89bfce763e43fa4897e0d3af6b29ed909df64cfd upstream. 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: Bart Van Assche <bart.vanassche@sandisk.com> Cc: Hannes Reinecke <hare@suse.com> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-mpath.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index e477af8596e2..ac8235bda61b 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -119,7 +119,8 @@ static struct kmem_cache *_mpio_cache;
119 119
120static struct workqueue_struct *kmultipathd, *kmpath_handlerd; 120static struct workqueue_struct *kmultipathd, *kmpath_handlerd;
121static void trigger_event(struct work_struct *work); 121static void trigger_event(struct work_struct *work);
122static void activate_path(struct work_struct *work); 122static void activate_or_offline_path(struct pgpath *pgpath);
123static void activate_path_work(struct work_struct *work);
123static void process_queued_bios(struct work_struct *work); 124static void process_queued_bios(struct work_struct *work);
124 125
125/*----------------------------------------------- 126/*-----------------------------------------------
@@ -144,7 +145,7 @@ static struct pgpath *alloc_pgpath(void)
144 145
145 if (pgpath) { 146 if (pgpath) {
146 pgpath->is_active = true; 147 pgpath->is_active = true;
147 INIT_DELAYED_WORK(&pgpath->activate_path, activate_path); 148 INIT_DELAYED_WORK(&pgpath->activate_path, activate_path_work);
148 } 149 }
149 150
150 return pgpath; 151 return pgpath;
@@ -1515,10 +1516,8 @@ out:
1515 spin_unlock_irqrestore(&m->lock, flags); 1516 spin_unlock_irqrestore(&m->lock, flags);
1516} 1517}
1517 1518
1518static void activate_path(struct work_struct *work) 1519static void activate_or_offline_path(struct pgpath *pgpath)
1519{ 1520{
1520 struct pgpath *pgpath =
1521 container_of(work, struct pgpath, activate_path.work);
1522 struct request_queue *q = bdev_get_queue(pgpath->path.dev->bdev); 1521 struct request_queue *q = bdev_get_queue(pgpath->path.dev->bdev);
1523 1522
1524 if (pgpath->is_active && !blk_queue_dying(q)) 1523 if (pgpath->is_active && !blk_queue_dying(q))
@@ -1527,6 +1526,14 @@ static void activate_path(struct work_struct *work)
1527 pg_init_done(pgpath, SCSI_DH_DEV_OFFLINED); 1526 pg_init_done(pgpath, SCSI_DH_DEV_OFFLINED);
1528} 1527}
1529 1528
1529static void activate_path_work(struct work_struct *work)
1530{
1531 struct pgpath *pgpath =
1532 container_of(work, struct pgpath, activate_path.work);
1533
1534 activate_or_offline_path(pgpath);
1535}
1536
1530static int noretry_error(int error) 1537static int noretry_error(int error)
1531{ 1538{
1532 switch (error) { 1539 switch (error) {