All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: dougg@torque.net
Cc: jens.axboe@oracle.com, linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/2] completely convert sg to block layer helpers
Date: Fri, 09 Feb 2007 13:53:29 -0600	[thread overview]
Message-ID: <45CCD139.9000500@cs.wisc.edu> (raw)
In-Reply-To: <45CCD03D.2030509@cs.wisc.edu>

Mike Christie wrote:
> Mike Christie wrote:
>> any missing functionality. I am still testing the patch. I have not
>> tested some of the older sg interfaces
> 
> I am pretty sure (100% :)), that I messed up the old interface handling.
> 
>> -
>> -static int
>> -sg_write_xfer(Sg_request * srp)
>> -{
>> -	sg_io_hdr_t *hp = &srp->header;
>> -	Sg_scatter_hold *schp = &srp->data;
>> -	struct scatterlist *sg = schp->buffer;
>> -	int num_xfer = 0;
>> -	int j, k, onum, usglen, ksglen, res;
>> -	int iovec_count = (int) hp->iovec_count;
>> -	int dxfer_dir = hp->dxfer_direction;
>> -	unsigned char *p;
>> -	unsigned char __user *up;
>> -	int new_interface = ('\0' == hp->interface_id) ? 0 : 1;
>> -
>> -	if ((SG_DXFER_UNKNOWN == dxfer_dir) || (SG_DXFER_TO_DEV == dxfer_dir) ||
>> -	    (SG_DXFER_TO_FROM_DEV == dxfer_dir)) {
>> -		num_xfer = (int) (new_interface ? hp->dxfer_len : hp->flags);
>> -		if (schp->bufflen < num_xfer)
>> -			num_xfer = schp->bufflen;
> 
> In sg_write_xfer here, for the old interface is it valid to have
> hp->dxfer_len greater than hp->flags, then have sg_read_oxfer get
> num_read_xfer that is not equal to hp->dxfer_len?

Could num_read_xfer would also not be equal to hp->flags, so three
different values?

  reply	other threads:[~2007-02-09 19:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-09  8:34 [PATCH 2/2] completely convert sg to block layer helpers Mike Christie
2007-02-09 19:49 ` Mike Christie
2007-02-09 19:53   ` Mike Christie [this message]
2007-02-09 21:08     ` 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=45CCD139.9000500@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=dougg@torque.net \
    --cc=jens.axboe@oracle.com \
    --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.