scst, iscsi-scst: Port to Linux kernel v4.20 (merge r7810 from trunk)

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7813 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2018-11-18 23:39:57 +00:00
parent dad1a47289
commit 2d1e614aa1
3 changed files with 18 additions and 4 deletions
+11 -3
View File
@@ -1513,7 +1513,9 @@ static void cmnd_prepare_get_rejected_immed_data(struct iscsi_cmnd *cmnd)
e = min_t(u32, s, PAGE_SIZE);
conn->read_iov[i].iov_len = e;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
iov_iter_kvec(&conn->read_msg.msg_iter, READ, conn->read_iov, i, size);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
iov_iter_kvec(&conn->read_msg.msg_iter, READ | ITER_KVEC,
conn->read_iov, i, size);
#else
@@ -1666,7 +1668,10 @@ static int cmnd_prepare_recv_pdu(struct iscsi_conn *conn,
}
i++;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
iov_iter_kvec(&conn->read_msg.msg_iter, READ, conn->read_iov, i,
read_size);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
iov_iter_kvec(&conn->read_msg.msg_iter, READ | ITER_KVEC,
conn->read_iov, i, read_size);
#else
@@ -1860,7 +1865,10 @@ static int nop_out_start(struct iscsi_cmnd *cmnd)
sBUG_ON(size != 0);
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
iov_iter_kvec(&conn->read_msg.msg_iter, READ, conn->read_iov,
i, cmnd->pdu.datasize);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
iov_iter_kvec(&conn->read_msg.msg_iter, READ | ITER_KVEC,
conn->read_iov, i, cmnd->pdu.datasize);
#else
+3 -1
View File
@@ -626,7 +626,9 @@ static inline void iscsi_conn_init_read(struct iscsi_conn *conn,
{
conn->read_iov[0].iov_base = data;
conn->read_iov[0].iov_len = len;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
iov_iter_kvec(&conn->read_msg.msg_iter, READ, conn->read_iov, 1, len);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
iov_iter_kvec(&conn->read_msg.msg_iter, READ | ITER_KVEC,
conn->read_iov, 1, len);
#else
+4
View File
@@ -3299,8 +3299,12 @@ static enum compl_status_e fileio_exec_async(struct vdisk_cmd_params *p)
length = scst_get_buf_next(cmd, &address);
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0)
iov_iter_kvec(&iter, dir, p->async.kvec, kvec - p->async.kvec, total);
#else
iov_iter_kvec(&iter, ITER_KVEC | dir, p->async.kvec,
kvec - p->async.kvec, total);
#endif
p->async.iocb = (struct kiocb) {
.ki_pos = p->loff,
.ki_filp = fd,