]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[SCSI] libiscsi,iser: patch for AHS support
authorBoaz Harrosh <boazharrosh@gmail.com>
Thu, 13 Dec 2007 18:43:24 +0000 (12:43 -0600)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>
Sat, 12 Jan 2008 00:28:25 +0000 (18:28 -0600)
  - The default initialization of hdr_max is the minimum -
    sizeof(struct iscsi_cmd) - Once this patch goes into iser the default
    initialization at libiscsi can be removed.
  - This is not yet full support for AHSs at iser end. But it should be easy.
    Just allocate more space at iser_desc right after iscsi_hdr. Than
    at transmission time use ctask->hdr_len to retrieve the total
    size of all iscsi pdu headers. See previous patch at iscsi_tcp.[ch]

Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
drivers/infiniband/ulp/iser/iscsi_iser.c
drivers/scsi/libiscsi.c

index 2eadb6d0ad8b891a8966415496ff97e4a90ae1d2..a2622f4bd858ebf675c75ade7698a3cce18927e4 100644 (file)
@@ -400,6 +400,7 @@ iscsi_iser_session_create(struct iscsi_transport *iscsit,
                ctask      = session->cmds[i];
                iser_ctask = ctask->dd_data;
                ctask->hdr = (struct iscsi_cmd *)&iser_ctask->desc.iscsi_header;
+               ctask->hdr_max = sizeof(iser_ctask->desc.iscsi_header);
        }
 
        for (i = 0; i < session->mgmtpool_max; i++) {
index 0d7914fd8ef3b75fbd6b1fad856f96d413562863..59365864c9894c8f09d82d6f2250e96ee3e40a5d 100644 (file)
@@ -1570,7 +1570,6 @@ iscsi_session_setup(struct iscsi_transport *iscsit,
                if (cmd_task_size)
                        ctask->dd_data = &ctask[1];
                ctask->itt = cmd_i;
-               ctask->hdr_max = sizeof(struct iscsi_cmd);
                INIT_LIST_HEAD(&ctask->running);
        }