mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-28 09:20:18 +00:00
scst, iscsi-scst: Port to Linux kernel v4.20
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7810 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1498,7 +1498,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
|
||||
@@ -1651,7 +1653,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
|
||||
@@ -1845,7 +1850,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
|
||||
|
||||
@@ -470,7 +470,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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user