mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-19 05:36:22 +00:00
- Removed artificial limitation on sg_tablesize. It isn't needed, because the regular iSCSI negotiated MaxRecvDataSegmentLength-related facilities do all the job pretty well.
- Cleanups git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@655 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -125,7 +125,6 @@ static u32 digest_data(struct iscsi_cmnd *cmd, u32 osize, u32 offset)
|
||||
TRACE_DBG("req %p, idx %d, count %d, sg_cnt %d, size %d, "
|
||||
"offset %d", cmd, idx, count, cmd->sg_cnt, size, offset);
|
||||
sBUG_ON(idx + count > cmd->sg_cnt);
|
||||
sBUG_ON(count > (signed)ISCSI_CONN_IOV_MAX);
|
||||
|
||||
saved_sg = sg[idx];
|
||||
sg[idx].offset = offset;
|
||||
|
||||
@@ -974,6 +974,7 @@ static void cmnd_prepare_get_rejected_cmd_data(struct iscsi_cmnd *cmnd)
|
||||
size = (size + 3) & -4;
|
||||
conn->read_size = size;
|
||||
for (i = 0; size > PAGE_SIZE; i++, size -= cmnd->bufflen) {
|
||||
/* We already checked pdu.datasize in check_segment_length() */
|
||||
sBUG_ON(i >= ISCSI_CONN_IOV_MAX);
|
||||
conn->read_iov[i].iov_base = addr;
|
||||
conn->read_iov[i].iov_len = cmnd->bufflen;
|
||||
@@ -1995,6 +1996,7 @@ static void noop_out_exec(struct iscsi_cmnd *req)
|
||||
rsp->bufflen = req->bufflen;
|
||||
}
|
||||
|
||||
/* We already checked it in check_segment_length() */
|
||||
sBUG_ON(get_pgcnt(req->pdu.datasize, 0) > ISCSI_CONN_IOV_MAX);
|
||||
|
||||
rsp->pdu.datasize = req->pdu.datasize;
|
||||
@@ -2916,7 +2918,7 @@ static int iscsi_target_release(struct scst_tgt *scst_tgt)
|
||||
|
||||
struct scst_tgt_template iscsi_template = {
|
||||
.name = "iscsi",
|
||||
.sg_tablesize = ISCSI_CONN_IOV_MAX,
|
||||
.sg_tablesize = 0xFFFF /* no limit */,
|
||||
.threads_num = 0,
|
||||
.no_clustering = 1,
|
||||
.xmit_response_atomic = 0,
|
||||
|
||||
Reference in New Issue
Block a user