Compare commits
10 Commits
c23b160893
...
9074e8d8bc
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9074e8d8bc | ||
|
|
0284d68724 | ||
|
|
42ed38f080 | ||
|
|
2186b489fe | ||
|
|
d34b80b471 | ||
|
|
bde7a88707 | ||
|
|
c5e5eef3e9 | ||
|
|
5529250f18 | ||
|
|
4ff34c008d | ||
|
|
902e900ad0 |
@ -11,7 +11,7 @@ diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
|
|||||||
index 25a5f2a..dc3026a 100755
|
index 25a5f2a..dc3026a 100755
|
||||||
--- a/scripts/rescan-scsi-bus.sh
|
--- a/scripts/rescan-scsi-bus.sh
|
||||||
+++ b/scripts/rescan-scsi-bus.sh
|
+++ b/scripts/rescan-scsi-bus.sh
|
||||||
@@ -491,7 +491,7 @@ dolunscan()
|
@@ -502,7 +502,7 @@ dolunscan()
|
||||||
# Well known lun transition case. Only for Direct-Access devs (type 0)
|
# Well known lun transition case. Only for Direct-Access devs (type 0)
|
||||||
# If block directory exists && and PQUAL != 0, we unmapped lun0 and just have a well-known lun
|
# If block directory exists && and PQUAL != 0, we unmapped lun0 and just have a well-known lun
|
||||||
# If block directory doesn't exist && PQUAL == 0, we mapped a real lun0
|
# If block directory doesn't exist && PQUAL == 0, we mapped a real lun0
|
||||||
@ -20,7 +20,7 @@ index 25a5f2a..dc3026a 100755
|
|||||||
if [ $RC = 2 ] ; then
|
if [ $RC = 2 ] ; then
|
||||||
if [ -e "$devpath" ] ; then
|
if [ -e "$devpath" ] ; then
|
||||||
if [ -d "$devpath/block" ] ; then
|
if [ -d "$devpath/block" ] ; then
|
||||||
@@ -500,7 +500,7 @@ dolunscan()
|
@@ -511,7 +511,7 @@ dolunscan()
|
||||||
RC=0 # Set this so the system leaves the existing well known lun alone. This is a lun 0 with no block directory
|
RC=0 # Set this so the system leaves the existing well known lun alone. This is a lun 0 with no block directory
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -29,7 +29,7 @@ index 25a5f2a..dc3026a 100755
|
|||||||
if [ -e "$devpath" ] ; then
|
if [ -e "$devpath" ] ; then
|
||||||
if [ ! -d "$devpath/block" ] ; then
|
if [ ! -d "$devpath/block" ] ; then
|
||||||
remappedlun0=1 # Transition from well-known to real lun 0
|
remappedlun0=1 # Transition from well-known to real lun 0
|
||||||
@@ -512,7 +512,7 @@ dolunscan()
|
@@ -523,7 +523,7 @@ dolunscan()
|
||||||
|
|
||||||
# Special case: lun 0 just got added (for reportlunscan),
|
# Special case: lun 0 just got added (for reportlunscan),
|
||||||
# so make sure we correctly treat it as new
|
# so make sure we correctly treat it as new
|
||||||
@ -38,13 +38,13 @@ index 25a5f2a..dc3026a 100755
|
|||||||
SCSISTR=""
|
SCSISTR=""
|
||||||
printf "\r\e[A\e[A\e[A"
|
printf "\r\e[A\e[A\e[A"
|
||||||
fi
|
fi
|
||||||
@@ -535,7 +535,7 @@ dolunscan()
|
@@ -546,7 +546,7 @@ dolunscan()
|
||||||
sleep 0.02
|
sleep 0.02
|
||||||
else
|
else
|
||||||
echo "scsi remove-single-device $devnr" > /proc/scsi/scsi
|
echo "scsi remove-single-device $devnr" > /proc/scsi/scsi
|
||||||
- if [ $RC -eq 1 ] || [ "$lun" -eq 0 ] ; then
|
- if [ $RC -eq 1 ] || [ "$lun" -eq 0 ] ; then
|
||||||
+ if [ $RC -eq 1 ] || [ x"$lun" = x0 ] ; then
|
+ if [ $RC -eq 1 ] || [ x"$lun" = x0 ] ; then
|
||||||
# Try readding, should fail if device is gone
|
# Try reading, should fail if device is gone
|
||||||
echo "scsi add-single-device $devnr" > /proc/scsi/scsi
|
echo "scsi add-single-device $devnr" > /proc/scsi/scsi
|
||||||
fi
|
fi
|
||||||
--
|
--
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
From dd2a61c9551ac5d2ac0c5902172fd8312edc22cb Mon Sep 17 00:00:00 2001
|
|
||||||
From: yanglongkang <yanglongkang@huawei.com>
|
|
||||||
Date: Tue, 9 Feb 2021 11:39:32 +0800
|
|
||||||
Subject: [PATCH] sg3_utils: fix memset coredump
|
|
||||||
|
|
||||||
alloc MX_ALLOC_LEN size mem to enc_stat_rsp for
|
|
||||||
solving coredump problem.
|
|
||||||
|
|
||||||
Signed-off-by: yanglongkang <yanglongkang@huawei.com>
|
|
||||||
---
|
|
||||||
src/sg_ses.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/sg_ses.c b/src/sg_ses.c
|
|
||||||
index 23fc3b9..cf344b7 100644
|
|
||||||
--- a/src/sg_ses.c
|
|
||||||
+++ b/src/sg_ses.c
|
|
||||||
@@ -5582,7 +5582,7 @@ main(int argc, char * argv[])
|
|
||||||
enumerate_work(op);
|
|
||||||
goto early_out;
|
|
||||||
}
|
|
||||||
- enc_stat_rsp = sg_memalign(op->maxlen, 0, &free_enc_stat_rsp, false);
|
|
||||||
+ enc_stat_rsp = sg_memalign(MX_ALLOC_LEN, 0, &free_enc_stat_rsp, false);
|
|
||||||
if (NULL == enc_stat_rsp) {
|
|
||||||
pr2serr("Unable to get heap for enc_stat_rsp\n");
|
|
||||||
goto err_out;
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
From fc72119f67614152d635452856ec9894474599e4 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Douglas Gilbert <dgilbert@interlog.com>
|
|
||||||
Date: Mon, 3 Jan 2022 17:49:24 +0000
|
|
||||||
Subject: [PATCH] rescan-scsi-bus.sh: apply fix for '-r' from
|
|
||||||
https://github.com/doug-gilbert/sg3_utils/pull/10/ from Nitin U. Yewale,
|
|
||||||
broken by rev 867
|
|
||||||
|
|
||||||
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@929 6180dd3e-e324-4e3e-922d-17de1ae2f315
|
|
||||||
Conflict: only keep rescan-scsi-bus's changes, change of following files
|
|
||||||
are removed:
|
|
||||||
BSD_LICENSE
|
|
||||||
CREDITS
|
|
||||||
ChangeLog
|
|
||||||
debian/changelog
|
|
||||||
doc/rescan-scsi-bus.sh.8
|
|
||||||
doc/sg3_utils.8
|
|
||||||
sg3_utils.spec
|
|
||||||
|
|
||||||
---
|
|
||||||
scripts/rescan-scsi-bus.sh | 6 ++++++
|
|
||||||
1 file changed, 6 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/scripts/rescan-scsi-bus.sh b/scripts/rescan-scsi-bus.sh
|
|
||||||
index 16a7642..57fbe66 100755
|
|
||||||
--- a/scripts/rescan-scsi-bus.sh
|
|
||||||
+++ b/scripts/rescan-scsi-bus.sh
|
|
||||||
@@ -307,7 +307,13 @@ testonline ()
|
|
||||||
IPREV=$(echo "$INQ" | grep 'Product revision level:' | sed 's/^[^:]*: \(.*\)$/\1/')
|
|
||||||
STR=$(printf " Vendor: %-08s Model: %-16s Rev: %-4s" "$IVEND" "$IPROD" "$IPREV")
|
|
||||||
IPTYPE=$(echo "$INQ" | sed -n 's/.* Device_type=\([0-9]*\) .*/\1/p')
|
|
||||||
+ if [ -z "$IPTYPE" ]; then
|
|
||||||
+ IPTYPE=$(echo "$INQ" | sed -n 's/.* PDT=\([0-9]*\) .*/\1/p')
|
|
||||||
+ fi
|
|
||||||
IPQUAL=$(echo "$INQ" | sed -n 's/ *PQual=\([0-9]*\) Device.*/\1/p')
|
|
||||||
+ if [ -z "$IPQUAL" ] ; then
|
|
||||||
+ IPQUAL=$(echo "$INQ" | sed -n 's/ *PQual=\([0-9]*\) PDT.*/\1/p')
|
|
||||||
+ fi
|
|
||||||
if [ "$IPQUAL" != 0 ] ; then
|
|
||||||
[ -z "$IPQUAL" ] && IPQUAL=3
|
|
||||||
[ -z "$IPTYPE" ] && IPTYPE=31
|
|
||||||
--
|
|
||||||
2.34.1
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
sg3_utils-1.48.tar.xz
Normal file
BIN
sg3_utils-1.48.tar.xz
Normal file
Binary file not shown.
@ -1,18 +1,16 @@
|
|||||||
Name: sg3_utils
|
Name: sg3_utils
|
||||||
Version: 1.46
|
Version: 1.48
|
||||||
Release: 5
|
Release: 1
|
||||||
Summary: Utilities that send SCSI commands to devices.
|
Summary: Utilities that send SCSI commands to devices.
|
||||||
License: GPL-2.0-or-later AND BSD
|
License: GPL-2.0-or-later AND BSD
|
||||||
URL: http://sg.danny.cz/sg/sg3_utils.html
|
URL: http://sg.danny.cz/sg/sg3_utils.html
|
||||||
Source0: http://sg.danny.cz/sg/p/sg3_utils-%{version}.tar.xz
|
Source0: http://sg.danny.cz/sg/p/sg3_utils-%{version}.tar.xz
|
||||||
|
|
||||||
Patch0: 0000-sg3_utils-1.37-rescan-scsi-findremapped-enhance.patch
|
Patch0: 0000-sg3_utils-1.37-rescan-scsi-findremapped-enhance.patch
|
||||||
Patch1: 0001-sg3_utils-1.37-rescan-downpress.patch
|
Patch1: 0001-sg3_utils-1.37-rescan-downpress.patch
|
||||||
Patch2: 0002-bugfix-sg3_utils-fix-syntax-error.patch
|
Patch2: 0002-bugfix-sg3_utils-fix-syntax-error.patch
|
||||||
Patch3: 0003-sg3_utils-1.42-delete-lun-rescan-scsi-bus-report-error.patch
|
Patch3: 0003-sg3_utils-1.42-delete-lun-rescan-scsi-bus-report-error.patch
|
||||||
Patch4: 0004-sg3_utils-fix-memset-coredump.patch
|
Patch4: 0004-sg3_utils-rescan-scsi-bus-list-all-LUNs-in-one-line.patch
|
||||||
Patch5: 0005-sg3_utils-rescan-scsi-bus-list-all-LUNs-in-one-line.patch
|
|
||||||
Patch6: 0006-rescan-scsi-bus.sh-apply-fix-for-r-from-https-github.patch
|
|
||||||
|
|
||||||
Provides: %{name}-libs
|
Provides: %{name}-libs
|
||||||
Obsoletes: %{name}-libs
|
Obsoletes: %{name}-libs
|
||||||
@ -76,6 +74,21 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
|
|||||||
%{_mandir}/man8/*
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Oct 27 2023 Paul Thomas <paulthomas100199@gmail.com> - 1.48-1
|
||||||
|
- update to version 1.48
|
||||||
|
|
||||||
|
* Thu Nov 3 2022 volcanodragon <linfeilong@huawei.com> - 1.47-3
|
||||||
|
- backport speed multipath scan patches from mainline
|
||||||
|
|
||||||
|
* Fri Sep 2 2022 Wenchao Hao <haowenchao@huawei.com> - 1.47-2
|
||||||
|
- backport rescan-scsi-bus patches from mainline
|
||||||
|
|
||||||
|
* Sat Aug 13 2022 volcanodragon <linfeilong@huawei.com> - 1.47-1
|
||||||
|
- update version to 1.47
|
||||||
|
|
||||||
|
* Mon Jul 11 2022 wangxiaomeng <wangxiaomeng@kylinos.cn> - 1.46-6
|
||||||
|
- Backport patch to solve coredump problem, fix crash when 'm LEN' < 252
|
||||||
|
|
||||||
* Fri Jul 1 2022 Wenchao Hao <haowenchao@huawei.com> -1.46-5
|
* Fri Jul 1 2022 Wenchao Hao <haowenchao@huawei.com> -1.46-5
|
||||||
- Fix grammar error in rescan-scsi-bus.sh introduced by patch
|
- Fix grammar error in rescan-scsi-bus.sh introduced by patch
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user