diff options
Diffstat (limited to 'recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch')
-rw-r--r-- | recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch new file mode 100644 index 00000000..cbbc4f14 --- /dev/null +++ b/recipes-kernel/linux/linux-ti33x-psp-3.2/3.2.18/0029-dm-mpath-check-if-scsi_dh-module-already-loaded-befo.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 6cbf63344c48a119864df9c5873d0407a32d9872 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Snitzer <snitzer@redhat.com> | ||
3 | Date: Sat, 12 May 2012 01:43:21 +0100 | ||
4 | Subject: [PATCH 29/56] dm mpath: check if scsi_dh module already loaded | ||
5 | before trying to load | ||
6 | |||
7 | commit 510193a2d3d2e03ae53b95c0ae4f33cdff02cbf8 upstream. | ||
8 | |||
9 | If the requested scsi_dh module is already loaded then skip | ||
10 | request_module(). | ||
11 | |||
12 | Multipath table loads can hang in an unnecessary __request_module. | ||
13 | |||
14 | Reported-by: Ben Marzinski <bmarzins@redhat.com> | ||
15 | Signed-off-by: Mike Snitzer <snitzer@redhat.com> | ||
16 | Signed-off-by: Alasdair G Kergon <agk@redhat.com> | ||
17 | Signed-off-by: Ben Hutchings <ben@decadent.org.uk> | ||
18 | --- | ||
19 | drivers/md/dm-mpath.c | 4 ++-- | ||
20 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
21 | |||
22 | diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c | ||
23 | index 801d92d..a417f94 100644 | ||
24 | --- a/drivers/md/dm-mpath.c | ||
25 | +++ b/drivers/md/dm-mpath.c | ||
26 | @@ -698,8 +698,8 @@ static int parse_hw_handler(struct dm_arg_set *as, struct multipath *m) | ||
27 | return 0; | ||
28 | |||
29 | m->hw_handler_name = kstrdup(dm_shift_arg(as), GFP_KERNEL); | ||
30 | - request_module("scsi_dh_%s", m->hw_handler_name); | ||
31 | - if (scsi_dh_handler_exist(m->hw_handler_name) == 0) { | ||
32 | + if (!try_then_request_module(scsi_dh_handler_exist(m->hw_handler_name), | ||
33 | + "scsi_dh_%s", m->hw_handler_name)) { | ||
34 | ti->error = "unknown hardware handler type"; | ||
35 | ret = -EINVAL; | ||
36 | goto fail; | ||
37 | -- | ||
38 | 1.7.7.6 | ||
39 | |||