cleanup of xmit_task
A message that is not in the archive (sent off-list or not yet received): [email protected]
<..snip>
Quoted 20 lines
(quoted diff) +0
-4@@ -720,17 +720,6 @@ fill_task_immediate_data(struct iscsi_ta struct crypto_tfm *tfm= NULL; struct scatterlist tmpsg; - /* make sure we have data to send when we expect to */ - if ((iscsi_expected_data_length(sc) == 0) && - ((sc->request_bufflen == 0) || (sc->request_buffer == NULL))) { - printk("iSCSI: xmit_task for itt %u, sc 0x%x,expected %u, no "
(quoted diff) +0
-1- "data in buffer. request_buffer %p len%u, buffer %p "
(quoted diff) +0
-2- "len %u\n", task->itt, sc->cmnd[0], - iscsi_expected_data_length(sc),
sc->request_buffer,(quoted diff) +0
-4- sc->request_bufflen, sc->buffer, sc->bufflen); - scsi_print_command(sc); - return 0; - }
Quoted 4 lines
What protects this function from being called with a scsi command that has no data? Are you sure we don't need this check with maybe just a return here?
Is it possible to have scsi write command with no data being sent?
<snip..>
Thanks,
Smitha
Quoted 22 lines · Smitha Narayanaswamy (smithan)
<..snip>
Quoted 20 lines
(quoted diff) +0
-4@@ -720,17 +720,6 @@ fill_task_immediate_data(struct iscsi_ta struct crypto_tfm *tfm= NULL; struct scatterlist tmpsg; - /* make sure we have data to send when we expect to */ - if ((iscsi_expected_data_length(sc) == 0) && - ((sc->request_bufflen == 0) || (sc->request_buffer == NULL))) { - printk("iSCSI: xmit_task for itt %u, sc 0x%x,expected %u, no "
- "data in buffer.request_buffer%p len
%u, buffer %p "(quoted diff) +0
-2- "len %u\n", task->itt, sc->cmnd[0], - iscsi_expected_data_length(sc),
sc->request_buffer,(quoted diff) +0
-4- sc->request_bufflen, sc->buffer, sc->bufflen); - scsi_print_command(sc); - return 0; - }
Quoted 7 lines
Quoted 4 lines
What protects this function from being called with a scsi command that has no data? Are you sure we don't need this check with maybe just a return here?
Is it possible to have scsi write command with no data being sent?
I don't know.
Since nobody replied with a definate 'yes', I'd guess it's probably a pathalogical case that we don't need to waste time checking for in the main IO path.