mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-02 05:16:15 +00:00
Merged revisions 7247-7251 via svnmerge from
svn+ssh://svn.code.sf.net/p/scst/svn/trunk ........ r7247 | bvassche | 2017-10-06 08:08:00 -0700 (Fri, 06 Oct 2017) | 4 lines fcst: Fix in-tree build See also r7243. ........ r7248 | bvassche | 2017-10-09 11:10:48 -0700 (Mon, 09 Oct 2017) | 4 lines scst_vdisk: Fix a bug in the Linux kernel v4.13 port See also trunk r7240. ........ r7249 | bvassche | 2017-10-09 11:15:00 -0700 (Mon, 09 Oct 2017) | 4 lines scst: Fix SCSI pass-through for kernel version v4.11 and later See also trunk r7153. ........ r7250 | bvassche | 2017-10-09 12:58:15 -0700 (Mon, 09 Oct 2017) | 1 line scst/include/backport.h: Follow-up for r7248 ........ r7251 | vlnb | 2017-10-09 19:06:13 -0700 (Mon, 09 Oct 2017) | 5 lines qla2x00t: update FW version information as suggested by Jens-U. Mozdzen <jmozdzen@nde.ag> See https://sourceforge.net/p/scst/mailman/message/36068827/ ........ git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7252 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -57,6 +57,7 @@ static inline struct bio_set *bioset_create_backport(unsigned int pool_size,
|
||||
return bioset_create(pool_size, front_pad);
|
||||
}
|
||||
#define bioset_create bioset_create_backport
|
||||
#define BIOSET_NEED_BVECS 0
|
||||
#endif
|
||||
|
||||
/* <linux/blkdev.h> */
|
||||
|
||||
@@ -7818,7 +7818,7 @@ static int vdisk_create_bioset(struct scst_vdisk_dev *virt_dev)
|
||||
EXTRACHECKS_BUG_ON(virt_dev->vdisk_bioset || !virt_dev->blockio);
|
||||
|
||||
/* Pool size doesn't really matter */
|
||||
virt_dev->vdisk_bioset = bioset_create(2, 0, 0);
|
||||
virt_dev->vdisk_bioset = bioset_create(2, 0, BIOSET_NEED_BVECS);
|
||||
if (virt_dev->vdisk_bioset == NULL) {
|
||||
PRINT_ERROR("Failed to create bioset (dev %s)", virt_dev->name);
|
||||
res = -ENOMEM;
|
||||
|
||||
+11
-1
@@ -7866,6 +7866,10 @@ static struct request *blk_make_request(struct request_queue *q,
|
||||
scsi_req_init(scsi_req(rq));
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
scsi_req_init(rq);
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
rq->cmd_flags = bio_data_dir(bio) == READ ? REQ_OP_SCSI_IN :
|
||||
REQ_OP_SCSI_OUT;
|
||||
#else
|
||||
blk_rq_set_block_pc(rq);
|
||||
#endif
|
||||
@@ -8042,6 +8046,9 @@ static struct request *__blk_map_kern_sg(struct request_queue *q,
|
||||
*/
|
||||
rq->cmd_type = REQ_TYPE_BLOCK_PC;
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
rq->cmd_flags = reading ? REQ_OP_SCSI_IN : REQ_OP_SCSI_OUT;
|
||||
#endif
|
||||
|
||||
if (bw != NULL) {
|
||||
atomic_set(&bw->bios_inflight, bios);
|
||||
@@ -8095,8 +8102,11 @@ static struct request *blk_map_kern_sg(struct request_queue *q,
|
||||
scsi_req_init(scsi_req(rq));
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
scsi_req_init(rq);
|
||||
#endif
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
rq->cmd_flags = reading ? REQ_OP_SCSI_IN : REQ_OP_SCSI_OUT;
|
||||
#else
|
||||
rq->cmd_type = REQ_TYPE_BLOCK_PC;
|
||||
blk_rq_set_block_pc(rq);
|
||||
#endif
|
||||
goto out;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user