From 8159ce25317c6ca69bcf226c5729048792fbe6fa Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 14 Apr 2021 20:12:20 +0000 Subject: [PATCH 1/4] scst: Suppress a kernel-doc warning git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9378 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 701e49626..e443979ea 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -14583,11 +14583,11 @@ static void scst_free_descriptors(struct scst_cmd *cmd) return; } -/** - ** We currently have only few saved parameters and it is impossible to get - ** pointer on a bit field, so let's have a simple straightforward - ** implementation. - **/ +/* + * We currently have only few saved parameters and it is impossible to get + * pointer on a bit field, so let's have a simple straightforward + * implementation. + */ #define SCST_TAS_LABEL "TAS" #define SCST_QERR_LABEL "QERR" From 095d2557191a569f133539bfd0b58d6e2706619c Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 14 Apr 2021 20:29:52 +0000 Subject: [PATCH 2/4] iscsi-scst: Fix a kernel-doc header git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9379 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/digest.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/iscsi-scst/kernel/digest.c b/iscsi-scst/kernel/digest.c index 5b87519eb..463840ce0 100644 --- a/iscsi-scst/kernel/digest.c +++ b/iscsi-scst/kernel/digest.c @@ -39,12 +39,9 @@ void digest_alg_available(int *val) } /** - * initialize support for digest calculation. - * - * digest_init - + * digest_init - initialize support for digest calculation. * @conn: ptr to connection to make use of digests - * - * @return: 0 on success, < 0 on error + * Returns: 0 on success, < 0 on error */ int digest_init(struct iscsi_conn *conn) { From 9ad346b84e4b0f4622a6956d1eef64fc03e25c28 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 14 Apr 2021 20:31:39 +0000 Subject: [PATCH 3/4] scst_vdisk: Complete port to Linux kernel v5.12 This is a variant of a patch provided by Mark Ruijter. Fixes: https://github.com/bvanassche/scst/issues/34 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9380 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 463fdb5c1..aa01fea1b 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -488,8 +488,10 @@ static int vdisk_blockio_flush(struct block_device *bdev, gfp_t gfp_mask, res = blkdev_issue_flush(bdev, gfp_mask, NULL, BLKDEV_IFL_WAIT); #elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0) res = blkdev_issue_flush(bdev, gfp_mask, NULL); -#else +#elif LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0) res = blkdev_issue_flush(bdev, gfp_mask); +#else + res = blkdev_issue_flush(bdev); #endif } From f59fe00eb112ff7d949cfb3c7d31064bc299cc26 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 14 Apr 2021 20:35:40 +0000 Subject: [PATCH 4/4] scst: Enable the kernel scheduler in scst_wait_for_tgt_devs() This patch should fix the following bug: INFO: rcu_sched self-detected stall on CPU ... ... scst_wait_for_tgt_devs() Reported-by: Chesnokov Gleb git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9381 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index e443979ea..2a0fdfb78 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -4657,7 +4657,7 @@ static int scst_tgt_devs_cmds(struct list_head *tgt_dev_list) static void scst_wait_for_tgt_devs(struct list_head *tgt_dev_list) { while (scst_tgt_devs_cmds(tgt_dev_list) > 0) - mdelay(100); + msleep(100); } int scst_acg_del_lun(struct scst_acg *acg, uint64_t lun,