From: Boaz Harrosh <bharrosh@panasas.com>
To: Tony Battersby <tonyb@cybernetics.com>
Cc: linux-scsi@vger.kernel.org, open-iscsi@googlegroups.com,
Mike Christie <michaelc@cs.wisc.edu>
Subject: Re: [PATCH] [SCSI] iscsi: return data transfer residual for data-out commands
Date: Wed, 07 Nov 2007 21:17:31 +0200 [thread overview]
Message-ID: <47320F4B.2040503@panasas.com> (raw)
In-Reply-To: <4731FEA4.5040206@cybernetics.com>
On Wed, Nov 07 2007 at 20:06 +0200, Tony Battersby <tonyb@cybernetics.com> wrote:
> Currently, the iSCSI driver returns the data transfer residual for
> data-in commands (e.g. read) but not data-out commands (e.g. write).
> This patch makes it return the data transfer residual for both types of
> commands.
All types of commands, also good for BIDI ;)
>
> Signed-off-by: Tony Battersby <tonyb@cybernetics.com>
> ---
> --- linux-2.6.24-rc2/drivers/scsi/libiscsi.c.orig 2007-11-07 12:52:20.000000000 -0500
> +++ linux-2.6.24-rc2/drivers/scsi/libiscsi.c 2007-11-07 12:52:27.000000000 -0500
> @@ -291,9 +291,6 @@ invalid_datalen:
> min_t(uint16_t, senselen, SCSI_SENSE_BUFFERSIZE));
> }
>
> - if (sc->sc_data_direction == DMA_TO_DEVICE)
> - goto out;
> -
> if (rhdr->flags & ISCSI_FLAG_CMD_UNDERFLOW) {
> int res_count = be32_to_cpu(rhdr->residual_count);
>
>
>
Thanks, this looks right to me. (And good catch)
I have went through the code and it looks like the right thing to do.
"svn blame" annotates this code to the patch (r527) that libiscsi was
cut out of iscsi_tcp so perhaps then it made sense, but does not anymore.
It is also needed for the bidi patches, as currently bidi commands
have a sc_data_direction == DMA_TO_DEVICE.
Pleas accept this patch
Boaz
next prev parent reply other threads:[~2007-11-07 19:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-07 18:06 [PATCH] [SCSI] iscsi: return data transfer residual for data-out commands Tony Battersby
2007-11-07 19:17 ` Boaz Harrosh [this message]
2007-11-07 20:42 ` Mike Christie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47320F4B.2040503@panasas.com \
--to=bharrosh@panasas.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=open-iscsi@googlegroups.com \
--cc=tonyb@cybernetics.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.