From 75d059e9f0fbc39831cee4c38789a4abbd972bed Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 23 May 2020 17:14:21 +0000 Subject: [PATCH 1/2] iscsi-scstd: Fix a gcc 10 compiler warning git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8954 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/usr/isns_proto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iscsi-scst/usr/isns_proto.h b/iscsi-scst/usr/isns_proto.h index 5a86b39a8..84438f9cd 100644 --- a/iscsi-scst/usr/isns_proto.h +++ b/iscsi-scst/usr/isns_proto.h @@ -38,7 +38,7 @@ struct isns_hdr { struct isns_tlv { uint32_t tag; uint32_t length; - uint32_t value[0]; + uint32_t value[]; } __attribute__ ((packed)); /* Commands and responses (4.1.3) */ From 8a393a319b4bacbceb833e600e011673b72c9b03 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 23 May 2020 17:24:09 +0000 Subject: [PATCH 2/2] scst: Port to Linux kernel v5.8 Flag RQF_COPY_USER has been removed from kernel v5.8. Since that flag only controls padding that we don't need, do not set that flag. See also Linux kernel commit f18573abcc57 ("block: move the padding adjustment to blk_rq_map_sg") # v2.6.26. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8955 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_lib.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index 74a80d107..4b31c9333 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8357,20 +8357,8 @@ static struct request *__blk_map_kern_sg(struct request_queue *q, rq->cmd_type = REQ_TYPE_BLOCK_PC; #endif - if (bw != NULL) { + if (bw) atomic_set(&bw->bios_inflight, bios); -#if (!defined(CONFIG_SUSE_KERNEL) && \ - LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)) || \ - LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 0) - /* - * See also patch "block: split out request-only flags into a - * new namespace" (commit e806402130c9). - */ - rq->cmd_flags |= REQ_COPY_USER; -#else - rq->rq_flags |= RQF_COPY_USER; -#endif - } out: return rq;