public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Pete Wyckoff <pw@osc.edu>
To: Mike Christie <michaelc@cs.wisc.edu>
Cc: Douglas Gilbert <dougg@torque.net>,
	linux-scsi@vger.kernel.org, fujita.tomonori@lab.ntt.co.jp,
	jens.axboe@oracle.com
Subject: Re: SCSI Generic version 4 interface, release 1.2
Date: Sun, 18 Mar 2007 13:48:31 -0400	[thread overview]
Message-ID: <20070318174831.GA21027@osc.edu> (raw)
In-Reply-To: <45FC7623.8080305@cs.wisc.edu>

michaelc@cs.wisc.edu wrote on Sat, 17 Mar 2007 18:13 -0500:
> Pete Wyckoff wrote:
> > dougg@torque.net wrote on Wed, 14 Mar 2007 12:18 -0400:
> >> After reviewing this post by Pete Wyckoff:
> >> http://marc.theaimsgroup.com/?l=linux-scsi&m=117278879816029&w=2
> >>
> >> I decided to update my sg v4 interface document originally
> >> posted 20061106 which I will now call release 1.1 :
> >> http://lwn.net/Articles/208082/
> >>
> >> Pete was proposing to put back din_iovec_count and
> >> dout_iovec_count that had been dropped out of bsg but
> >> had been in release 1.1 . Hmm.
> >>
> >> Some other items have been picked up from the bsg
> >> implementation plus the suggestion from LSF'07 to
> >> add dout_resid.
> >>
> >> See the attachment, comments welcome.
> > 
> > Do you want to define the iovec format too?  As I commented in my
> > patch, v3 sg_iovec has pointers with 32/64-bit issues.  Would be
> > nice to see you declare v4 sg_iovec as pure u64.  (By the way, don't
> > use the patch:  casting from the new to the old can put junk in the
> > top half of the 64-bit sg_iovec.iov_len).
> > 
> > Another issue I wonder about is queue DMA alignment.  In bsg,
> > blk_rq_map_user will use a bounce buffer if the user-supplied start
> > and end addresses are not aligned.  sg will happily map user pages
> > at any offset without checking, although I haven't checked if Mike's
> > patches change this.  ll_rw_blk.c says regarding blk_rq_map_user:
> 
> Currently and before any of my patches, sg checked the start
>         if (((unsigned long)hp->dxferp &
>                         queue_dma_alignment(sdev->request_queue)) != 0)
> It did not check the start and end like blk_rq_map_user.
> 
> With my updated patches, blk_rq_map_user is just checking the start.
> There was a thread about not checking the end on linux-scsi. I will try
> to dig it up. A couple kernels ago the bio map helpers were modified to
> only check the start.

Oh, I missed that.  There's this thread about USB needing end
alignment too, on all but the last iovec entry:

    http://thread.gmane.org/gmane.linux.usb.devel/16230/focus=16409

		-- Pete

  reply	other threads:[~2007-03-18 17:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-14 16:18 SCSI Generic version 4 interface, release 1.2 Douglas Gilbert
2007-03-17 21:15 ` Pete Wyckoff
2007-03-17 23:13   ` Mike Christie
2007-03-18 17:48     ` Pete Wyckoff [this message]
2007-03-19 10:49 ` FUJITA Tomonori

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=20070318174831.GA21027@osc.edu \
    --to=pw@osc.edu \
    --cc=dougg@torque.net \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=jens.axboe@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michaelc@cs.wisc.edu \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox