You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(19) |
Nov
(18) |
Dec
(34) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(14) |
Feb
(14) |
Mar
(3) |
Apr
(10) |
May
(10) |
Jun
(17) |
Jul
(15) |
Aug
(24) |
Sep
(24) |
Oct
(11) |
Nov
(13) |
Dec
(15) |
2008 |
Jan
(10) |
Feb
(46) |
Mar
(20) |
Apr
(42) |
May
(44) |
Jun
(22) |
Jul
(59) |
Aug
(8) |
Sep
(15) |
Oct
(52) |
Nov
(30) |
Dec
(38) |
2009 |
Jan
(27) |
Feb
(27) |
Mar
(47) |
Apr
(85) |
May
(74) |
Jun
(41) |
Jul
(70) |
Aug
(64) |
Sep
(97) |
Oct
(147) |
Nov
(67) |
Dec
(48) |
2010 |
Jan
(68) |
Feb
(33) |
Mar
(53) |
Apr
(98) |
May
(55) |
Jun
(71) |
Jul
(99) |
Aug
(132) |
Sep
(291) |
Oct
(220) |
Nov
(344) |
Dec
(300) |
2011 |
Jan
(57) |
Feb
(25) |
Mar
(59) |
Apr
(104) |
May
(60) |
Jun
(155) |
Jul
(143) |
Aug
(43) |
Sep
(53) |
Oct
(20) |
Nov
(35) |
Dec
(103) |
2012 |
Jan
(62) |
Feb
(43) |
Mar
(29) |
Apr
(80) |
May
(75) |
Jun
(61) |
Jul
(52) |
Aug
(58) |
Sep
(33) |
Oct
(32) |
Nov
(69) |
Dec
(37) |
2013 |
Jan
(77) |
Feb
(28) |
Mar
(52) |
Apr
(18) |
May
(37) |
Jun
(21) |
Jul
(22) |
Aug
(55) |
Sep
(29) |
Oct
(74) |
Nov
(50) |
Dec
(44) |
2014 |
Jan
(77) |
Feb
(62) |
Mar
(81) |
Apr
(99) |
May
(59) |
Jun
(95) |
Jul
(55) |
Aug
(34) |
Sep
(78) |
Oct
(33) |
Nov
(48) |
Dec
(51) |
2015 |
Jan
(56) |
Feb
(120) |
Mar
(37) |
Apr
(15) |
May
(22) |
Jun
(196) |
Jul
(54) |
Aug
(33) |
Sep
(32) |
Oct
(42) |
Nov
(149) |
Dec
(61) |
2016 |
Jan
(15) |
Feb
(26) |
Mar
(37) |
Apr
(27) |
May
(14) |
Jun
(11) |
Jul
(13) |
Aug
(64) |
Sep
(2) |
Oct
(36) |
Nov
(18) |
Dec
(46) |
2017 |
Jan
(6) |
Feb
(1) |
Mar
(2) |
Apr
(50) |
May
(42) |
Jun
(11) |
Jul
(4) |
Aug
(12) |
Sep
(11) |
Oct
(21) |
Nov
(15) |
Dec
(42) |
2018 |
Jan
(33) |
Feb
(27) |
Mar
(20) |
Apr
(5) |
May
(4) |
Jun
(1) |
Jul
(42) |
Aug
(29) |
Sep
(11) |
Oct
(40) |
Nov
(312) |
Dec
(18) |
2019 |
Jan
(44) |
Feb
(98) |
Mar
(125) |
Apr
(160) |
May
(123) |
Jun
(33) |
Jul
(56) |
Aug
(81) |
Sep
(24) |
Oct
(23) |
Nov
(52) |
Dec
(86) |
2020 |
Jan
(6) |
Feb
(17) |
Mar
(62) |
Apr
(21) |
May
(118) |
Jun
(42) |
Jul
(52) |
Aug
(62) |
Sep
(20) |
Oct
(5) |
Nov
(23) |
Dec
(111) |
2021 |
Jan
(31) |
Feb
(8) |
Mar
(26) |
Apr
(13) |
May
(54) |
Jun
(31) |
Jul
(17) |
Aug
(10) |
Sep
(83) |
Oct
(8) |
Nov
(21) |
Dec
(33) |
2022 |
Jan
(67) |
Feb
(11) |
Mar
(4) |
Apr
(46) |
May
(12) |
Jun
(17) |
Jul
(19) |
Aug
(7) |
Sep
(53) |
Oct
(14) |
Nov
(29) |
Dec
(22) |
2023 |
Jan
(20) |
Feb
(4) |
Mar
(37) |
Apr
(25) |
May
(15) |
Jun
(20) |
Jul
(38) |
Aug
(1) |
Sep
(1) |
Oct
(34) |
Nov
|
Dec
(8) |
2024 |
Jan
(15) |
Feb
(10) |
Mar
|
Apr
(4) |
May
(23) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
(18) |
Oct
(1) |
Nov
(18) |
Dec
(15) |
2025 |
Jan
(5) |
Feb
(1) |
Mar
(7) |
Apr
(4) |
May
(18) |
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Gleb C. <lna...@ya...> - 2024-05-02 14:20:43
|
Commit: d3a2fae GitHub URL: https://github.com/SCST-project/scst/commit/d3a2faecffb46170857ab8b506aa12d562416ecb Author: Gleb Chesnokov Date: 2024-05-02T17:20:01+03:00 Log Message: ----------- scripts/run-regression-tests: Explicitly set KBUILD_MODPOST_WARN=1 This fixes the run-regression-tests build against kernel versions >= v6.3. See also commit 5573b4daa26a ("kbuild: do not automatically add -w option to modpost") # v6.3. Modified Paths: -------------- scripts/run-regression-tests | 18 +++++++-------- 1 file changed, 9 insertions(+), 9 deletions(-) =================================================================== diff --git a/scripts/run-regression-tests b/scripts/run-regression-tests index d5f65d8..764e9d7 100755 --- a/scripts/run-regression-tests +++ b/scripts/run-regression-tests @@ -387,7 +387,7 @@ function compile_kernel { if (cd "${outputdir}/linux-$k" \ && make -s modules_prepare \ && make -s scripts \ - && for subdir; do LC_ALL=C make -j$(nproc) -k M="${subdir}"; done + && for subdir; do LC_ALL=C KBUILD_MODPOST_WARN=1 make -j$(nproc) -k M="${subdir}"; done ) &> "${outputfile}" then local errors warnings @@ -417,9 +417,9 @@ function run_sparse { if (cd "${outputdir}/linux-$k" \ && make -s modules_prepare \ && make -s scripts \ - && if grep -q '^CONFIG_PPC=y$' .config; then LC_ALL=C make -k M=arch/powerpc/lib; fi \ + && if grep -q '^CONFIG_PPC=y$' .config; then LC_ALL=C KBUILD_MODPOST_WARN=1 make -k M=arch/powerpc/lib; fi \ && for subdir; do - LC_ALL=C make -k C=2 CF="-D__CHECK_ENDIAN__ -DCONFIG_SPARSE_RCU_POINTER" M="${subdir}" + LC_ALL=C KBUILD_MODPOST_WARN=1 make -k C=2 CF="-D__CHECK_ENDIAN__ -DCONFIG_SPARSE_RCU_POINTER" M="${subdir}" done ) &> "${outputfile}" then @@ -458,9 +458,9 @@ function run_smatch { make -s oldconfig </dev/null && make -s modules_prepare && make -s scripts && - if grep -q '^CONFIG_PPC=y$' .config; then LC_ALL=C make -k M=arch/powerpc/lib; fi && + if grep -q '^CONFIG_PPC=y$' .config; then LC_ALL=C KBUILD_MODPOST_WARN=1 make -k M=arch/powerpc/lib; fi && for subdir; do - LC_ALL=C make -k CHECK="smatch -p=kernel" C=2 CF=-D__CHECK_ENDIAN__ M="${subdir}" + LC_ALL=C KBUILD_MODPOST_WARN=1 make -k CHECK="smatch -p=kernel" C=2 CF=-D__CHECK_ENDIAN__ M="${subdir}" done ) &> "${outputfile}" then @@ -490,7 +490,7 @@ function run_checkstack { cd "${outputdir}/linux-$1" \ && make -s modules_prepare \ && make -s scripts \ - && LC_ALL=C make -k checkstack + && LC_ALL=C KBUILD_MODPOST_WARN=1 make -k checkstack ) &> "${outputfile}" echo "See also ${outputfile}." return 0 @@ -507,7 +507,7 @@ function run_namespacecheck { cd "${outputdir}/linux-$1" \ && make -s modules_prepare \ && make -s scripts \ - && LC_ALL=C make -k namespacecheck + && LC_ALL=C KBUILD_MODPOST_WARN=1 make -k namespacecheck ) &> "${outputfile}" echo "See also ${outputfile}." return 0 @@ -524,7 +524,7 @@ function run_headers_check { cd "${outputdir}/linux-$1" \ && make -s modules_prepare \ && make -s scripts \ - && LC_ALL=C make -k headers_check + && LC_ALL=C KBUILD_MODPOST_WARN=1 make -k headers_check ) &> "${outputfile}" local errors errors=$(grep -c '^[^ ]' "${outputfile}") @@ -544,7 +544,7 @@ function run_make_htmldocs { cd "${outputdir}/linux-$1" \ && make -s modules_prepare \ && make -s scripts \ - && LC_ALL=C make -k htmldocs + && LC_ALL=C KBUILD_MODPOST_WARN=1 make -k htmldocs ) &> "${outputfile}" echo "See also ${outputfile}." return 0 |
From: Gleb C. <lna...@ya...> - 2024-05-02 14:20:33
|
Commit: 56bb6c0 GitHub URL: https://github.com/SCST-project/scst/commit/56bb6c0fa6726befb8057f28af04af7c81d5bd8b Author: Gleb Chesnokov Date: 2024-05-02T17:20:01+03:00 Log Message: ----------- nightly build, scripts: Remove svn support Remove deprecated svn support. Modified Paths: -------------- nightly/bin/nightly | 23 ++++----------- scripts/clean-source-tree | 11 +------ scripts/list-non-source-files | 6 +--- scripts/list-source-files | 17 ++--------- 4 files changed, 10 insertions(+), 47 deletions(-) =================================================================== diff --git a/nightly/bin/nightly b/nightly/bin/nightly index 9173eea..9034d0b 100755 --- a/nightly/bin/nightly +++ b/nightly/bin/nightly @@ -12,11 +12,7 @@ # Returns the revision number of the source files with date $1. get_revision() { - if svn info . >/dev/null 2>&1; then - svn info -r "{$1}" "${scst_repo}" | sed -n 's/^Revision: //p' - else - git log --before="$1" | head -n 1 | cut -f2 -d ' ' - fi + git log --before="$1" | head -n 1 | cut -f2 -d ' ' } runcmd () { @@ -54,11 +50,7 @@ usage () { #---------------------------------------------------------------------------- scst_rootdir="$(dirname "$(dirname "$(cd "$(dirname "$0")" && echo "$PWD")")")" -if svn info . >/dev/null 2>&1; then - scst_repo="$(svn info "$scst_rootdir" | sed -n -e 's|\+ssh://[^@]*@|://|' -e 's/^URL: //p')" -else - scst_repo="$scst_rootdir" -fi +scst_repo="$scst_rootdir" sendmail_opts="" run_if_unchanged="false" @@ -151,13 +143,10 @@ for logfile in old new ; do # Check out and run the tests. runcmd ${logfile} \ "Checking out SCST source tree" \ - "if svn info . >/dev/null 2>&1; then \ - svn co -q -r {${date}} ${scst_repo} ${ABT_TMPDIR}/scst; \ - else \ - ( rmdir ${ABT_TMPDIR}/scst && \ - git clone -q ${scst_repo} ${ABT_TMPDIR}/scst && \ - cd ${ABT_TMPDIR}/scst && git reset --hard ${rev} ); \ - fi" && + "( rmdir ${ABT_TMPDIR}/scst && \ + git clone -q ${scst_repo} ${ABT_TMPDIR}/scst && \ + cd ${ABT_TMPDIR}/scst && git reset --hard ${rev} ); \ + " && runcmd ${logfile} \ "Running regression tests" \ "cd ${ABT_TMPDIR}/scst && \ diff --git a/scripts/clean-source-tree b/scripts/clean-source-tree index a41d41e..a141dbf 100755 --- a/scripts/clean-source-tree +++ b/scripts/clean-source-tree @@ -48,16 +48,7 @@ done for d in "${@-.}"; do ( if cd "$d"; then - if [ -e .svn ]; then - if ! type -p svn >&/dev/null; then - echo "$0: svn: not found." - exit 0 - fi - "$(dirname "$0")"/list-non-source-files | - while read -r f; do - if ! word_in_list "$f" "${exclude[@]}"; then rm -rf -- "$f"; fi; - done - elif [ -e .git ] || [ -e ../.git ]; then + if [ -e .git ] || [ -e ../.git ]; then if ! type -p git >&/dev/null; then echo "$0: git: not found." exit 0 diff --git a/scripts/list-non-source-files b/scripts/list-non-source-files index 7b3a314..d656886 100755 --- a/scripts/list-non-source-files +++ b/scripts/list-non-source-files @@ -18,11 +18,7 @@ prefix_matches() { for d in "${@-.}"; do ( cd "$d" && - if [ -e .svn ]; then - svn status --no-ignore | - grep '^[I?] ' | - cut -c8- - elif git branch >&/dev/null; then + if git branch >&/dev/null; then exec 3< <(find . -type f | cut -c3- | grep -v '^\.git/' | sort) git ls-tree -r HEAD | cut -f2 -d' ' | sort | while read -r f; do diff --git a/scripts/list-source-files b/scripts/list-source-files index 56e3f1c..139fa1e 100755 --- a/scripts/list-source-files +++ b/scripts/list-source-files @@ -5,25 +5,12 @@ list_source_files() { d="$(cd "$1" && echo "$PWD")" r="$d" - while [ "$r" != "/" ] && [ ! -e "$r/.svn" ] && [ ! -e "$r/.git" ] && + while [ "$r" != "/" ] && [ ! -e "$r/.git" ] && [ ! -e "$r/.hg" ]; do r="$(dirname "$r")" done - if [ -e "$r/.svn" ]; then - ( - cd "$d" || exit $? - svn status -v | \ - grep -vE '^[D?]|^Performing|^$' | \ - cut -c3- | \ - while read -r a b c f; do - if [ -f "$f" ] || [ -h "$f" ]; then - echo "$a $b $c" >/dev/null - echo "$f" - fi - done - ) - elif [ -e "$r/.git" ]; then + if [ -e "$r/.git" ]; then subdir="${d#"${r}"}" if [ "$r" != "" ]; then ( cd "$d" && git ls-tree --name-only -r HEAD ) | sed "s|^$subdir/||" |
From: Gleb C. <lna...@ya...> - 2024-04-26 15:25:45
|
Commit: f4840e9 GitHub URL: https://github.com/SCST-project/scst/commit/f4840e9579d6df263444fb7561eaf6ae18c6784d Author: Gleb Chesnokov Date: 2024-04-26T18:25:15+03:00 Log Message: ----------- nightly build: Update kernel versions Another kernel versions update. Modified Paths: -------------- nightly/conf/nightly.conf | 29 ++++++++------- 1 file changed, 15 insertions(+), 14 deletions(-) =================================================================== diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index 943c41e..841cf72 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -3,36 +3,37 @@ ABT_DETAILS="x86_64" ABT_JOBS=5 ABT_KERNELS=" \ -6.7 \ -6.6.11-nc \ +6.8.7 \ +6.7.12-nc \ +6.6.28-nc \ 6.5.13-nc \ 6.4.16-nc \ 6.3.13-nc \ 6.2.16-nc \ -6.1.72-nc \ +6.1.87-nc \ 6.0.19-nc \ 5.19.17-nc \ 5.18.19-nc \ 5.17.15-nc \ 5.16.20-nc \ -5.15.146-nc \ +5.15.156-nc \ 5.14.21-nc \ 5.13.19-nc \ 5.12.19-nc \ 5.11.22-nc \ -5.10.206-nc \ +5.10.215-nc \ 5.9.16-nc \ 5.8.18-nc \ 5.7.19-nc \ 5.6.19-nc \ 5.5.19-nc \ -5.4.266-nc \ +5.4.274-nc \ 5.3.18-nc \ 5.2.21-nc \ 5.1.21-nc \ 5.0.21-nc \ 4.20.17-nc \ -4.19.304-nc \ +4.19.312-nc \ 4.18.20-nc \ 4.17.19-nc \ 4.16.18-nc \ @@ -62,11 +63,11 @@ ABT_KERNELS=" \ 3.12.74-nc \ 3.11.10-nc \ 3.10.108-nc \ -5.14.0-362.13.1.el9_3^AlmaLinux^9.3-nc \ +5.14.0-362.24.1.el9_3^AlmaLinux^9.3-nc \ 5.14.0-284.30.1.el9_2^AlmaLinux^9.2-nc \ 5.14.0-162.23.1.el9_1^AlmaLinux^9.1-nc \ 5.14.0-70.30.1.el9_0^AlmaLinux^9.0-nc \ -4.18.0-513.5.1.el8_9^AlmaLinux^8.9-nc \ +4.18.0-513.24.1.el8_9^AlmaLinux^8.9-nc \ 4.18.0-477.13.1.el8_8^AlmaLinux^8.8-nc \ 4.18.0-425.19.2.el8_7^AlmaLinux^8.7-nc \ 4.18.0-372.32.1.el8_6^AlmaLinux^8.6-nc \ @@ -76,18 +77,18 @@ ABT_KERNELS=" \ 4.18.0-193.28.1.el8_2^CentOS^8.2.2004-nc \ 4.18.0-147.8.1.el8_1^CentOS^8.1.1911-nc \ 4.18.0-80.11.2.el8_0^CentOS^8.0.1905-nc \ -3.10.0-1160.105.1.el7^CentOS^7.9.2009-nc \ +3.10.0-1160.108.1.el7^CentOS^7.9.2009-nc \ 3.10.0-1127.19.1.el7^CentOS^7.8.2003-nc \ 3.10.0-1062.18.1.el7^CentOS^7.7.1908-nc \ 3.10.0-957.27.2.el7^CentOS^7.6.1810-nc \ 3.10.0-862.14.4.el7^CentOS^7.5.1804-nc \ -5.15.0-201.135.6.el9uek^UEK^9-nc \ -5.15.0-201.135.6.el8uek^UEK^8-nc \ -5.4.17-2136.326.6.el8uek^UEK^8-nc \ +5.15.0-205.149.5.1.el9uek^UEK^9-nc \ +5.15.0-205.149.5.1.el8uek^UEK^8-nc \ +5.4.17-2136.330.7.1.el8uek^UEK^8-nc \ 5.4.17-2102.206.1.el8uek^UEK^8-nc \ 5.4.17-2036.104.5.el8uek^UEK^8-nc \ 5.4.17-2011.7.4.el8uek^UEK^8-nc \ -5.4.17-2136.326.6.el7uek^UEK^7-nc \ +5.4.17-2136.330.7.1.el7uek^UEK^7-nc \ 5.4.17-2102.206.1.el7uek^UEK^7-nc \ 5.4.17-2036.104.5.el7uek^UEK^7-nc \ 5.4.17-2011.7.4.el7uek^UEK^7-nc \ |
From: Gleb C. <lna...@ya...> - 2024-04-26 06:39:00
|
Commit: 6a21f45 GitHub URL: https://github.com/SCST-project/scst/commit/6a21f456f78ae4d69736e89d2839949e9c5e7e7b Author: Brian Meagher Date: 2024-04-26T09:38:36+03:00 Log Message: ----------- iscsi-scst: Add mechanism to restore target parameter to default Writing the string :default: to the /sys entry will restore local_def Modified Paths: -------------- iscsi-scst/usr/param.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) =================================================================== diff --git a/iscsi-scst/usr/param.c b/iscsi-scst/usr/param.c index acdcd24..0d3ef2a 100644 --- a/iscsi-scst/usr/param.c +++ b/iscsi-scst/usr/param.c @@ -279,7 +279,10 @@ int params_val_to_str(const struct iscsi_key *keys, int idx, unsigned int val, int params_str_to_val(const struct iscsi_key *keys, int idx, const char *str, unsigned int *val) { - if (keys[idx].ops->str_to_val) + if (!strcmp(":default:", str)) { + *val = keys[idx].local_def; + return 0; + } else if (keys[idx].ops->str_to_val) return keys[idx].ops->str_to_val(str, val); else return 0; |
From: Gleb C. <lna...@ya...> - 2024-04-25 13:10:56
|
Commit: 12f9b6e GitHub URL: https://github.com/SCST-project/scst/commit/12f9b6e681049a10203080dcc437a34153c590dd Author: Gleb Chesnokov Date: 2024-04-25T16:10:21+03:00 Log Message: ----------- scst_lib, scst_vdisk: Port to Linux kernel v6.9 Support for the following block layer changes in the Linux kernel v6.9: - f3a608827d1f ("bdev: open block device as files") - b1211a25c4fe ("bdev: make bdev_{release, open_by_dev}() private to block layer") Modified Paths: -------------- .gitignore | 1 + scst/include/scst.h | 10 ++ scst/src/dev_handlers/scst_vdisk.c | 98 +++++++-------- scst/src/scst_lib.c | 62 ++++++++- 4 files changed, 113 insertions(+), 58 deletions(-) =================================================================== diff --git a/.gitignore b/.gitignore index bcb84e6..9565728 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ *.orig *.sdtinfo.c *.sdtstub.S +*.out *~ .cache.mk .cache/ diff --git a/scst/include/scst.h b/scst/include/scst.h index 2e5aa57..301d106 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -5675,6 +5675,16 @@ int scst_scsi_exec_async(struct scst_cmd *cmd, void *data, int scst_get_file_mode(const char *path); bool scst_parent_dir_exists(const char *path); +struct scst_bdev_descriptor { + struct block_device *bdev; + void *priv; +}; + +int scst_open_bdev_by_path(const char *path, blk_mode_t mode, void *holder, + const struct blk_holder_ops *hops, + struct scst_bdev_descriptor *bdev_desc); +void scst_release_bdev(struct scst_bdev_descriptor *bdev_desc); + struct scst_data_descriptor { uint64_t sdd_lba; uint64_t sdd_blocks; diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index d8265cf..4f65d1a 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -190,7 +190,7 @@ struct scst_vdisk_dev { struct file *fd; struct file *dif_fd; - struct bdev_handle *bdev_handle; + struct scst_bdev_descriptor bdev_desc; struct bio_set *vdisk_bioset; #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0) struct bio_set vdisk_bioset_struct; @@ -494,7 +494,8 @@ out: static void vdisk_blockio_check_flush_support(struct scst_vdisk_dev *virt_dev) { - struct bdev_handle *bdev_handle; + struct scst_bdev_descriptor bdev_desc; + int rc; TRACE_ENTRY(); @@ -502,26 +503,26 @@ static void vdisk_blockio_check_flush_support(struct scst_vdisk_dev *virt_dev) virt_dev->wt_flag || !virt_dev->dev_active) goto out; - bdev_handle = bdev_open_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL); - if (IS_ERR(bdev_handle)) { - if (PTR_ERR(bdev_handle) == -EMEDIUMTYPE) + rc = scst_open_bdev_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL, &bdev_desc); + if (rc) { + if (rc == -EMEDIUMTYPE) TRACE(TRACE_MINOR, "Unable to open %s with EMEDIUMTYPE, DRBD passive?", virt_dev->filename); else - PRINT_ERROR("bdev_open_by_path(%s) failed: %ld", - virt_dev->filename, PTR_ERR(bdev_handle)); + PRINT_ERROR("bdev_open_by_path(%s) failed: %d", + virt_dev->filename, rc); goto out; } - if (vdisk_blockio_flush(bdev_handle->bdev, GFP_KERNEL, false, NULL, false) != 0) { + if (vdisk_blockio_flush(bdev_desc.bdev, GFP_KERNEL, false, NULL, false) != 0) { PRINT_WARNING( "Device %s doesn't support barriers, switching to NV_CACHE mode. Read README for more details.", virt_dev->filename); virt_dev->nv_cache = 1; } - bdev_release(bdev_handle); + scst_release_bdev(&bdev_desc); out: TRACE_EXIT(); @@ -536,7 +537,7 @@ static bool vdisk_supports_active(const struct scst_vdisk_dev *virt_dev) static void vdisk_check_tp_support(struct scst_vdisk_dev *virt_dev) { - struct bdev_handle *bdev_handle = NULL; + struct scst_bdev_descriptor bdev_desc; struct file *fd = NULL; bool fd_open = false; int res; @@ -549,8 +550,8 @@ static void vdisk_check_tp_support(struct scst_vdisk_dev *virt_dev) goto check; if (virt_dev->blockio) { - bdev_handle = bdev_open_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL); - res = PTR_ERR_OR_ZERO(bdev_handle); + res = scst_open_bdev_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL, + &bdev_desc); } else { fd = filp_open(virt_dev->filename, O_LARGEFILE, 0600); res = PTR_ERR_OR_ZERO(fd); @@ -573,10 +574,10 @@ static void vdisk_check_tp_support(struct scst_vdisk_dev *virt_dev) (!defined(RHEL_RELEASE_CODE) || \ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 1)) virt_dev->dev_thin_provisioned = - blk_queue_discard(bdev_get_queue(bdev_handle->bdev)); + blk_queue_discard(bdev_get_queue(bdev_desc.bdev)); #else virt_dev->dev_thin_provisioned = - !!bdev_max_discard_sectors(bdev_handle->bdev); + !!bdev_max_discard_sectors(bdev_desc.bdev); #endif } else { virt_dev->dev_thin_provisioned = (fd->f_op->fallocate != NULL); @@ -613,7 +614,7 @@ check: struct request_queue *q; sBUG_ON(!fd_open); - q = bdev_get_queue(bdev_handle->bdev); + q = bdev_get_queue(bdev_desc.bdev); virt_dev->unmap_opt_gran = q->limits.discard_granularity >> block_shift; virt_dev->unmap_align = q->limits.discard_alignment >> block_shift; if (virt_dev->unmap_opt_gran == virt_dev->unmap_align) @@ -645,7 +646,7 @@ check: if (fd_open) { if (virt_dev->blockio) - bdev_release(bdev_handle); + scst_release_bdev(&bdev_desc); else filp_close(fd, NULL); } @@ -962,21 +963,19 @@ out: #if defined(CONFIG_BLK_DEV_INTEGRITY) static int vdisk_init_block_integrity(struct scst_vdisk_dev *virt_dev) { - int res; struct scst_device *dev = virt_dev->dev; - struct bdev_handle *bdev_handle; + struct scst_bdev_descriptor bdev_desc; struct blk_integrity *bi; const char *bi_profile_name; + int res; TRACE_ENTRY(); - bdev_handle = bdev_open_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL); - if (IS_ERR(bdev_handle)) { - res = PTR_ERR(bdev_handle); + res = scst_open_bdev_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL, &bdev_desc); + if (res) goto out; - } - bi = bdev_get_integrity(bdev_handle->bdev); + bi = bdev_get_integrity(bdev_desc.bdev); if (bi == NULL) { TRACE_DBG("Block integrity not supported"); goto out_no_bi; @@ -1048,7 +1047,7 @@ out_no_bi: res = 0; out_close: - bdev_release(bdev_handle); + scst_release_bdev(&bdev_desc); out: TRACE_EXIT_RES(res); @@ -1297,7 +1296,7 @@ static void vdisk_detach(struct scst_device *dev) static bool vdisk_is_open(const struct scst_vdisk_dev *virt_dev) { - return virt_dev->fd || virt_dev->bdev_handle; + return virt_dev->fd || virt_dev->bdev_desc.bdev; } static int vdisk_open_fd(struct scst_vdisk_dev *virt_dev, bool read_only) @@ -1317,16 +1316,14 @@ static int vdisk_open_fd(struct scst_vdisk_dev *virt_dev, bool read_only) if (!read_only) bdev_mode |= BLK_OPEN_WRITE; - virt_dev->bdev_handle = bdev_open_by_path(virt_dev->filename, bdev_mode, virt_dev, - NULL); - res = PTR_ERR_OR_ZERO(virt_dev->bdev_handle); + res = scst_open_bdev_by_path(virt_dev->filename, bdev_mode, virt_dev, NULL, + &virt_dev->bdev_desc); } else { - virt_dev->fd = vdev_open_fd(virt_dev, virt_dev->filename, - read_only); + virt_dev->fd = vdev_open_fd(virt_dev, virt_dev->filename, read_only); res = PTR_ERR_OR_ZERO(virt_dev->fd); } if (res) { - virt_dev->bdev_handle = NULL; + scst_release_bdev(&virt_dev->bdev_desc); virt_dev->fd = NULL; goto out; } @@ -1336,7 +1333,7 @@ static int vdisk_open_fd(struct scst_vdisk_dev *virt_dev, bool read_only) * characteristics. */ if (virt_dev->blockio && !virt_dev->opt_trans_len_set) - virt_dev->opt_trans_len = bdev_io_opt(virt_dev->bdev_handle->bdev) ? : + virt_dev->opt_trans_len = bdev_io_opt(virt_dev->bdev_desc.bdev) ? : virt_dev->opt_trans_len; if (virt_dev->dif_filename != NULL) { @@ -1350,15 +1347,14 @@ static int vdisk_open_fd(struct scst_vdisk_dev *virt_dev, bool read_only) } TRACE_DBG("virt_dev %s: fd %p %p open (dif_fd %p)", virt_dev->name, - virt_dev->fd, virt_dev->bdev_handle, virt_dev->dif_fd); + virt_dev->fd, virt_dev->bdev_desc.bdev, virt_dev->dif_fd); out: return res; out_close_fd: if (virt_dev->blockio) { - bdev_release(virt_dev->bdev_handle); - virt_dev->bdev_handle = NULL; + scst_release_bdev(&virt_dev->bdev_desc); } else { filp_close(virt_dev->fd, NULL); virt_dev->fd = NULL; @@ -1369,11 +1365,10 @@ out_close_fd: static void vdisk_close_fd(struct scst_vdisk_dev *virt_dev) { TRACE_DBG("virt_dev %s: closing fd %p %p (dif_fd %p)", virt_dev->name, - virt_dev->fd, virt_dev->bdev_handle, virt_dev->dif_fd); + virt_dev->fd, virt_dev->bdev_desc.bdev, virt_dev->dif_fd); - if (virt_dev->bdev_handle) { - bdev_release(virt_dev->bdev_handle); - virt_dev->bdev_handle = NULL; + if (virt_dev->bdev_desc.bdev) { + scst_release_bdev(&virt_dev->bdev_desc); } else if (virt_dev->fd) { filp_close(virt_dev->fd, NULL); virt_dev->fd = NULL; @@ -1459,7 +1454,7 @@ static int vdisk_attach_tgt(struct scst_tgt_dev *tgt_dev) } } else { virt_dev->fd = NULL; - virt_dev->bdev_handle = NULL; + scst_release_bdev(&virt_dev->bdev_desc); virt_dev->dif_fd = NULL; } @@ -1545,8 +1540,7 @@ static int vdisk_fsync_blockio(loff_t loff, goto out; } - res = vdisk_blockio_flush(virt_dev->bdev_handle->bdev, gfp_flags, true, - cmd, async); + res = vdisk_blockio_flush(virt_dev->bdev_desc.bdev, gfp_flags, true, cmd, async); out: TRACE_EXIT_RES(res); @@ -1857,7 +1851,7 @@ static int vdisk_unmap_range(struct scst_cmd *cmd, (unsigned long long)start_lba, blocks); if (virt_dev->blockio) { - struct block_device *bdev = virt_dev->bdev_handle->bdev; + struct block_device *bdev = virt_dev->bdev_desc.bdev; sector_t start_sector = start_lba << (cmd->dev->block_shift - 9); sector_t nr_sects = blocks << (cmd->dev->block_shift - 9); gfp_t gfp = cmd->cmd_gfp_mask; @@ -2871,7 +2865,7 @@ static ssize_t blockio_read_sync(struct scst_vdisk_dev *virt_dev, void *buf, struct bio_priv_sync s = { COMPLETION_INITIALIZER_ONSTACK(s.c), 0, }; - struct block_device *bdev = virt_dev->bdev_handle->bdev; + struct block_device *bdev = virt_dev->bdev_desc.bdev; const bool is_vmalloc = is_vmalloc_addr(buf); struct bio *bio; void *p; @@ -3407,7 +3401,7 @@ static enum scst_exec_res blockio_exec(struct scst_cmd *cmd) if (unlikely(!vdisk_parse_offset(&p, cmd))) goto err; - if (unlikely(virt_dev->bdev_handle == NULL)) { + if (unlikely(virt_dev->bdev_desc.bdev == NULL)) { if (!vdisk_no_fd_allowed_commands(cmd)) { /* * We should not get here, unless the user space @@ -4996,8 +4990,8 @@ static enum compl_status_e vdisk_exec_read_capacity16(struct vdisk_cmd_params *p /* LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT */ if (virt_dev->lb_per_pb_exp) { - struct request_queue *q = virt_dev->bdev_handle ? - bdev_get_queue(virt_dev->bdev_handle->bdev) : NULL; + struct request_queue *q = virt_dev->bdev_desc.bdev ? + bdev_get_queue(virt_dev->bdev_desc.bdev) : NULL; uint32_t physical_blocksize = q ? queue_physical_block_size(q) : 4096; buffer[13] = max(ilog2(physical_blocksize) - ilog2(blocksize), 0); } @@ -5926,7 +5920,7 @@ static void blockio_exec_rw(struct vdisk_cmd_params *p, bool write, bool fua) struct scst_device *dev = cmd->dev; struct scst_vdisk_dev *virt_dev = dev->dh_priv; int block_shift = dev->block_shift; - struct block_device *bdev = virt_dev->bdev_handle->bdev; + struct block_device *bdev = virt_dev->bdev_desc.bdev; struct bio_set *bs = virt_dev->vdisk_bioset; struct request_queue *q = bdev_get_queue(bdev); int length, max_nr_vecs = 0, offset; @@ -6597,7 +6591,7 @@ static int vdisk_resync_size(struct scst_vdisk_dev *virt_dev) sBUG_ON(virt_dev->nullio); sBUG_ON(!virt_dev->filename); - if ((!virt_dev->fd && !virt_dev->bdev_handle) || !virt_dev->dev_active) { + if ((!virt_dev->fd && !virt_dev->bdev_desc.bdev) || !virt_dev->dev_active) { res = -EMEDIUMTYPE; goto out; } @@ -7645,7 +7639,7 @@ static int vcdrom_change(struct scst_vdisk_dev *virt_dev, char *buffer) err = 0; virt_dev->filename = NULL; virt_dev->fd = NULL; - virt_dev->bdev_handle = NULL; + scst_release_bdev(&virt_dev->bdev_desc); } virt_dev->file_size = err; @@ -7705,8 +7699,8 @@ static ssize_t vdisk_sysfs_sync_store(struct kobject *kobj, if (virt_dev->nullio) res = 0; else if (virt_dev->blockio) - res = vdisk_blockio_flush(virt_dev->bdev_handle->bdev, GFP_KERNEL, false, - NULL, false); + res = vdisk_blockio_flush(virt_dev->bdev_desc.bdev, GFP_KERNEL, false, NULL, + false); else res = __vdisk_fsync_fileio(0, i_size_read(file_inode(virt_dev->fd)), dev, NULL, virt_dev->fd); diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index c514795..bbb4c61 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5937,6 +5937,53 @@ static void scst_complete_request_sense(struct scst_cmd *req_cmd) return; } +int scst_open_bdev_by_path(const char *path, blk_mode_t mode, void *holder, + const struct blk_holder_ops *hops, + struct scst_bdev_descriptor *bdev_desc) +{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0) + struct bdev_handle *bdev_handle; + + bdev_handle = bdev_open_by_path(path, mode, holder, hops); + if (IS_ERR(bdev_handle)) + return PTR_ERR(bdev_handle); + + bdev_desc->bdev = bdev_handle->bdev; + bdev_desc->priv = bdev_handle; +#else + struct file *bdev_file; + + bdev_file = bdev_file_open_by_path(path, mode, holder, hops); + if (IS_ERR(bdev_file)) + return PTR_ERR(bdev_file); + + bdev_desc->bdev = file_bdev(bdev_file); + bdev_desc->priv = bdev_file; +#endif + + return 0; +} +EXPORT_SYMBOL(scst_open_bdev_by_path); + +void scst_release_bdev(struct scst_bdev_descriptor *bdev_desc) +{ +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 9, 0) + struct bdev_handle *bdev_handle = bdev_desc->priv; + + if (bdev_handle) + bdev_release(bdev_handle); +#else + struct file *bdev_file = bdev_desc->priv; + + if (bdev_file) + fput(bdev_file); +#endif + + bdev_desc->bdev = NULL; + bdev_desc->priv = NULL; +} +EXPORT_SYMBOL(scst_release_bdev); + #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) static int scst_cmp_fs_ds(void) { @@ -5980,14 +6027,17 @@ EXPORT_SYMBOL(scst_file_size); */ loff_t scst_bdev_size(const char *path) { - struct bdev_handle *bdev_handle; + struct scst_bdev_descriptor bdev_desc; loff_t res; + int rc; - bdev_handle = bdev_open_by_path(path, BLK_OPEN_READ, NULL, NULL); - if (IS_ERR(bdev_handle)) - return PTR_ERR(bdev_handle); - res = i_size_read(bdev_handle->bdev->bd_inode); - bdev_release(bdev_handle); + rc = scst_open_bdev_by_path(path, BLK_OPEN_READ, NULL, NULL, &bdev_desc); + if (rc) + return rc; + + res = i_size_read(bdev_desc.bdev->bd_inode); + + scst_release_bdev(&bdev_desc); return res; } EXPORT_SYMBOL(scst_bdev_size); |
From: Gleb C. <lna...@ya...> - 2024-04-22 07:21:47
|
Commit: 659c7a7 GitHub URL: https://github.com/SCST-project/scst/commit/659c7a78750caee9fd2e7036fc9663c89b05d15c Author: Brian Meagher Date: 2024-04-22T10:21:15+03:00 Log Message: ----------- iscsi-scst: Add link_local parameter Add a link_local parameter to control whether an IPv6 SendTargets response includes link local addresses. The default is to preserve the existing behavior and include them. Modified Paths: -------------- iscsi-scst/README | 4 +++ iscsi-scst/usr/event.c | 27 +++++++++++++++ iscsi-scst/usr/iscsi_scstd.c | 3 ++ iscsi-scst/usr/iscsid.h | 2 ++ iscsi-scst/usr/param.h | 1 + iscsi-scst/usr/target.c | 6 ++++ 6 files changed, 43 insertions(+) =================================================================== diff --git a/iscsi-scst/README b/iscsi-scst/README index 5ed01c7..4a275b1 100644 --- a/iscsi-scst/README +++ b/iscsi-scst/README @@ -200,6 +200,9 @@ is /sys/kernel/scst_tgt/targets/iscsi. It has the following entries: iSCSI-SCST attributes before it starts accepting new connections. 0 by default. + - link_local - if set, makes the response to an IPv6 SendTargets include + any link local addresses. Default is set. + - open_state - read-only attribute, which allows to see if the user space part of iSCSI-SCST connected to the kernel part. @@ -663,6 +666,7 @@ both iSCSI-SCST targets will look like: | | | |-- reinstating | | | `-- sid | | `-- tid +| |-- link_local | |-- mgmt | |-- open_state | |-- trace_level diff --git a/iscsi-scst/usr/event.c b/iscsi-scst/usr/event.c index e08cd4b..a65a183 100644 --- a/iscsi-scst/usr/event.c +++ b/iscsi-scst/usr/event.c @@ -644,6 +644,16 @@ static int handle_e_get_attr_value(int fd, const struct iscsi_kern_event *event) goto out_free; } snprintf(res_str, sizeof(res_str), "%s", isns_entity_target_name); + } else if (strcasecmp(ISCSI_LINK_LOCAL_ATTR_NAME, pp) == 0) { + if (target != NULL) { + log_error("Not NULL target %s for global attribute %s", + target->name, pp); + res = -EINVAL; + goto out_free; + } + snprintf(res_str, sizeof(res_str), "%d\n", send_targets_link_local); + if (send_targets_link_local != DEFAULT_SEND_TARGETS_LINK_LOCAL) + add_key_mark(res_str, sizeof(res_str), 0); } else { log_error("Unknown attribute %s", pp); res = -EINVAL; @@ -1067,6 +1077,23 @@ static int handle_e_set_attr_value(int fd, const struct iscsi_kern_event *event) } else if (strcasecmp(ISCSI_ISNS_ENTITY_ATTR_NAME, pp) == 0) { pp = config_sep_string(&p); strlcpy(isns_entity_target_name, pp, sizeof(isns_entity_target_name)); + } else if (strcasecmp(ISCSI_LINK_LOCAL_ATTR_NAME, pp) == 0) { + if (target != NULL) { + log_error("Not NULL target %s for global attribute %s", + target->name, pp); + res = -EINVAL; + goto out_free; + } + pp = config_sep_string(&p); + if (strcmp(pp, "1") == 0) + send_targets_link_local = 1; + else if (strcmp(pp, "0") == 0) + send_targets_link_local = 0; + else { + log_error("Unknown value %s", pp); + res = -EINVAL; + goto out_free; + } } else { log_error("Unknown attribute %s", pp); res = -EINVAL; diff --git a/iscsi-scst/usr/iscsi_scstd.c b/iscsi-scst/usr/iscsi_scstd.c index 58c3705..97b9143 100644 --- a/iscsi-scst/usr/iscsi_scstd.c +++ b/iscsi-scst/usr/iscsi_scstd.c @@ -961,6 +961,9 @@ int main(int argc, char **argv) S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR, 0); if (err != 0) exit(err); + err = kernel_attr_add(NULL, ISCSI_LINK_LOCAL_ATTR_NAME, 0644, 0); + if (err != 0) + exit(err); if ((ipc_fd = iscsi_adm_request_listen()) < 0) { perror("Opening AF_LOCAL socket failed"); diff --git a/iscsi-scst/usr/iscsid.h b/iscsi-scst/usr/iscsid.h index 69146bd..e68f67d 100644 --- a/iscsi-scst/usr/iscsid.h +++ b/iscsi-scst/usr/iscsid.h @@ -307,6 +307,8 @@ extern void session_free(struct session *session); extern struct connection *conn_find(struct session *session, u16 cid); /* target.c */ +#define DEFAULT_SEND_TARGETS_LINK_LOCAL 1 +extern int send_targets_link_local; extern struct __qelem targets_list; extern int target_create(const char *name, struct target **out_target); extern void target_free(struct target *target); diff --git a/iscsi-scst/usr/param.h b/iscsi-scst/usr/param.h index 6a1d8b7..9c9c62a 100644 --- a/iscsi-scst/usr/param.h +++ b/iscsi-scst/usr/param.h @@ -26,6 +26,7 @@ #define ISCSI_TARGET_REDIRECTION_VALUE_TEMP "temp" #define ISCSI_TARGET_REDIRECTION_VALUE_PERM "perm" #define ISCSI_TARGET_ALIAS_ATTR_NAME "alias" +#define ISCSI_LINK_LOCAL_ATTR_NAME "link_local" struct iscsi_key; diff --git a/iscsi-scst/usr/target.c b/iscsi-scst/usr/target.c index 7a2bb81..c827081 100644 --- a/iscsi-scst/usr/target.c +++ b/iscsi-scst/usr/target.c @@ -33,6 +33,8 @@ struct __qelem targets_list = LIST_HEAD_INIT(targets_list); +int send_targets_link_local = DEFAULT_SEND_TARGETS_LINK_LOCAL; + const char *iscsi_make_full_initiator_name(int per_portal_acl, const char *initiator_name, const char *target_portal, char *buf, int size) @@ -204,6 +206,10 @@ static void target_print_addr(struct connection *conn, char *addr, int family) { char taddr[NI_MAXHOST + NI_MAXSERV + 5]; + /* Maybe skip IPv6 link local addresses */ + if (family == AF_INET6 && !send_targets_link_local && (strncasecmp(addr, "fe80:", 5) == 0)) + return; + snprintf(taddr, sizeof(taddr), (family == AF_INET) ? "%s:%d,1" : "[%s]:%d,1", addr, server_port); |
From: Gleb C. <lna...@ya...> - 2024-02-25 15:18:35
|
Commit: 7bec059 GitHub URL: https://github.com/SCST-project/scst/commit/7bec05916c37e4d28f1d9ad55dd962ffef1ef9a7 Author: Gleb Chesnokov Date: 2024-02-25T18:18:10+03:00 Log Message: ----------- scst_vdisk: Simplify request_queue retrieval in vdisk_exec_read_capacity16 This patch simplifies the retrieval of the request_queue within the vdisk_exec_read_capacity16 function. Modified Paths: -------------- scst/src/dev_handlers/scst_vdisk.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) =================================================================== diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index d544cc0..d8265cf 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -4952,8 +4952,6 @@ static enum compl_status_e vdisk_exec_read_capacity16(struct vdisk_cmd_params *p int32_t length; uint8_t *address; struct scst_vdisk_dev *virt_dev; - struct block_device *bdev; - struct request_queue *q; uint32_t blocksize; uint64_t nblocks; uint8_t buffer[32]; @@ -4961,8 +4959,6 @@ static enum compl_status_e vdisk_exec_read_capacity16(struct vdisk_cmd_params *p TRACE_ENTRY(); virt_dev = cmd->dev->dh_priv; - bdev = virt_dev->bdev_handle ? virt_dev->bdev_handle->bdev : NULL; - q = bdev ? bdev_get_queue(bdev) : NULL; blocksize = cmd->dev->block_size; nblocks = virt_dev->nblocks - 1; @@ -5000,6 +4996,8 @@ static enum compl_status_e vdisk_exec_read_capacity16(struct vdisk_cmd_params *p /* LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT */ if (virt_dev->lb_per_pb_exp) { + struct request_queue *q = virt_dev->bdev_handle ? + bdev_get_queue(virt_dev->bdev_handle->bdev) : NULL; uint32_t physical_blocksize = q ? queue_physical_block_size(q) : 4096; buffer[13] = max(ilog2(physical_blocksize) - ilog2(blocksize), 0); } |
From: Gleb C. <lna...@ya...> - 2024-02-25 13:38:01
|
Commit: bb78492 GitHub URL: https://github.com/SCST-project/scst/commit/bb784929448c588f87d6b674ef79b65378d8146a Author: Brian Meagher Date: 2024-02-25T16:37:34+03:00 Log Message: ----------- scst_vdisk: Fix recent breakage in vdisk_exec_read_capacity16 A recent commit (974001f66) added backport support for bdev_open_by_path. This entailed adding a struct bdev_handle, but vdisk_exec_read_capacity16 attempts to lookup virt_dev->bdev_handle->bdev without regard for the fact that if we are not using blockio then bdev_handle will be null. Rectify by making the lookup more robust. Modified Paths: -------------- scst/src/dev_handlers/scst_vdisk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) =================================================================== diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 4e52a22..d544cc0 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -509,7 +509,7 @@ static void vdisk_blockio_check_flush_support(struct scst_vdisk_dev *virt_dev) "Unable to open %s with EMEDIUMTYPE, DRBD passive?", virt_dev->filename); else - PRINT_ERROR("blkdev_get_by_path(%s) failed: %ld", + PRINT_ERROR("bdev_open_by_path(%s) failed: %ld", virt_dev->filename, PTR_ERR(bdev_handle)); goto out; } @@ -4961,7 +4961,7 @@ static enum compl_status_e vdisk_exec_read_capacity16(struct vdisk_cmd_params *p TRACE_ENTRY(); virt_dev = cmd->dev->dh_priv; - bdev = virt_dev->bdev_handle->bdev; + bdev = virt_dev->bdev_handle ? virt_dev->bdev_handle->bdev : NULL; q = bdev ? bdev_get_queue(bdev) : NULL; blocksize = cmd->dev->block_size; nblocks = virt_dev->nblocks - 1; |
From: Gleb C. <lna...@ya...> - 2024-02-16 11:31:01
|
Commit: ce2ba13 GitHub URL: https://github.com/SCST-project/scst/commit/ce2ba13bed42c975a048fc56774d425774ad632c Author: Gleb Chesnokov Date: 2024-02-16T14:30:39+03:00 Log Message: ----------- scst_vdisk: Fix check for blockio device Suppress the following (false positive) Coverity complaint: CID 347415: (#1 of 1): Dereference after null check (FORWARD_NULL) var_deref_model: Passing null pointer virt_dev->bdev_handle to bdev_release_backport, which dereferences it Modified Paths: -------------- .gitignore | 1 + scst/src/dev_handlers/scst_vdisk.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) =================================================================== diff --git a/.gitignore b/.gitignore index 60d04ac..bcb84e6 100644 --- a/.gitignore +++ b/.gitignore @@ -14,6 +14,7 @@ *.sdtstub.S *~ .cache.mk +.cache/ .ctf .depend_adm .depend_d diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 2d044cc..4e52a22 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -1335,7 +1335,7 @@ static int vdisk_open_fd(struct scst_vdisk_dev *virt_dev, bool read_only) * For block devices, get the optimal I/O size from the block device * characteristics. */ - if (virt_dev->bdev_handle && !virt_dev->opt_trans_len_set) + if (virt_dev->blockio && !virt_dev->opt_trans_len_set) virt_dev->opt_trans_len = bdev_io_opt(virt_dev->bdev_handle->bdev) ? : virt_dev->opt_trans_len; |
From: Gleb C. <lna...@ya...> - 2024-02-16 10:53:40
|
Commit: bf6d418 GitHub URL: https://github.com/SCST-project/scst/commit/bf6d41800efe9e13a4919575afe9986d15fc7784 Author: Gleb Chesnokov Date: 2024-02-16T13:52:34+03:00 Log Message: ----------- qla2x00t-32gbit: Port to Linux kernel v6.8 Support for the following tracing layer changes in the Linux kernel v6.8: - d23569979ca1 ("tracing: Allow creating instances with specified system events") Modified Paths: -------------- qla2x00t-32gbit/qla_os.c | 4 ++++ 1 file changed, 4 insertions(+) =================================================================== diff --git a/qla2x00t-32gbit/qla_os.c b/qla2x00t-32gbit/qla_os.c index 56a2e71..52e8018 100644 --- a/qla2x00t-32gbit/qla_os.c +++ b/qla2x00t-32gbit/qla_os.c @@ -2939,7 +2939,11 @@ static void qla2x00_iocb_work_fn(struct work_struct *work) static void qla_trace_init(void) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0) qla_trc_array = trace_array_get_by_name("qla2xxx"); +#else + qla_trc_array = trace_array_get_by_name("qla2xxx", NULL); +#endif if (!qla_trc_array) { ql_log(ql_log_fatal, NULL, 0x0001, "Unable to create qla2xxx trace instance, instance logging will be disabled.\n"); |
From: Gleb C. <lna...@ya...> - 2024-02-16 10:53:22
|
Commit: 974001f GitHub URL: https://github.com/SCST-project/scst/commit/974001f66fd3e16f4325cfadff28f420abf3b9e3 Author: Gleb Chesnokov Date: 2024-02-16T13:52:34+03:00 Log Message: ----------- scst/include/backport.h, scst_vdisk: Port to Linux kernel v6.8 Support for the following block layer changes in the Linux kernel v6.8: - e719b4d15674 ("block: Provide bdev_open_* functions") - cd34758c5238 ("block: Remove blkdev_get_by_*() functions") Modified Paths: -------------- scst/include/backport.h | 45 ++++++++ scst/src/dev_handlers/scst_vdisk.c | 89 ++++++++------- scst/src/scst_lib.c | 12 +- 3 files changed, 96 insertions(+), 50 deletions(-) =================================================================== diff --git a/scst/include/backport.h b/scst/include/backport.h index 51ee162..5798e7c 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -282,6 +282,51 @@ static inline void blkdev_put_backport(struct block_device *bdev, void *holder) #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0) +/* + * See also commit e719b4d15674 ("block: Provide bdev_open_* functions") # v6.7. + */ +struct bdev_handle { + struct block_device *bdev; + void *holder; + blk_mode_t mode; +}; + +static inline struct bdev_handle * +bdev_open_by_path_backport(const char *path, blk_mode_t mode, void *holder, + const struct blk_holder_ops *hops) +{ + struct bdev_handle *handle = kmalloc(sizeof(*handle), GFP_KERNEL); + struct block_device *bdev; + + if (!handle) + return ERR_PTR(-ENOMEM); + + bdev = blkdev_get_by_path(path, mode, holder, hops); + if (IS_ERR(bdev)) { + kfree(handle); + return ERR_CAST(bdev); + } + + handle->bdev = bdev; + handle->holder = holder; + handle->mode = mode; + + return handle; +} + +#define bdev_open_by_path bdev_open_by_path_backport + +static inline void bdev_release_backport(struct bdev_handle *handle) +{ + blkdev_put(handle->bdev, handle->holder); + kfree(handle); +} + +#define bdev_release bdev_release_backport + +#endif + #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 19, 0) && \ (!defined(RHEL_RELEASE_CODE) || \ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 1)) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index a18252f..2d044cc 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -190,7 +190,7 @@ struct scst_vdisk_dev { struct file *fd; struct file *dif_fd; - struct block_device *bdev; + struct bdev_handle *bdev_handle; struct bio_set *vdisk_bioset; #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0) struct bio_set vdisk_bioset_struct; @@ -494,7 +494,7 @@ out: static void vdisk_blockio_check_flush_support(struct scst_vdisk_dev *virt_dev) { - struct block_device *bdev; + struct bdev_handle *bdev_handle; TRACE_ENTRY(); @@ -502,26 +502,26 @@ static void vdisk_blockio_check_flush_support(struct scst_vdisk_dev *virt_dev) virt_dev->wt_flag || !virt_dev->dev_active) goto out; - bdev = blkdev_get_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL); - if (IS_ERR(bdev)) { - if (PTR_ERR(bdev) == -EMEDIUMTYPE) + bdev_handle = bdev_open_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL); + if (IS_ERR(bdev_handle)) { + if (PTR_ERR(bdev_handle) == -EMEDIUMTYPE) TRACE(TRACE_MINOR, "Unable to open %s with EMEDIUMTYPE, DRBD passive?", virt_dev->filename); else PRINT_ERROR("blkdev_get_by_path(%s) failed: %ld", - virt_dev->filename, PTR_ERR(bdev)); + virt_dev->filename, PTR_ERR(bdev_handle)); goto out; } - if (vdisk_blockio_flush(bdev, GFP_KERNEL, false, NULL, false) != 0) { + if (vdisk_blockio_flush(bdev_handle->bdev, GFP_KERNEL, false, NULL, false) != 0) { PRINT_WARNING( "Device %s doesn't support barriers, switching to NV_CACHE mode. Read README for more details.", virt_dev->filename); virt_dev->nv_cache = 1; } - blkdev_put(bdev, NULL); + bdev_release(bdev_handle); out: TRACE_EXIT(); @@ -536,7 +536,7 @@ static bool vdisk_supports_active(const struct scst_vdisk_dev *virt_dev) static void vdisk_check_tp_support(struct scst_vdisk_dev *virt_dev) { - struct block_device *bdev = NULL; + struct bdev_handle *bdev_handle = NULL; struct file *fd = NULL; bool fd_open = false; int res; @@ -549,8 +549,8 @@ static void vdisk_check_tp_support(struct scst_vdisk_dev *virt_dev) goto check; if (virt_dev->blockio) { - bdev = blkdev_get_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL); - res = PTR_ERR_OR_ZERO(bdev); + bdev_handle = bdev_open_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL); + res = PTR_ERR_OR_ZERO(bdev_handle); } else { fd = filp_open(virt_dev->filename, O_LARGEFILE, 0600); res = PTR_ERR_OR_ZERO(fd); @@ -573,10 +573,10 @@ static void vdisk_check_tp_support(struct scst_vdisk_dev *virt_dev) (!defined(RHEL_RELEASE_CODE) || \ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 1)) virt_dev->dev_thin_provisioned = - blk_queue_discard(bdev_get_queue(bdev)); + blk_queue_discard(bdev_get_queue(bdev_handle->bdev)); #else virt_dev->dev_thin_provisioned = - !!bdev_max_discard_sectors(bdev); + !!bdev_max_discard_sectors(bdev_handle->bdev); #endif } else { virt_dev->dev_thin_provisioned = (fd->f_op->fallocate != NULL); @@ -613,7 +613,7 @@ check: struct request_queue *q; sBUG_ON(!fd_open); - q = bdev_get_queue(bdev); + q = bdev_get_queue(bdev_handle->bdev); virt_dev->unmap_opt_gran = q->limits.discard_granularity >> block_shift; virt_dev->unmap_align = q->limits.discard_alignment >> block_shift; if (virt_dev->unmap_opt_gran == virt_dev->unmap_align) @@ -645,7 +645,7 @@ check: if (fd_open) { if (virt_dev->blockio) - blkdev_put(bdev, NULL); + bdev_release(bdev_handle); else filp_close(fd, NULL); } @@ -964,19 +964,19 @@ static int vdisk_init_block_integrity(struct scst_vdisk_dev *virt_dev) { int res; struct scst_device *dev = virt_dev->dev; - struct block_device *bdev; + struct bdev_handle *bdev_handle; struct blk_integrity *bi; const char *bi_profile_name; TRACE_ENTRY(); - bdev = blkdev_get_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL); - if (IS_ERR(bdev)) { - res = PTR_ERR(bdev); + bdev_handle = bdev_open_by_path(virt_dev->filename, BLK_OPEN_READ, NULL, NULL); + if (IS_ERR(bdev_handle)) { + res = PTR_ERR(bdev_handle); goto out; } - bi = bdev_get_integrity(bdev); + bi = bdev_get_integrity(bdev_handle->bdev); if (bi == NULL) { TRACE_DBG("Block integrity not supported"); goto out_no_bi; @@ -1048,7 +1048,7 @@ out_no_bi: res = 0; out_close: - blkdev_put(bdev, NULL); + bdev_release(bdev_handle); out: TRACE_EXIT_RES(res); @@ -1297,7 +1297,7 @@ static void vdisk_detach(struct scst_device *dev) static bool vdisk_is_open(const struct scst_vdisk_dev *virt_dev) { - return virt_dev->fd || virt_dev->bdev; + return virt_dev->fd || virt_dev->bdev_handle; } static int vdisk_open_fd(struct scst_vdisk_dev *virt_dev, bool read_only) @@ -1317,15 +1317,16 @@ static int vdisk_open_fd(struct scst_vdisk_dev *virt_dev, bool read_only) if (!read_only) bdev_mode |= BLK_OPEN_WRITE; - virt_dev->bdev = blkdev_get_by_path(virt_dev->filename, bdev_mode, virt_dev, NULL); - res = PTR_ERR_OR_ZERO(virt_dev->bdev); + virt_dev->bdev_handle = bdev_open_by_path(virt_dev->filename, bdev_mode, virt_dev, + NULL); + res = PTR_ERR_OR_ZERO(virt_dev->bdev_handle); } else { virt_dev->fd = vdev_open_fd(virt_dev, virt_dev->filename, read_only); res = PTR_ERR_OR_ZERO(virt_dev->fd); } if (res) { - virt_dev->bdev = NULL; + virt_dev->bdev_handle = NULL; virt_dev->fd = NULL; goto out; } @@ -1334,8 +1335,8 @@ static int vdisk_open_fd(struct scst_vdisk_dev *virt_dev, bool read_only) * For block devices, get the optimal I/O size from the block device * characteristics. */ - if (virt_dev->bdev && !virt_dev->opt_trans_len_set) - virt_dev->opt_trans_len = bdev_io_opt(virt_dev->bdev) ? : + if (virt_dev->bdev_handle && !virt_dev->opt_trans_len_set) + virt_dev->opt_trans_len = bdev_io_opt(virt_dev->bdev_handle->bdev) ? : virt_dev->opt_trans_len; if (virt_dev->dif_filename != NULL) { @@ -1349,15 +1350,15 @@ static int vdisk_open_fd(struct scst_vdisk_dev *virt_dev, bool read_only) } TRACE_DBG("virt_dev %s: fd %p %p open (dif_fd %p)", virt_dev->name, - virt_dev->fd, virt_dev->bdev, virt_dev->dif_fd); + virt_dev->fd, virt_dev->bdev_handle, virt_dev->dif_fd); out: return res; out_close_fd: if (virt_dev->blockio) { - blkdev_put(virt_dev->bdev, virt_dev); - virt_dev->bdev = NULL; + bdev_release(virt_dev->bdev_handle); + virt_dev->bdev_handle = NULL; } else { filp_close(virt_dev->fd, NULL); virt_dev->fd = NULL; @@ -1368,11 +1369,11 @@ out_close_fd: static void vdisk_close_fd(struct scst_vdisk_dev *virt_dev) { TRACE_DBG("virt_dev %s: closing fd %p %p (dif_fd %p)", virt_dev->name, - virt_dev->fd, virt_dev->bdev, virt_dev->dif_fd); + virt_dev->fd, virt_dev->bdev_handle, virt_dev->dif_fd); - if (virt_dev->bdev) { - blkdev_put(virt_dev->bdev, virt_dev); - virt_dev->bdev = NULL; + if (virt_dev->bdev_handle) { + bdev_release(virt_dev->bdev_handle); + virt_dev->bdev_handle = NULL; } else if (virt_dev->fd) { filp_close(virt_dev->fd, NULL); virt_dev->fd = NULL; @@ -1458,7 +1459,7 @@ static int vdisk_attach_tgt(struct scst_tgt_dev *tgt_dev) } } else { virt_dev->fd = NULL; - virt_dev->bdev = NULL; + virt_dev->bdev_handle = NULL; virt_dev->dif_fd = NULL; } @@ -1544,7 +1545,7 @@ static int vdisk_fsync_blockio(loff_t loff, goto out; } - res = vdisk_blockio_flush(virt_dev->bdev, gfp_flags, true, + res = vdisk_blockio_flush(virt_dev->bdev_handle->bdev, gfp_flags, true, cmd, async); out: @@ -1856,7 +1857,7 @@ static int vdisk_unmap_range(struct scst_cmd *cmd, (unsigned long long)start_lba, blocks); if (virt_dev->blockio) { - struct block_device *bdev = virt_dev->bdev; + struct block_device *bdev = virt_dev->bdev_handle->bdev; sector_t start_sector = start_lba << (cmd->dev->block_shift - 9); sector_t nr_sects = blocks << (cmd->dev->block_shift - 9); gfp_t gfp = cmd->cmd_gfp_mask; @@ -2870,7 +2871,7 @@ static ssize_t blockio_read_sync(struct scst_vdisk_dev *virt_dev, void *buf, struct bio_priv_sync s = { COMPLETION_INITIALIZER_ONSTACK(s.c), 0, }; - struct block_device *bdev = virt_dev->bdev; + struct block_device *bdev = virt_dev->bdev_handle->bdev; const bool is_vmalloc = is_vmalloc_addr(buf); struct bio *bio; void *p; @@ -3406,7 +3407,7 @@ static enum scst_exec_res blockio_exec(struct scst_cmd *cmd) if (unlikely(!vdisk_parse_offset(&p, cmd))) goto err; - if (unlikely(virt_dev->bdev == NULL)) { + if (unlikely(virt_dev->bdev_handle == NULL)) { if (!vdisk_no_fd_allowed_commands(cmd)) { /* * We should not get here, unless the user space @@ -4960,7 +4961,7 @@ static enum compl_status_e vdisk_exec_read_capacity16(struct vdisk_cmd_params *p TRACE_ENTRY(); virt_dev = cmd->dev->dh_priv; - bdev = virt_dev->bdev; + bdev = virt_dev->bdev_handle->bdev; q = bdev ? bdev_get_queue(bdev) : NULL; blocksize = cmd->dev->block_size; nblocks = virt_dev->nblocks - 1; @@ -5927,7 +5928,7 @@ static void blockio_exec_rw(struct vdisk_cmd_params *p, bool write, bool fua) struct scst_device *dev = cmd->dev; struct scst_vdisk_dev *virt_dev = dev->dh_priv; int block_shift = dev->block_shift; - struct block_device *bdev = virt_dev->bdev; + struct block_device *bdev = virt_dev->bdev_handle->bdev; struct bio_set *bs = virt_dev->vdisk_bioset; struct request_queue *q = bdev_get_queue(bdev); int length, max_nr_vecs = 0, offset; @@ -6598,7 +6599,7 @@ static int vdisk_resync_size(struct scst_vdisk_dev *virt_dev) sBUG_ON(virt_dev->nullio); sBUG_ON(!virt_dev->filename); - if ((!virt_dev->fd && !virt_dev->bdev) || !virt_dev->dev_active) { + if ((!virt_dev->fd && !virt_dev->bdev_handle) || !virt_dev->dev_active) { res = -EMEDIUMTYPE; goto out; } @@ -7646,7 +7647,7 @@ static int vcdrom_change(struct scst_vdisk_dev *virt_dev, char *buffer) err = 0; virt_dev->filename = NULL; virt_dev->fd = NULL; - virt_dev->bdev = NULL; + virt_dev->bdev_handle = NULL; } virt_dev->file_size = err; @@ -7706,7 +7707,7 @@ static ssize_t vdisk_sysfs_sync_store(struct kobject *kobj, if (virt_dev->nullio) res = 0; else if (virt_dev->blockio) - res = vdisk_blockio_flush(virt_dev->bdev, GFP_KERNEL, false, + res = vdisk_blockio_flush(virt_dev->bdev_handle->bdev, GFP_KERNEL, false, NULL, false); else res = __vdisk_fsync_fileio(0, i_size_read(file_inode(virt_dev->fd)), diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index b5bf73a..c514795 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -5980,14 +5980,14 @@ EXPORT_SYMBOL(scst_file_size); */ loff_t scst_bdev_size(const char *path) { - struct block_device *bdev; + struct bdev_handle *bdev_handle; loff_t res; - bdev = blkdev_get_by_path(path, BLK_OPEN_READ, NULL, NULL); - if (IS_ERR(bdev)) - return PTR_ERR(bdev); - res = i_size_read(bdev->bd_inode); - blkdev_put(bdev, NULL); + bdev_handle = bdev_open_by_path(path, BLK_OPEN_READ, NULL, NULL); + if (IS_ERR(bdev_handle)) + return PTR_ERR(bdev_handle); + res = i_size_read(bdev_handle->bdev->bd_inode); + bdev_release(bdev_handle); return res; } EXPORT_SYMBOL(scst_bdev_size); |
From: Gleb C. <lna...@ya...> - 2024-02-16 10:40:39
|
Commit: ff70c9d GitHub URL: https://github.com/SCST-project/scst/commit/ff70c9deb7344f3506d000d723c396ec7adcb3a2 Author: Brian Meagher Date: 2024-02-16T13:40:08+03:00 Log Message: ----------- scst_vdisk: Add active attributes support to vdisk_fileio vdisk_blockio already supports the active attribute to facilitate deferring opening au underlying block device. Add a similar feature to vdisk_fileio. Modified Paths: -------------- scst/src/dev_handlers/scst_vdisk.c | 16 +++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) =================================================================== diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 04b219e..a18252f 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -528,6 +528,12 @@ out: return; } +static bool vdisk_supports_active(const struct scst_vdisk_dev *virt_dev) +{ + /* Both blockio and fileio support active attribute */ + return !virt_dev->nullio; +} + static void vdisk_check_tp_support(struct scst_vdisk_dev *virt_dev) { struct block_device *bdev = NULL; @@ -550,7 +556,7 @@ static void vdisk_check_tp_support(struct scst_vdisk_dev *virt_dev) res = PTR_ERR_OR_ZERO(fd); } if (res) { - if (res == -EMEDIUMTYPE && virt_dev->blockio) + if (res == -EMEDIUMTYPE && vdisk_supports_active(virt_dev)) TRACE(TRACE_MINOR, "Unable to open %s with EMEDIUMTYPE, DRBD passive?", virt_dev->filename); @@ -666,7 +672,7 @@ static int vdisk_get_file_size(const struct scst_vdisk_dev *virt_dev, } res = scst_file_or_bdev_size(virt_dev->filename); - if (res == -EMEDIUMTYPE && virt_dev->blockio) { + if (res == -EMEDIUMTYPE && vdisk_supports_active(virt_dev)) { TRACE(TRACE_MINOR, "Unable to open %s with EMEDIUMTYPE, DRBD passive?", virt_dev->filename); @@ -1070,7 +1076,7 @@ static int vdisk_reexamine(struct scst_vdisk_dev *virt_dev) res = vdisk_get_file_size(virt_dev, &file_size); if (res < 0) { - if ((res == -EMEDIUMTYPE) && virt_dev->blockio) { + if ((res == -EMEDIUMTYPE) && vdisk_supports_active(virt_dev)) { TRACE_DBG("Reexam pending (dev %s)", virt_dev->name); virt_dev->reexam_pending = 1; res = 0; @@ -1442,7 +1448,7 @@ static int vdisk_attach_tgt(struct scst_tgt_dev *tgt_dev) if (!virt_dev->nullio && !virt_dev->cdrom_empty) { res = vdisk_open_fd(virt_dev, tgt_dev->dev->dev_rd_only); if (res != 0) { - if ((res == -EMEDIUMTYPE) && virt_dev->blockio) { + if ((res == -EMEDIUMTYPE) && vdisk_supports_active(virt_dev)) { /* It's OK, it will be reopen on exec */ res = 0; } else { @@ -9577,6 +9583,7 @@ static struct scst_trace_log vdisk_local_trace_tbl[] = { #endif static const struct attribute *vdisk_fileio_attrs[] = { + &vdev_active_attr.attr, &vdev_size_ro_attr.attr, &vdev_size_mb_ro_attr.attr, &vdisk_blocksize_attr.attr, @@ -9610,6 +9617,7 @@ static const struct attribute *vdisk_fileio_attrs[] = { }; static const char *const fileio_add_dev_params[] = { + "active", "async", "blocksize", "cluster_mode", |
From: Gleb C. <lna...@ya...> - 2024-02-16 09:08:39
|
Commit: bee5066 GitHub URL: https://github.com/SCST-project/scst/commit/bee5066645f8d2181ed309c233ff8b4a6ca17cad Author: Bart Van Assche Date: 2024-02-16T12:07:21+03:00 Log Message: ----------- scst_copy_mgr: Reject EXTENDED COPY(LID4) commands Since SCST only supports EXTENDED COPY(LID1) commands, reject EXTENDED COPY(LID4) commands. Signed-off-by: Bart Van Assche <bva...@ac...> Modified Paths: -------------- scst/src/scst_copy_mgr.c | 17 +++++++++++++++ 1 file changed, 17 insertions(+) =================================================================== diff --git a/scst/src/scst_copy_mgr.c b/scst/src/scst_copy_mgr.c index 874d0da..cf6f077 100644 --- a/scst/src/scst_copy_mgr.c +++ b/scst/src/scst_copy_mgr.c @@ -2971,6 +2971,7 @@ struct scst_cm_tgt_descr { int param_offs; }; +/* Parse the copy source or copy destination (CSCD) descriptors. */ static int scst_cm_parse_id_tgt_descr(struct scst_cmd *cmd, const uint8_t *seg, int offs, struct scst_cm_tgt_descr *tgt_descr) { @@ -3015,10 +3016,13 @@ static int scst_cm_parse_id_tgt_descr(struct scst_cmd *cmd, const uint8_t *seg, list_for_each_entry(des, &scst_cm_desig_list, cm_desig_list_entry) { TRACE_DBG("des %p (tgt_dev %p, lun %lld)", des, des->desig_tgt_dev, (unsigned long long)des->desig_tgt_dev->lun); + /* Check the code set field. */ if (seg[4] != des->desig[0]) continue; + /* Check the association and designator type fields. */ if (seg[5] != des->desig[1]) continue; + /* Check the designator length. */ if (seg[7] > 20) { PRINT_WARNING("Initiator sent non-compliant identification descriptor (len %u > 20)", seg[7]); @@ -3410,6 +3414,7 @@ static void scst_cm_free_ec_priv(struct scst_cmd *ec_cmd, bool unblock_dev) return; } +/* Parse the EXTENDED COPY parameter list. */ int scst_cm_parse_descriptors(struct scst_cmd *ec_cmd) { int res = 0, rc; @@ -3426,6 +3431,18 @@ int scst_cm_parse_descriptors(struct scst_cmd *ec_cmd) EXTRACHECKS_BUG_ON(ec_cmd->cmd_data_descriptors != NULL); + if (ec_cmd->cdb[1] != 0) { + /* + * SCST only supports the EXTENDED COPY(LID1) command. + * Reject EXTENDED COPY(LID4) commands since these have a + * completely different parameter format. Definitions for both + * commands are available in SPC-4 while the LID1 variant has + * been removed from SPC-5 and SPC-6. + */ + scst_set_invalid_field_in_cdb(ec_cmd, 1, 0); + goto out_abn; + } + length = scst_get_buf_full_sense(ec_cmd, &buf); if (unlikely(length <= 0)) { if (length == 0) |
From: Gleb C. <lna...@ya...> - 2024-02-16 09:08:25
|
Commit: 316856c GitHub URL: https://github.com/SCST-project/scst/commit/316856caee815b2d3fb61d3231ec0b49611cc8c7 Author: Bart Van Assche Date: 2024-02-16T12:07:21+03:00 Log Message: ----------- scst_lib: Remove documentation of removed arguments Commit 488aaeed71ca ("scst_lib: Remove support for kernel versions before 3.10") removed the d_km_type and s_km_type arguments. Hence this patch that removes the documentation for these arguments. Fixes: 488aaeed71ca ("scst_lib: Remove support for kernel versions before 3.10") Signed-off-by: Bart Van Assche <bva...@ac...> Modified Paths: -------------- scst/src/scst_lib.c | 2 -- 1 file changed, 2 deletions(-) =================================================================== diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 349565f..b5bf73a 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8940,8 +8940,6 @@ out_unmap: * @nents_to_cmp: maximum number of entries to compare * @cmp_len: maximum amount of data to compare. If 0, then compare all. * @miscompare_offs: offset of the first miscompare. Can be NULL. - * @d_km_type: kmap_atomic type for SG 1 - * @s_km_type: kmap_atomic type for SG 2 * * Description: * Data from the first SG vector will be compired with the second SG |
From: Gleb C. <lna...@ya...> - 2024-02-16 09:08:13
|
Commit: 38b9e89 GitHub URL: https://github.com/SCST-project/scst/commit/38b9e895bd6316b92e7f181808834ce759370398 Author: Bart Van Assche Date: 2024-02-16T12:07:21+03:00 Log Message: ----------- .github/workflows: Restrict some workflows to the official repository Prevent that the Coverity and send-email workflows fail for submitters of pull requests. Signed-off-by: Bart Van Assche <bva...@ac...> Modified Paths: -------------- .github/workflows/coverity.yml | 1 + .github/workflows/mail_notification.yml | 1 + 2 files changed, 2 insertions(+) =================================================================== diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index c6465da..e643a01 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -7,6 +7,7 @@ on: jobs: coverity: + if: github.repository == 'SCST-project/scst' runs-on: ubuntu-latest steps: - name: Checkout Project diff --git a/.github/workflows/mail_notification.yml b/.github/workflows/mail_notification.yml index 9d585a2..415ac08 100644 --- a/.github/workflows/mail_notification.yml +++ b/.github/workflows/mail_notification.yml @@ -10,6 +10,7 @@ on: jobs: send_mails: name: ${{matrix.commit.message}} + if: github.repository == 'SCST-project/scst' runs-on: ubuntu-latest strategy: max-parallel: 1 |
From: Gleb C. <lna...@ya...> - 2024-02-16 09:07:57
|
Commit: b1ec106 GitHub URL: https://github.com/SCST-project/scst/commit/b1ec10623b1cd186a471507dc05e410eac6a0525 Author: Bart Van Assche Date: 2024-02-16T12:07:21+03:00 Log Message: ----------- .github/workflows: Use the latest checkout action Fix the following warning: Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3. Signed-off-by: Bart Van Assche <bva...@ac...> Modified Paths: -------------- .github/workflows/checkpatch_pull.yml | 2 +- .github/workflows/checkpatch_push.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/coverity.yml | 2 +- .github/workflows/mail_notification.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) =================================================================== diff --git a/.github/workflows/checkpatch_pull.yml b/.github/workflows/checkpatch_pull.yml index a9ced98..b19aa58 100644 --- a/.github/workflows/checkpatch_pull.yml +++ b/.github/workflows/checkpatch_pull.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@main with: ref: ${{github.event.pull_request.head.sha}} fetch-depth: 0 diff --git a/.github/workflows/checkpatch_push.yml b/.github/workflows/checkpatch_push.yml index 28acad5..12b6924 100644 --- a/.github/workflows/checkpatch_push.yml +++ b/.github/workflows/checkpatch_push.yml @@ -15,7 +15,7 @@ jobs: commit: ${{github.event.commits}} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@main with: ref: ${{matrix.commit.id}} fetch-depth: 2 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d878d8..02bd998 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: compiler: [gcc, clang] arch: [x86_64] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@main - name: Install build-essential run: | sudo apt-get update diff --git a/.github/workflows/coverity.yml b/.github/workflows/coverity.yml index ebdc75f..c6465da 100644 --- a/.github/workflows/coverity.yml +++ b/.github/workflows/coverity.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Project - uses: actions/checkout@v3 + uses: actions/checkout@main - name: Get version id: get_version diff --git a/.github/workflows/mail_notification.yml b/.github/workflows/mail_notification.yml index ac75e71..9d585a2 100644 --- a/.github/workflows/mail_notification.yml +++ b/.github/workflows/mail_notification.yml @@ -17,7 +17,7 @@ jobs: commit: ${{github.event.commits}} steps: - name: Checkout Project - uses: actions/checkout@v3 + uses: actions/checkout@main with: ref: ${{matrix.commit.id}} fetch-depth: 2 |
From: Gleb C. <lna...@ya...> - 2024-01-30 07:55:57
|
Commit: f4f8da8 GitHub URL: https://github.com/SCST-project/scst/commit/f4f8da8b4dd324467e76caca1ca6f647e99a49e9 Author: Brian Meagher Date: 2024-01-30T10:55:25+03:00 Log Message: ----------- scstadmin: Eliminate use of uninitialized value in numeric error Using scstadmin to reload a configuration with fewer targets can result in a "Use of uninitialized value in numeric ne" error. Rectify by adding a check for the undefined value and handling the situation (by disabling the target in question, unless the driver is copy_manager). Modified Paths: -------------- scstadmin/scstadmin.sysfs/scstadmin | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) =================================================================== diff --git a/scstadmin/scstadmin.sysfs/scstadmin b/scstadmin/scstadmin.sysfs/scstadmin index 75d0ca8..84e539a 100755 --- a/scstadmin/scstadmin.sysfs/scstadmin +++ b/scstadmin/scstadmin.sysfs/scstadmin @@ -2831,10 +2831,17 @@ sub applyConfigEnableTargets { my $t_attributes; ($t_attributes, $errorString) = $SCST->targetAttributes($driver, $target); - if (defined($$t_attributes{'enabled'}) && - ($$t_attributes{'enabled'}->{'value'} != $$attributes{'enabled'})) { - setTargetAttribute($driver, $target, 'enabled', $$attributes{'enabled'}); - $changes++; + if (defined($$attributes{'enabled'})) { + if (defined($$t_attributes{'enabled'}) && + ($$t_attributes{'enabled'}->{'value'} != $$attributes{'enabled'})) { + setTargetAttribute($driver, $target, 'enabled', $$attributes{'enabled'}); + $changes++; + } + } else { + if ($driver ne 'copy_manager') { + setTargetAttribute($driver, $target, 'enabled', 0); + $changes++; + } } } } |
From: Gleb C. <lna...@ya...> - 2024-01-15 12:35:06
|
Commit: 1d93997 GitHub URL: https://github.com/SCST-project/scst/commit/1d93997c74db37f0338ee633ce8e847fdba6fe07 Author: Gleb Chesnokov Date: 2024-01-15T15:34:21+03:00 Log Message: ----------- github: Update stable branch version for the Mailing list action Modified Paths: -------------- .github/workflows/mail_notification.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) =================================================================== diff --git a/.github/workflows/mail_notification.yml b/.github/workflows/mail_notification.yml index ee54d3b..ac75e71 100644 --- a/.github/workflows/mail_notification.yml +++ b/.github/workflows/mail_notification.yml @@ -4,7 +4,7 @@ name: Mailing list on: push: branches: - - 3.7.x + - 3.8.x - master jobs: |
From: Gleb C. <lna...@ya...> - 2024-01-15 12:34:37
|
Commit: 2f9a82b GitHub URL: https://github.com/SCST-project/scst/commit/2f9a82bb87f2067891836311a82321b02b4dc668 Author: Gleb Chesnokov Date: 2024-01-15T15:33:45+03:00 Log Message: ----------- github: Update stable branch version for the Mailing list action Modified Paths: -------------- .github/workflows/mail_notification.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) =================================================================== diff --git a/.github/workflows/mail_notification.yml b/.github/workflows/mail_notification.yml index ee54d3b..ac75e71 100644 --- a/.github/workflows/mail_notification.yml +++ b/.github/workflows/mail_notification.yml @@ -4,7 +4,7 @@ name: Mailing list on: push: branches: - - 3.7.x + - 3.8.x - master jobs: |
From: Gleb C. <lna...@ya...> - 2024-01-15 12:34:19
|
Commit: 1882567 GitHub URL: https://github.com/SCST-project/scst/commit/188256792c8b87d10af92453e33302823092264e Author: Gleb Chesnokov Date: 2024-01-15T15:33:45+03:00 Log Message: ----------- Bump the version number to 3.9.0-pre These changes have been generated by running the following command: $ scripts/update-version 3 9 0 -pre Modified Paths: -------------- doc/scst_user_spec.sgml | 2 +- fcst/fcst.h | 2 +- iscsi-scst/README | 2 +- iscsi-scst/include/iscsi_scst_ver.h | 2 +- iscsi-scst/kernel/isert-scst/isert.c | 4 ++-- qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h | 4 ++-- qla2x00t/qla2x00-target/README | 2 +- qla2x00t/qla2x00-target/qla2x00t.h | 4 ++-- scst/README | 2 +- scst/include/scst_const.h | 4 ++-- scst/src/dev_handlers/scst_vdisk.c | 2 +- scst_local/scst_local.c | 2 +- scstadmin/scstadmin.sysfs/scstadmin | 2 +- srpt/src/ib_srpt.c | 4 ++-- usr/fileio/README | 2 +- usr/fileio/common.h | 2 +- usr/include/version.h | 2 +- 17 files changed, 22 insertions(+), 22 deletions(-) =================================================================== diff --git a/doc/scst_user_spec.sgml b/doc/scst_user_spec.sgml index 25bf10e..e4c9ea8 100644 --- a/doc/scst_user_spec.sgml +++ b/doc/scst_user_spec.sgml @@ -10,7 +10,7 @@ SCST user space device handler interface description <name>Vladislav Bolkhovitin</name> </author> -<date>Version 3.8.0</date> +<date>Version 3.9.0-pre</date> <toc> diff --git a/fcst/fcst.h b/fcst/fcst.h index 23ffedc..4335958 100644 --- a/fcst/fcst.h +++ b/fcst/fcst.h @@ -38,7 +38,7 @@ #define NEW_LIBFC_API #endif -#define FT_VERSION "3.8.0" +#define FT_VERSION "3.9.0-pre" #define FT_MODULE "fcst" #define FT_MAX_HW_PENDING_TIME 20 /* max I/O time in seconds */ diff --git a/iscsi-scst/README b/iscsi-scst/README index 8e4c035..5ed01c7 100644 --- a/iscsi-scst/README +++ b/iscsi-scst/README @@ -1,7 +1,7 @@ iSCSI SCST target driver ======================== -Version 3.8.0, 12 January 2024 +Version 3.9.0-pre, 15 January 2024 ---------------------------- ISCSI-SCST is a deeply reworked fork of iSCSI Enterprise Target (IET) diff --git a/iscsi-scst/include/iscsi_scst_ver.h b/iscsi-scst/include/iscsi_scst_ver.h index f4ea4c8..9d0d419 100644 --- a/iscsi-scst/include/iscsi_scst_ver.h +++ b/iscsi-scst/include/iscsi_scst_ver.h @@ -17,4 +17,4 @@ #define ISCSI_VERSION_STRING_SUFFIX -#define ISCSI_VERSION_STRING "3.8.0" ISCSI_VERSION_STRING_SUFFIX +#define ISCSI_VERSION_STRING "3.9.0-pre" ISCSI_VERSION_STRING_SUFFIX diff --git a/iscsi-scst/kernel/isert-scst/isert.c b/iscsi-scst/kernel/isert-scst/isert.c index 1d2a114..56c136d 100644 --- a/iscsi-scst/kernel/isert-scst/isert.c +++ b/iscsi-scst/kernel/isert-scst/isert.c @@ -503,8 +503,8 @@ out: MODULE_AUTHOR("Yan Burman"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_IMPORT_NS(SCST); -#define DRV_VERSION "3.8.0" "#" __stringify(OFED_FLAVOR) -#define DRV_RELDATE "12 January 2024" +#define DRV_VERSION "3.9.0-pre" "#" __stringify(OFED_FLAVOR) +#define DRV_RELDATE "15 January 2024" MODULE_DESCRIPTION("iSER target transport driver " "v" DRV_VERSION " (" DRV_RELDATE ")"); module_init(isert_init_module); diff --git a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h index 7e909c1..1722e60 100644 --- a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h +++ b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h @@ -19,8 +19,8 @@ /* Driver version number */ #define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d)) -#define Q2T_VERSION_CODE Q2T_VERSION(3, 8, 0, 0) -#define Q2T_VERSION_STRING "3.8.0" +#define Q2T_VERSION_CODE Q2T_VERSION(3, 9, 0, 0) +#define Q2T_VERSION_STRING "3.9.0-pre" #define SQA_DEFAULT_TAGS 2048 diff --git a/qla2x00t/qla2x00-target/README b/qla2x00t/qla2x00-target/README index 89e296d..399d194 100644 --- a/qla2x00t/qla2x00-target/README +++ b/qla2x00t/qla2x00-target/README @@ -1,7 +1,7 @@ Target driver for QLogic 2[2-6]xx/8[1-3]xx Fibre Channel cards ============================================================== -Version 3.8.0, 12 January 2024 +Version 3.9.0-pre, 15 January 2024 ---------------------------- This is target driver for QLogic 2[2-6]xx/8[1-3]xx Fibre Channel cards. diff --git a/qla2x00t/qla2x00-target/qla2x00t.h b/qla2x00t/qla2x00-target/qla2x00t.h index 8f9736a..4cf4fce 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.h +++ b/qla2x00t/qla2x00-target/qla2x00t.h @@ -34,8 +34,8 @@ /* Version numbers, the same as for the kernel */ #define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d)) -#define Q2T_VERSION_CODE Q2T_VERSION(3, 8, 0, 0) -#define Q2T_VERSION_STRING "3.8.0" +#define Q2T_VERSION_CODE Q2T_VERSION(3, 9, 0, 0) +#define Q2T_VERSION_STRING "3.9.0-pre" #define Q2T_PROC_VERSION_NAME "version" #define Q2T_MAX_CDB_LEN 16 diff --git a/scst/README b/scst/README index f43c175..d5c215e 100644 --- a/scst/README +++ b/scst/README @@ -1,7 +1,7 @@ Generic SCSI target mid-level for Linux (SCST) ============================================== -Version 3.8.0, 12 January 2024 +Version 3.9.0-pre, 15 January 2024 ---------------------------- SCST is designed to provide unified, consistent interface between SCSI diff --git a/scst/include/scst_const.h b/scst/include/scst_const.h index 4b36c50..1b5d723 100644 --- a/scst/include/scst_const.h +++ b/scst/include/scst_const.h @@ -47,10 +47,10 @@ * and FIO_REV in usr/fileio/common.h as well. */ #define SCST_VERSION(a, b, c, d) (((a) << 24) + ((b) << 16) + ((c) << 8) + d) -#define SCST_VERSION_CODE SCST_VERSION(3, 8, 0, 0) +#define SCST_VERSION_CODE SCST_VERSION(3, 9, 0, 0) #define SCST_VERSION_STRING_SUFFIX -#define SCST_VERSION_NAME "3.8.0" +#define SCST_VERSION_NAME "3.9.0-pre" #define SCST_VERSION_STRING SCST_VERSION_NAME SCST_VERSION_STRING_SUFFIX #ifdef SCST_REVISION diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 262e9c1..04b219e 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -75,7 +75,7 @@ #define SCST_FIO_VENDOR "SCST_FIO" #define SCST_BIO_VENDOR "SCST_BIO" /* 4 byte ASCII Product Revision Level - left aligned */ -#define SCST_FIO_REV "380 " +#define SCST_FIO_REV "390 " #define MAX_USN_LEN (20+1) /* For '\0' */ #define MAX_INQ_VEND_SPECIFIC_LEN (INQ_BUF_SZ - 96) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 8b90895..a8bf14b 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -71,7 +71,7 @@ README file for details. static unsigned long scst_local_trace_flag = SCST_LOCAL_DEFAULT_LOG_FLAGS; #endif -#define SCST_LOCAL_VERSION "3.8.0" +#define SCST_LOCAL_VERSION "3.9.0-pre" static const char *scst_local_version_date = "20110901"; /* Some statistics */ diff --git a/scstadmin/scstadmin.sysfs/scstadmin b/scstadmin/scstadmin.sysfs/scstadmin index 4de10a7..75d0ca8 100755 --- a/scstadmin/scstadmin.sysfs/scstadmin +++ b/scstadmin/scstadmin.sysfs/scstadmin @@ -3,7 +3,7 @@ use strict; use warnings; -my $Version = 'SCST Configurator v3.8.0'; +my $Version = 'SCST Configurator v3.9.0-pre'; # Configures SCST # diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 837c896..fa7dd53 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -59,8 +59,8 @@ /* Name of this kernel module. */ #define DRV_NAME "ib_srpt" -#define DRV_VERSION "3.8.0" "#" __stringify(OFED_FLAVOR) -#define DRV_RELDATE "12 January 2024" +#define DRV_VERSION "3.9.0-pre" "#" __stringify(OFED_FLAVOR) +#define DRV_RELDATE "15 January 2024" #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) /* Flags to be used in SCST debug tracing statements. */ #define DEFAULT_SRPT_TRACE_FLAGS (TRACE_OUT_OF_MEM | TRACE_MINOR \ diff --git a/usr/fileio/README b/usr/fileio/README index 7f9490d..84ff622 100644 --- a/usr/fileio/README +++ b/usr/fileio/README @@ -1,7 +1,7 @@ User space FILEIO handler ========================= -Version 3.8.0, 12 January 2024 +Version 3.9.0-pre, 15 January 2024 ---------------------------- User space program fileio_tgt uses interface of SCST's scst_user dev diff --git a/usr/fileio/common.h b/usr/fileio/common.h index efd4fa1..0be91f6 100644 --- a/usr/fileio/common.h +++ b/usr/fileio/common.h @@ -30,7 +30,7 @@ /* 8 byte ASCII Vendor */ #define VENDOR "SCST_USR" /* 4 byte ASCII Product Revision Level - left aligned */ -#define FIO_REV "380 " +#define FIO_REV "390 " #define MAX_USN_LEN (20+1) /* For '\0' */ diff --git a/usr/include/version.h b/usr/include/version.h index e98c762..55a4594 100644 --- a/usr/include/version.h +++ b/usr/include/version.h @@ -19,6 +19,6 @@ #ifndef __VERSION_H #define __VERSION_H -#define VERSION_STR "3.8.0" +#define VERSION_STR "3.9.0-pre" #endif /* __VERSION_H */ |
From: Gleb C. <lna...@ya...> - 2024-01-15 11:00:36
|
Commit: f134517 GitHub URL: https://github.com/SCST-project/scst/commit/f134517007d9dc5f9197c6b9bf5b08d930d929db Author: Gleb Chesnokov Date: 2024-01-15T13:59:19+03:00 Log Message: ----------- nightly build: Update kernel versions Modified Paths: -------------- nightly/conf/nightly.conf | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) =================================================================== diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index befe025..943c41e 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -3,40 +3,41 @@ ABT_DETAILS="x86_64" ABT_JOBS=5 ABT_KERNELS=" \ -6.6.8 \ +6.7 \ +6.6.11-nc \ 6.5.13-nc \ 6.4.16-nc \ 6.3.13-nc \ 6.2.16-nc \ -6.1.69-nc \ +6.1.72-nc \ 6.0.19-nc \ 5.19.17-nc \ 5.18.19-nc \ 5.17.15-nc \ 5.16.20-nc \ -5.15.145-nc \ +5.15.146-nc \ 5.14.21-nc \ 5.13.19-nc \ 5.12.19-nc \ 5.11.22-nc \ -5.10.205-nc \ +5.10.206-nc \ 5.9.16-nc \ 5.8.18-nc \ 5.7.19-nc \ 5.6.19-nc \ 5.5.19-nc \ -5.4.265-nc \ +5.4.266-nc \ 5.3.18-nc \ 5.2.21-nc \ 5.1.21-nc \ 5.0.21-nc \ 4.20.17-nc \ -4.19.303-nc \ +4.19.304-nc \ 4.18.20-nc \ 4.17.19-nc \ 4.16.18-nc \ 4.15.18-nc \ -4.14.334-nc \ +4.14.336-nc \ 4.13.16-nc \ 4.12.14-nc \ 4.11.12-nc \ |
From: Gleb C. <lna...@ya...> - 2024-01-15 11:00:26
|
Commit: cd23abe GitHub URL: https://github.com/SCST-project/scst/commit/cd23abef42e4f26e181c0c75ec7bba34e43451ca Author: Gleb Chesnokov Date: 2024-01-15T13:59:19+03:00 Log Message: ----------- www: Update the version number from 3.7 to 3.8 Modified Paths: -------------- www/downloads.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) =================================================================== diff --git a/www/downloads.html b/www/downloads.html index bd5b724..311a36b 100644 --- a/www/downloads.html +++ b/www/downloads.html @@ -35,9 +35,9 @@ <div id="main"> <h1>SCST Downloads</h1> - <p>The latest stable version of SCST is 3.7. + <p>The latest stable version of SCST is 3.8. Updates for that version are available on - the 3.7.x branch in the Git repository.</p> + the 3.8.x branch in the Git repository.</p> <p>Debian packages can be built by running "make dpkg". RPMs can be built by running @@ -48,7 +48,7 @@ <p>There is also a well done user space port, which you can find <a href="https://github.com/DavidButterfield/SCST-Usermode-Adaptation">here</a>.</p> <p>The latest development version of SCST is - 3.8. That version including target drivers and + 3.9. That version including target drivers and user space utilities can be downloaded directly from the SCST Git repository.</p> <p>You can access it using either |
From: Gleb C. <lna...@ya...> - 2024-01-15 11:00:03
|
Commit: 1171841 GitHub URL: https://github.com/SCST-project/scst/commit/1171841931cec25d62cb1c23e1bb351e565d015c Author: Gleb Chesnokov Date: 2024-01-15T13:59:19+03:00 Log Message: ----------- Bump the version number to 3.8.0 These changes have been generated by running the following command: $ scripts/update-version 3 8 0 Modified Paths: -------------- doc/scst_user_spec.sgml | 2 +- fcst/fcst.h | 2 +- iscsi-scst/README | 2 +- iscsi-scst/include/iscsi_scst_ver.h | 2 +- iscsi-scst/kernel/isert-scst/isert.c | 4 ++-- qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h | 2 +- qla2x00t/qla2x00-target/README | 2 +- qla2x00t/qla2x00-target/qla2x00t.h | 2 +- scst/README | 2 +- scst/include/scst_const.h | 2 +- scst_local/scst_local.c | 2 +- scstadmin/scstadmin.sysfs/scstadmin | 2 +- srpt/src/ib_srpt.c | 4 ++-- usr/fileio/README | 2 +- usr/include/version.h | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) =================================================================== diff --git a/doc/scst_user_spec.sgml b/doc/scst_user_spec.sgml index 5ce2859..25bf10e 100644 --- a/doc/scst_user_spec.sgml +++ b/doc/scst_user_spec.sgml @@ -10,7 +10,7 @@ SCST user space device handler interface description <name>Vladislav Bolkhovitin</name> </author> -<date>Version 3.8.0-pre</date> +<date>Version 3.8.0</date> <toc> diff --git a/fcst/fcst.h b/fcst/fcst.h index b36de57..23ffedc 100644 --- a/fcst/fcst.h +++ b/fcst/fcst.h @@ -38,7 +38,7 @@ #define NEW_LIBFC_API #endif -#define FT_VERSION "3.8.0-pre" +#define FT_VERSION "3.8.0" #define FT_MODULE "fcst" #define FT_MAX_HW_PENDING_TIME 20 /* max I/O time in seconds */ diff --git a/iscsi-scst/README b/iscsi-scst/README index d086c6e..8e4c035 100644 --- a/iscsi-scst/README +++ b/iscsi-scst/README @@ -1,7 +1,7 @@ iSCSI SCST target driver ======================== -Version 3.8.0-pre, 28 December 2022 +Version 3.8.0, 12 January 2024 ---------------------------- ISCSI-SCST is a deeply reworked fork of iSCSI Enterprise Target (IET) diff --git a/iscsi-scst/include/iscsi_scst_ver.h b/iscsi-scst/include/iscsi_scst_ver.h index e4a6104..f4ea4c8 100644 --- a/iscsi-scst/include/iscsi_scst_ver.h +++ b/iscsi-scst/include/iscsi_scst_ver.h @@ -17,4 +17,4 @@ #define ISCSI_VERSION_STRING_SUFFIX -#define ISCSI_VERSION_STRING "3.8.0-pre" ISCSI_VERSION_STRING_SUFFIX +#define ISCSI_VERSION_STRING "3.8.0" ISCSI_VERSION_STRING_SUFFIX diff --git a/iscsi-scst/kernel/isert-scst/isert.c b/iscsi-scst/kernel/isert-scst/isert.c index e7b7294..1d2a114 100644 --- a/iscsi-scst/kernel/isert-scst/isert.c +++ b/iscsi-scst/kernel/isert-scst/isert.c @@ -503,8 +503,8 @@ out: MODULE_AUTHOR("Yan Burman"); MODULE_LICENSE("Dual BSD/GPL"); MODULE_IMPORT_NS(SCST); -#define DRV_VERSION "3.8.0-pre" "#" __stringify(OFED_FLAVOR) -#define DRV_RELDATE "28 December 2022" +#define DRV_VERSION "3.8.0" "#" __stringify(OFED_FLAVOR) +#define DRV_RELDATE "12 January 2024" MODULE_DESCRIPTION("iSER target transport driver " "v" DRV_VERSION " (" DRV_RELDATE ")"); module_init(isert_init_module); diff --git a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h index 83ba6b8..7e909c1 100644 --- a/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h +++ b/qla2x00t-32gbit/qla2x00-target/scst_qla2xxx.h @@ -20,7 +20,7 @@ /* Driver version number */ #define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d)) #define Q2T_VERSION_CODE Q2T_VERSION(3, 8, 0, 0) -#define Q2T_VERSION_STRING "3.8.0-pre" +#define Q2T_VERSION_STRING "3.8.0" #define SQA_DEFAULT_TAGS 2048 diff --git a/qla2x00t/qla2x00-target/README b/qla2x00t/qla2x00-target/README index 12192d1..89e296d 100644 --- a/qla2x00t/qla2x00-target/README +++ b/qla2x00t/qla2x00-target/README @@ -1,7 +1,7 @@ Target driver for QLogic 2[2-6]xx/8[1-3]xx Fibre Channel cards ============================================================== -Version 3.8.0-pre, 28 December 2022 +Version 3.8.0, 12 January 2024 ---------------------------- This is target driver for QLogic 2[2-6]xx/8[1-3]xx Fibre Channel cards. diff --git a/qla2x00t/qla2x00-target/qla2x00t.h b/qla2x00t/qla2x00-target/qla2x00t.h index 3dfe7d5..8f9736a 100644 --- a/qla2x00t/qla2x00-target/qla2x00t.h +++ b/qla2x00t/qla2x00-target/qla2x00t.h @@ -35,7 +35,7 @@ /* Version numbers, the same as for the kernel */ #define Q2T_VERSION(a, b, c, d) (((a) << 030) + ((b) << 020) + (c) << 010 + (d)) #define Q2T_VERSION_CODE Q2T_VERSION(3, 8, 0, 0) -#define Q2T_VERSION_STRING "3.8.0-pre" +#define Q2T_VERSION_STRING "3.8.0" #define Q2T_PROC_VERSION_NAME "version" #define Q2T_MAX_CDB_LEN 16 diff --git a/scst/README b/scst/README index 4e6e8ef..f43c175 100644 --- a/scst/README +++ b/scst/README @@ -1,7 +1,7 @@ Generic SCSI target mid-level for Linux (SCST) ============================================== -Version 3.8.0-pre, 28 December 2022 +Version 3.8.0, 12 January 2024 ---------------------------- SCST is designed to provide unified, consistent interface between SCSI diff --git a/scst/include/scst_const.h b/scst/include/scst_const.h index 8b117ca..4b36c50 100644 --- a/scst/include/scst_const.h +++ b/scst/include/scst_const.h @@ -50,7 +50,7 @@ #define SCST_VERSION_CODE SCST_VERSION(3, 8, 0, 0) #define SCST_VERSION_STRING_SUFFIX -#define SCST_VERSION_NAME "3.8.0-pre" +#define SCST_VERSION_NAME "3.8.0" #define SCST_VERSION_STRING SCST_VERSION_NAME SCST_VERSION_STRING_SUFFIX #ifdef SCST_REVISION diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 742a05c..8b90895 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -71,7 +71,7 @@ README file for details. static unsigned long scst_local_trace_flag = SCST_LOCAL_DEFAULT_LOG_FLAGS; #endif -#define SCST_LOCAL_VERSION "3.8.0-pre" +#define SCST_LOCAL_VERSION "3.8.0" static const char *scst_local_version_date = "20110901"; /* Some statistics */ diff --git a/scstadmin/scstadmin.sysfs/scstadmin b/scstadmin/scstadmin.sysfs/scstadmin index 79f7dee..4de10a7 100755 --- a/scstadmin/scstadmin.sysfs/scstadmin +++ b/scstadmin/scstadmin.sysfs/scstadmin @@ -3,7 +3,7 @@ use strict; use warnings; -my $Version = 'SCST Configurator v3.8.0-pre'; +my $Version = 'SCST Configurator v3.8.0'; # Configures SCST # diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 751b7f6..837c896 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -59,8 +59,8 @@ /* Name of this kernel module. */ #define DRV_NAME "ib_srpt" -#define DRV_VERSION "3.8.0-pre" "#" __stringify(OFED_FLAVOR) -#define DRV_RELDATE "28 December 2022" +#define DRV_VERSION "3.8.0" "#" __stringify(OFED_FLAVOR) +#define DRV_RELDATE "12 January 2024" #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING) /* Flags to be used in SCST debug tracing statements. */ #define DEFAULT_SRPT_TRACE_FLAGS (TRACE_OUT_OF_MEM | TRACE_MINOR \ diff --git a/usr/fileio/README b/usr/fileio/README index 321e7f5..7f9490d 100644 --- a/usr/fileio/README +++ b/usr/fileio/README @@ -1,7 +1,7 @@ User space FILEIO handler ========================= -Version 3.8.0-pre, 28 December 2022 +Version 3.8.0, 12 January 2024 ---------------------------- User space program fileio_tgt uses interface of SCST's scst_user dev diff --git a/usr/include/version.h b/usr/include/version.h index 2190700..e98c762 100644 --- a/usr/include/version.h +++ b/usr/include/version.h @@ -19,6 +19,6 @@ #ifndef __VERSION_H #define __VERSION_H -#define VERSION_STR "3.8.0-pre" +#define VERSION_STR "3.8.0" #endif /* __VERSION_H */ |
From: Gleb C. <lna...@ya...> - 2024-01-15 10:59:56
|
Commit: cee2704 GitHub URL: https://github.com/SCST-project/scst/commit/cee270448c6ab01757f7e05b789dc8fbc1712c1f Author: Gleb Chesnokov Date: 2024-01-15T13:59:19+03:00 Log Message: ----------- scst/ChangeLog: Summarize the changes for the upcoming 3.8 release Modified Paths: -------------- scst/ChangeLog | 28 +++++++++++++++ 1 file changed, 28 insertions(+) =================================================================== diff --git a/scst/ChangeLog b/scst/ChangeLog index ed7f614..c9bc8b7 100644 --- a/scst/ChangeLog +++ b/scst/ChangeLog @@ -1,3 +1,31 @@ +Summary of changes between versions 3.7 and 3.8 +----------------------------------------------- +- Fixed depmod warnings during the installation process. +- Resolved RPM build issues for Fedora and CentOS Stream kernels. +- Introduced selectable debug mode levels during package building by passing + PKG_BUILD_MODE=2[release, debug, perf] as an argument to make. +- scst_disk: Implemented cluster mode support. +- scst_vdisk: Introduced the lb_per_pb_exp attribute, allowing control over + whether READ CAPACITY 16 returns LOGICAL BLOCKS PER PHYSICAL BLOCK EXPONENT. +- scst_vdisk: Enabled exclusive opening of block devices to prevent + concurrent usage. +- iscsi-scst: Implemented iSCSI TargetAlias support. +- iscsi-scstd: Added initiator name validation during login. +- Added the aen_disabled attribute, enabling forcible UA sending instead of + AEN from the target port. +- Fixed UNIT ATTENTION for remote PR registrants. +- Enhanced device blocking to ensure signal-induced waiting cancellation does + not crash the system. +- Corrected the display of the number of active commands during suspending. +- qla2x00t-32gbit driver: Rectified ABORT_TASK_SET processing. +- qla2x00t-32gbit driver: Updated from Linux kernel version v5.15 to v6.7. + +The kernel versions supported by this release are: +* Kernel.org kernel versions v3.10..v6.7. +* Debian / Ubuntu kernels based on upstream kernel versions v3.10..v6.7. +* RHEL / CentOS / AlmaLinux 7.x, 8.0..8.9 and 9.0..9.3 kernels. +* UEK version 4, 5, 6 and 7 kernels. + Summary of changes between versions 3.6 and 3.7 ----------------------------------------------- - The SCST event subsystem works again reliably. |
From: Gleb C. <lna...@ya...> - 2024-01-12 07:50:46
|
Commit: df039cb GitHub URL: https://github.com/SCST-project/scst/commit/df039cb3e9f549fde3079849f19e5b34186de701 Author: Brian Meagher Date: 2024-01-12T10:50:15+03:00 Log Message: ----------- scst.h, scst, device handlers: Fix scst_replace_port_info scst_pass_through_cmd_done can run in interrupt context, and call scst_replace_port_info, which in turn was calling scst_lookup_tg_id. Since scst_lookup_tg_id does a mutex_lock, we should not call it from interrupt context. Add scst_cmd_inquired_dev_ident and use in various locations. Modified Paths: -------------- scst/include/scst.h | 9 +++++++++ scst/src/dev_handlers/scst_disk.c | 9 +++++++++ scst/src/scst_targ.c | 11 +++++------ 3 files changed, 23 insertions(+), 6 deletions(-) =================================================================== diff --git a/scst/include/scst.h b/scst/include/scst.h index 781aabb..2e5aa57 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -2318,6 +2318,8 @@ struct scst_cmd { uint32_t tgt_sn; /* SN set by target driver (for TM purposes) */ + uint16_t tg_id; /* Only used during TYPE_DISK INQUIRY EVPD=0x83 */ + uint8_t *cdb; /* Pointer on CDB. Points on cdb_buf for small CDBs. */ unsigned short cdb_len; uint8_t cdb_buf[SCST_MAX_CDB_SIZE]; @@ -4524,6 +4526,13 @@ static inline bool scst_get_cmd_dev_d_sense(struct scst_cmd *cmd) return (cmd->dev != NULL) ? cmd->dev->d_sense : 0; } +/* Returns if command is INQUIRY EVPD=0x83 (device identification) */ +static inline bool scst_cmd_inquired_dev_ident(struct scst_cmd *cmd) +{ + return (cmd->cdb[0] == INQUIRY) && ((cmd->cdb[1] & 0x01/*EVPD*/) == 0x01) && + (cmd->cdb[2] == 0x83/*device identification*/); +} + /* * Get/Set functions for expected data direction, transfer length * and its validity flag diff --git a/scst/src/dev_handlers/scst_disk.c b/scst/src/dev_handlers/scst_disk.c index 341a05a..df2f436 100644 --- a/scst/src/dev_handlers/scst_disk.c +++ b/scst/src/dev_handlers/scst_disk.c @@ -374,6 +374,15 @@ static enum scst_exec_res disk_exec(struct scst_cmd *cmd) } } + /* + * If we are passing thru a INQUIRY VPD=0x83 (device identification) then + * we will call scst_replace_port_info on success in scst_pass_through_cmd_done. + * This will run in interrupt context, so we should not perform operations that + * involve mutexes. Call scst_lookup_tg_id here intead and save the output. + */ + if (unlikely(scst_cmd_inquired_dev_ident(cmd))) + cmd->tg_id = scst_lookup_tg_id(dev, tgt); + /* * For PC requests we are going to submit max_hw_sectors used instead * of max_sectors. diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index a325e7b..fa4afb2 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -2227,8 +2227,7 @@ static void scst_replace_port_info(struct scst_cmd *cmd) uint8_t *buf, *end, *p, designator_length; int32_t length, page_length; - if (cmd->cdb[0] != INQUIRY || (cmd->cdb[1] & 0x01/*EVPD*/) == 0 || - cmd->cdb[2] != 0x83/*device identification*/) + if (!scst_cmd_inquired_dev_ident(cmd)) return; length = scst_get_buf_full_sense(cmd, &buf); @@ -2242,7 +2241,6 @@ static void scst_replace_port_info(struct scst_cmd *cmd) const uint8_t code_set = p[0] & 0xf; const uint8_t association = (p[1] & 0x30) >> 4; const uint8_t designator_type = p[1] & 0xf; - uint16_t tg_id; designator_length = p[3]; @@ -2259,9 +2257,7 @@ static void scst_replace_port_info(struct scst_cmd *cmd) break; case 5: /* target port group */ - tg_id = scst_lookup_tg_id(cmd->dev, cmd->tgt); - if (tg_id) - put_unaligned_be16(tg_id, p + 6); + put_unaligned_be16(cmd->tg_id, p + 6); break; } } @@ -2622,6 +2618,9 @@ static enum scst_exec_res scst_do_real_exec(struct scst_cmd *cmd) scsi_dev->host->host_no, scsi_dev->channel, scsi_dev->id, (u64)scsi_dev->lun); + if (unlikely(scst_cmd_inquired_dev_ident(cmd))) + cmd->tg_id = scst_lookup_tg_id(dev, cmd->tgt); + rc = scst_scsi_exec_async(cmd, cmd, scst_pass_through_cmd_done); if (unlikely(rc != 0)) { PRINT_ERROR("scst pass-through exec failed: %d", rc); |