diff options
author | Chandra Seetharaman <sekharan@us.ibm.com> | 2008-05-01 17:50:28 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-06-05 10:23:41 -0400 |
commit | 2651f5d7d3bc5120a439e498f131e4d731f99b3e (patch) | |
tree | dbfe481b0ce8b37aa1c02abef2dd53a276cb3529 /drivers/md/dm-mpath.c | |
parent | bab7cfc733f4453a502b7491b9ee37b091440ec4 (diff) |
[SCSI] scsi_dh: Remove dm_pg_init_complete
This patch just removes the dm layer's path initialization completion
routine. This is separated from the other patch(scsi_dh: Use SCSI
device handler in dm-multipath) Just to make that patch more readable.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Acked-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r-- | drivers/md/dm-mpath.c | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 9b16788118d2..e8f704aa46f2 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -7,7 +7,6 @@ | |||
7 | 7 | ||
8 | #include "dm.h" | 8 | #include "dm.h" |
9 | #include "dm-path-selector.h" | 9 | #include "dm-path-selector.h" |
10 | #include "dm-hw-handler.h" | ||
11 | #include "dm-bio-list.h" | 10 | #include "dm-bio-list.h" |
12 | #include "dm-bio-record.h" | 11 | #include "dm-bio-record.h" |
13 | #include "dm-uevent.h" | 12 | #include "dm-uevent.h" |
@@ -1008,44 +1007,6 @@ static int pg_init_limit_reached(struct multipath *m, struct pgpath *pgpath) | |||
1008 | return limit_reached; | 1007 | return limit_reached; |
1009 | } | 1008 | } |
1010 | 1009 | ||
1011 | /* | ||
1012 | * pg_init must call this when it has completed its initialisation | ||
1013 | */ | ||
1014 | void dm_pg_init_complete(struct dm_path *path, unsigned err_flags) | ||
1015 | { | ||
1016 | struct pgpath *pgpath = path_to_pgpath(path); | ||
1017 | struct priority_group *pg = pgpath->pg; | ||
1018 | struct multipath *m = pg->m; | ||
1019 | unsigned long flags; | ||
1020 | |||
1021 | /* | ||
1022 | * If requested, retry pg_init until maximum number of retries exceeded. | ||
1023 | * If retry not requested and PG already bypassed, always fail the path. | ||
1024 | */ | ||
1025 | if (err_flags & MP_RETRY) { | ||
1026 | if (pg_init_limit_reached(m, pgpath)) | ||
1027 | err_flags |= MP_FAIL_PATH; | ||
1028 | } else if (err_flags && pg->bypassed) | ||
1029 | err_flags |= MP_FAIL_PATH; | ||
1030 | |||
1031 | if (err_flags & MP_FAIL_PATH) | ||
1032 | fail_path(pgpath); | ||
1033 | |||
1034 | if (err_flags & MP_BYPASS_PG) | ||
1035 | bypass_pg(m, pg, 1); | ||
1036 | |||
1037 | spin_lock_irqsave(&m->lock, flags); | ||
1038 | if (err_flags & ~MP_RETRY) { | ||
1039 | m->current_pgpath = NULL; | ||
1040 | m->current_pg = NULL; | ||
1041 | } else if (!m->pg_init_required) | ||
1042 | m->queue_io = 0; | ||
1043 | |||
1044 | m->pg_init_in_progress = 0; | ||
1045 | queue_work(kmultipathd, &m->process_queued_ios); | ||
1046 | spin_unlock_irqrestore(&m->lock, flags); | ||
1047 | } | ||
1048 | |||
1049 | static void pg_init_done(struct dm_path *path, int errors) | 1010 | static void pg_init_done(struct dm_path *path, int errors) |
1050 | { | 1011 | { |
1051 | struct pgpath *pgpath = path_to_pgpath(path); | 1012 | struct pgpath *pgpath = path_to_pgpath(path); |
@@ -1497,8 +1458,6 @@ static void __exit dm_multipath_exit(void) | |||
1497 | kmem_cache_destroy(_mpio_cache); | 1458 | kmem_cache_destroy(_mpio_cache); |
1498 | } | 1459 | } |
1499 | 1460 | ||
1500 | EXPORT_SYMBOL_GPL(dm_pg_init_complete); | ||
1501 | |||
1502 | module_init(dm_multipath_init); | 1461 | module_init(dm_multipath_init); |
1503 | module_exit(dm_multipath_exit); | 1462 | module_exit(dm_multipath_exit); |
1504 | 1463 | ||