iscsi setup fix

Original host_fs_types could only contain one iscsi slave,
This is due to the check_block_and_slaves will return once the helper function
return TRUE, so only one slave with fs type will be added to host_fs_types[]
Thus, there will no chance to setup other slaves in kdump iscsi setup routine.

Use for_each_host_dev_and_slaves_all to setup all slaves.

Tested by chaowang and myself.

Signed-off-by: Dave Young <dyoung@redhat.com>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
Dave Young 2012-08-28 11:02:42 +08:00
parent e02ec8b7e8
commit 679b4216fa

View File

@ -321,7 +321,7 @@ kdump_check_iscsi_targets () {
kdump_check_setup_iscsi() (
local _dev
_dev=$(get_maj_min $1)
_dev=$1
[[ -L /sys/dev/block/$_dev ]] || return
cd "$(readlink -f /sys/dev/block/$_dev)"
@ -332,7 +332,7 @@ kdump_check_iscsi_targets () {
)
[[ $hostonly ]] || [[ $mount_needs ]] && {
for_each_host_dev_fs kdump_check_setup_iscsi
for_each_host_dev_and_slaves_all kdump_check_setup_iscsi
}
}