All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Douglas Gilbert <dougg@torque.net>
Cc: linux-scsi@vger.kernel.org
Subject: Re: extracting resid from struct scsi_cmnd
Date: Sun, 28 Nov 2004 10:12:05 +0100	[thread overview]
Message-ID: <20041128091201.GA10485@suse.de> (raw)
In-Reply-To: <41A9319F.9070206@torque.net>

On Sun, Nov 28 2004, Douglas Gilbert wrote:
> Jens,
> While on the subject of extracting info from struct scsi_cmnd
> I have noticed that scsi_cmnd::resid doesn't make it into
> sg_io_hdr::resid in the block layer SG_IO implementation.
> "rq->data_len" is put there instead and it invariably has a
> value of 0.
> 
> "struct request" does not have a 'resid' field which is defined
> as the number of bytes requested to be transferred less the actual
> number transferred.

->data_len is that value, after execution of the request. If rq->data_len
== 0 for a SCSI request that with residual bytes, then that's a bug.

-- 
Jens Axboe


  reply	other threads:[~2004-11-28  9:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-27 12:42 extracting infos from struct scsi_cmnd Tommaso Moroni
2004-11-27 15:48 ` Jens Axboe
2004-11-28  2:02   ` extracting resid " Douglas Gilbert
2004-11-28  9:12     ` Jens Axboe [this message]
2004-11-28 13:01       ` [PATCH] " Douglas Gilbert
2004-11-28 14:59         ` Jens Axboe

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=20041128091201.GA10485@suse.de \
    --to=axboe@suse.de \
    --cc=dougg@torque.net \
    --cc=linux-scsi@vger.kernel.org \
    /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.