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
|
Oct
|
Nov
|
Dec
|
From: Gleb C. <lna...@ya...> - 2024-05-03 09:51:33
|
Commit: e322287 GitHub URL: https://github.com/SCST-project/scst/commit/e322287f898394f91e2dc986794d0440901316ec Author: Gleb Chesnokov Date: 2024-05-03T12:50:49+03:00 Log Message: ----------- scst/include/backport.h: Backport DEFINE_SHOW_STORE_ATTRIBUTE() Support the previous commit against kernel versions before v6.7. See also commit 9cba82bba500 ("seq_file: add helper macro to define attribute for rw file") # v6.7. Modified Paths: -------------- scst/include/backport.h | 21 +++++++++++++++ 1 file changed, 21 insertions(+) =================================================================== diff --git a/scst/include/backport.h b/scst/include/backport.h index 3ab377c..97e46c9 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -1354,6 +1354,27 @@ static const struct file_operations __name ## _fops = { \ } #endif +/* + * See also commit 9cba82bba500 ("seq_file: add helper macro to define + * attribute for rw file") # v6.7. + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0) +#define DEFINE_SHOW_STORE_ATTRIBUTE(__name) \ +static int __name ## _open(struct inode *inode, struct file *file) \ +{ \ + return single_open(file, __name ## _show, inode->i_private); \ +} \ + \ +static const struct file_operations __name ## _fops = { \ + .owner = THIS_MODULE, \ + .open = __name ## _open, \ + .read = seq_read, \ + .write = __name ## _write, \ + .llseek = seq_lseek, \ + .release = single_release, \ +} +#endif + /* <linux/slab.h> */ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) && \ |
From: Gleb C. <lna...@ya...> - 2024-05-03 09:51:23
|
Commit: 1ea7200 GitHub URL: https://github.com/SCST-project/scst/commit/1ea7200d5515e88f932e2be7d5851f962639116b Author: Gleb Chesnokov Date: 2024-05-03T12:50:49+03:00 Log Message: ----------- qla2x00t-32gbit: use DEFINE_SHOW_STORE_ATTRIBUTE() helper for debugfs Use DEFINE_SHOW_STORE_ATTRIBUTE() helper for read-write file to reduce some duplicated code. Link: https://lkml.kernel.org/r/202...@hu... Signed-off-by: Luo Jiaxing <luo...@hu...> Co-developed-by: Xingui Yang <yan...@hu...> Signed-off-by: Xingui Yang <yan...@hu...> Reviewed-by: Andy Shevchenko <and...@li...> Cc: Al Viro <vi...@ze...> Cc: Animesh Manna <ani...@in...> Cc: Anshuman Gupta <ans...@in...> Cc: Damien Le Moal <dam...@op...> Cc: Felipe Balbi <fel...@li...> Cc: Greg Kroah-Hartman <gr...@li...> Cc: Himanshu Madhani <him...@ca...> Cc: James Bottomley <je...@li...> Cc: John Garry <joh...@or...> Cc: Martin K. Petersen <mar...@or...> Cc: Uma Shankar <uma...@in...> Cc: Xiang Chen <che...@hi...> Cc: Zeng Tao <pri...@hi...> Signed-off-by: Andrew Morton <ak...@li...> [ commit a9d56ce053da upstream ] Modified Paths: -------------- qla2x00t-32gbit/qla_dfs.c | 59 ++------------- 1 file changed, 7 insertions(+), 52 deletions(-) =================================================================== diff --git a/qla2x00t-32gbit/qla_dfs.c b/qla2x00t-32gbit/qla_dfs.c index e0b55d2..a4715de 100644 --- a/qla2x00t-32gbit/qla_dfs.c +++ b/qla2x00t-32gbit/qla_dfs.c @@ -532,51 +532,22 @@ qla_dfs_naqp_show(struct seq_file *s, void *unused) * * Example for creating "TEST" sysfs file: * 1. struct qla_hw_data { ... struct dentry *dfs_TEST; } - * 2. QLA_DFS_SETUP_RD(TEST, scsi_qla_host_t); + * 2. QLA_DFS_SETUP_RD(TEST); * 3. In qla2x00_dfs_setup(): * QLA_DFS_CREATE_FILE(ha, TEST, 0600, ha->dfs_dir, vha); * 4. In qla2x00_dfs_remove(): * QLA_DFS_REMOVE_FILE(ha, TEST); */ -#define QLA_DFS_SETUP_RD(_name, _ctx_struct) \ -static int \ -qla_dfs_##_name##_open(struct inode *inode, struct file *file) \ -{ \ - _ctx_struct *__ctx = inode->i_private; \ - \ - return single_open(file, qla_dfs_##_name##_show, __ctx); \ -} \ - \ -static const struct file_operations qla_dfs_##_name##_ops = { \ - .open = qla_dfs_##_name##_open, \ - .read = seq_read, \ - .llseek = seq_lseek, \ - .release = single_release, \ -}; +#define QLA_DFS_SETUP_RD(_name) DEFINE_SHOW_ATTRIBUTE(qla_dfs_##_name) -#define QLA_DFS_SETUP_RW(_name, _ctx_struct) \ -static int \ -qla_dfs_##_name##_open(struct inode *inode, struct file *file) \ -{ \ - _ctx_struct *__ctx = inode->i_private; \ - \ - return single_open(file, qla_dfs_##_name##_show, __ctx); \ -} \ - \ -static const struct file_operations qla_dfs_##_name##_ops = { \ - .open = qla_dfs_##_name##_open, \ - .read = seq_read, \ - .llseek = seq_lseek, \ - .release = single_release, \ - .write = qla_dfs_##_name##_write, \ -}; +#define QLA_DFS_SETUP_RW(_name) DEFINE_SHOW_STORE_ATTRIBUTE(qla_dfs_##_name) #define QLA_DFS_ROOT_CREATE_FILE(_name, _perm, _ctx) \ do { \ if (!qla_dfs_##_name) \ qla_dfs_##_name = debugfs_create_file(#_name, \ _perm, qla2x00_dfs_root, _ctx, \ - &qla_dfs_##_name##_ops); \ + &qla_dfs_##_name##_fops); \ } while (0) #define QLA_DFS_ROOT_REMOVE_FILE(_name) \ @@ -591,7 +562,7 @@ static const struct file_operations qla_dfs_##_name##_ops = { \ do { \ (_struct)->dfs_##_name = debugfs_create_file(#_name, \ _perm, _parent, _ctx, \ - &qla_dfs_##_name##_ops) \ + &qla_dfs_##_name##_fops) \ } while (0) #define QLA_DFS_REMOVE_FILE(_struct, _name) \ @@ -602,14 +573,6 @@ static const struct file_operations qla_dfs_##_name##_ops = { \ } \ } while (0) -static int -qla_dfs_naqp_open(struct inode *inode, struct file *file) -{ - struct scsi_qla_host *vha = inode->i_private; - - return single_open(file, qla_dfs_naqp_show, vha); -} - static ssize_t qla_dfs_naqp_write(struct file *file, const char __user *buffer, size_t count, loff_t *pos) @@ -657,15 +620,7 @@ out_free: kfree(buf); return rc; } - -static const struct file_operations dfs_naqp_ops = { - .open = qla_dfs_naqp_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, - .write = qla_dfs_naqp_write, -}; - +QLA_DFS_SETUP_RW(naqp); int qla2x00_dfs_setup(scsi_qla_host_t *vha) @@ -711,7 +666,7 @@ create_nodes: if (IS_QLA27XX(ha) || IS_QLA83XX(ha) || IS_QLA28XX(ha)) { ha->tgt.dfs_naqp = debugfs_create_file("naqp", - 0400, ha->dfs_dir, vha, &dfs_naqp_ops); + 0400, ha->dfs_dir, vha, &qla_dfs_naqp_fops); if (IS_ERR(ha->tgt.dfs_naqp)) { ql_log(ql_log_warn, vha, 0xd011, "Unable to create debugFS naqp node.\n"); |
From: Gleb C. <lna...@ya...> - 2024-05-03 09:19:27
|
Commit: 8a1a7fa GitHub URL: https://github.com/SCST-project/scst/commit/8a1a7fab1d47f36a17826c5fc350e436453e72b4 Author: Gleb Chesnokov Date: 2024-05-03T12:18:43+03:00 Log Message: ----------- scst/include/backport.h: Fix the build against UEK kernels Commit 48ef50966a17 ("scst/include/backport.h: Port to the latest UEK kernels") broke the build for UEK kernel versions before v5.4.17-2136. Fix it. Modified Paths: -------------- scst/include/backport.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) =================================================================== diff --git a/scst/include/backport.h b/scst/include/backport.h index 5de4090..3ab377c 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -1678,7 +1678,9 @@ static inline void scsi_build_sense(struct scsi_cmnd *scmd, int desc, (!defined(RHEL_RELEASE_CODE) || \ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(8, 7) || \ RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(9, 0)) && \ - !defined(UEK_KABI_RENAME) + (!defined(UEK_KABI_RENAME) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 17) || \ + !defined(SB_I_SKIP_SYNC)) /* * See also 51f3a4788928 ("scsi: core: Introduce the scsi_cmd_to_rq() * function") # v5.15. |
From: Gleb C. <lna...@ya...> - 2024-05-03 09:19:12
|
Commit: 52b5e84 GitHub URL: https://github.com/SCST-project/scst/commit/52b5e841cf97c4c39919b74394695bde0a11fe08 Author: Gleb Chesnokov Date: 2024-05-03T12:18:43+03:00 Log Message: ----------- scst/include/backport.h: Fix backport for new stable kernels This patch fixes the build against kernel versions >= 6.6.23. Modified Paths: -------------- scst/include/backport.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) =================================================================== diff --git a/scst/include/backport.h b/scst/include/backport.h index 1e85c95..5de4090 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -282,9 +282,11 @@ static inline void blkdev_put_backport(struct block_device *bdev, void *holder) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 7, 0) && \ + (LINUX_VERSION_CODE >> 8 != KERNEL_VERSION(6, 6, 0) >> 8 || \ + LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 23)) /* - * See also commit e719b4d15674 ("block: Provide bdev_open_* functions") # v6.7. + * See also commit e719b4d15674 ("block: Provide bdev_open_* functions") # v6.7, v6.6.23. */ struct bdev_handle { struct block_device *bdev; |
From: Gleb C. <lna...@ya...> - 2024-05-02 14:21:04
|
Commit: 48ef509 GitHub URL: https://github.com/SCST-project/scst/commit/48ef50966a17a8cad4821250373c6d38735a9bde Author: Gleb Chesnokov Date: 2024-05-02T17:20:01+03:00 Log Message: ----------- scst/include/backport.h: Port to the latest UEK kernels This patch fixes the build against UEK kernel versions 5.4.17-2136.330.7.1.el8uek, 5.15.0-205.149.5.1.el9uek. Modified Paths: -------------- scst/include/backport.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) =================================================================== diff --git a/scst/include/backport.h b/scst/include/backport.h index d611afe..1e85c95 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -1675,7 +1675,8 @@ static inline void scsi_build_sense(struct scsi_cmnd *scmd, int desc, LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 203)) && \ (!defined(RHEL_RELEASE_CODE) || \ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(8, 7) || \ - RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(9, 0)) + RHEL_RELEASE_CODE -0 == RHEL_RELEASE_VERSION(9, 0)) && \ + !defined(UEK_KABI_RENAME) /* * See also 51f3a4788928 ("scsi: core: Introduce the scsi_cmd_to_rq() * function") # v5.15. @@ -1733,7 +1734,9 @@ static inline unsigned int scsi_prot_interval(struct scsi_cmnd *scmd) !(LINUX_VERSION_CODE >> 8 == KERNEL_VERSION(5, 15, 0) >> 8 && \ LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 136)) && \ (!defined(RHEL_RELEASE_CODE) || \ - RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 1)) + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 1)) && \ + (!defined(UEK_KABI_RENAME) || \ + LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) /* * See also commit 11b68e36b167 ("scsi: core: Call scsi_done directly") # v5.16. * See also commit d2746cdfd5e5 ("scsi: core: Rename scsi_mq_done() into scsi_done() and export |
From: Gleb C. <lna...@ya...> - 2024-05-02 14:20:50
|
Commit: 71abad2 GitHub URL: https://github.com/SCST-project/scst/commit/71abad275e1838d3639122e85b36e211e8006c6b Author: Gleb Chesnokov Date: 2024-05-02T17:20:01+03:00 Log Message: ----------- scst/include/backport.h: Fix backport for new stable kernels This patch fixes the build against kernel versions >= 5.10.210. Modified Paths: -------------- scst/include/backport.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) =================================================================== diff --git a/scst/include/backport.h b/scst/include/backport.h index 5798e7c..d611afe 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -933,13 +933,15 @@ static inline void kvfree(void *addr) #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 18, 0) && \ (LINUX_VERSION_CODE >> 8 != KERNEL_VERSION(5, 15, 0) >> 8 || \ LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 54)) && \ + (LINUX_VERSION_CODE >> 8 != KERNEL_VERSION(5, 10, 0) >> 8 || \ + LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 210)) && \ (!defined(RHEL_RELEASE_CODE) || \ RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(9, 0)) && \ (!defined(UEK_KABI_RENAME) || \ LINUX_VERSION_CODE < KERNEL_VERSION(5, 15, 0)) /* * See also commit a8749a35c3990 ("mm: vmalloc: introduce array allocation functions") # v5.18, - * v5.15.54. + * v5.15.54, v5.10.210. */ static inline void *vmalloc_array(size_t n, size_t size) { |
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: |