linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Christie <michaelc@cs.wisc.edu>
To: dougg@torque.net
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: LLDD: scatterlists only?
Date: Mon, 15 Aug 2005 01:59:12 -0500	[thread overview]
Message-ID: <43003D40.3010602@cs.wisc.edu> (raw)
In-Reply-To: <43003471.5000108@torque.net>

Douglas Gilbert wrote:
> James Bottomley wrote:
> 
>>On Sun, 2005-08-14 at 16:24 -0700, Luben Tuikov wrote:
>>
>>
>>>Did someone have a patch or was there a talk
>>>that SCSI Core is moving towards sending _only_ scatterlists
>>>down to LLDDs?  (effectively BUG_ON(!cmd->use_sg))
>>
>>
>>Yes, you can already see the beginnings in the -mm tree.
>>
>>Jens is maintaining a block tree with this in here:
>>
>>http://www.kernel.org/git/?p=linux/kernel/git/axboe/linux-2.6-block.git;a=shortlog;h=rq-map
>>
>>And I have a scsi-block-2.6 tree based off this here:
>>
>>http://www.kernel.org/git/?p=linux/kernel/git/jejb/scsi-block-2.6.git;a=summary
>>
>>The missing (and frankly really nasty) pieces are pulling all the sg
>>handling out of sg and st, but fortunately Mike Christie is working on
>>that.
> 
> 
> James,
> 
> I haven't looked at what would be involved with the sg
> driver but it is good to hear Mike C. is working on it.
> 

I sent a patch to begin this the other day
http://marc.theaimsgroup.com/?l=linux-scsi&m=112356952007369&w=2

The patch is not complete. I have to add a bunch of stuff I ripped out 
like the security checks and mmap code. I also have to move some code to 
a scsi command like James did for the sync code. I am looking over st to 
try and figure out what to share right now.

One question though. For SG_DXFER_TO_FROM_DEV it looks like for the 
block layer SG_IO code only the write part of the command could get run. 
This is becuase in sg_io() the reading variable is never used so a 
copy_to_user (that is if we end up not being able to do direct IO) may 
never happen. What commands use SG_DXFER_TO_FROM_DEV, and do we need the 
read part (or did I misread the block layer code or have we just been 
getting lucky and been doing zero copy).

Also for the new interface the write and read will be the same size 
becuase we use dxfer_len, but for the old interface is the same true? 
 From looking at the sg driver it looks like there could be different 
values for the read and write part, but is that ever used or is it just 
extra tests. And again what commands do this, so I can test them?

Thanks

Mike

  reply	other threads:[~2005-08-15  6:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-14 23:24 LLDD: scatterlists only? Luben Tuikov
2005-08-14 23:51 ` James Bottomley
2005-08-15  0:08   ` Luben Tuikov
2005-08-15  6:21   ` Douglas Gilbert
2005-08-15  6:59     ` Mike Christie [this message]
2005-08-15 12:51       ` Douglas Gilbert
2005-08-15 10:17     ` Christoph Hellwig
  -- strict thread matches above, loose matches on Subject: below --
2005-08-14 22:22 Luben Tuikov

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=43003D40.3010602@cs.wisc.edu \
    --to=michaelc@cs.wisc.edu \
    --cc=James.Bottomley@SteelEye.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).