linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC/RFT 0/4] convert st and sg to always use scatterlists
@ 2005-09-14 22:19 Mike Christie
  0 siblings, 0 replies; only message in thread
From: Mike Christie @ 2005-09-14 22:19 UTC (permalink / raw)
  To: linux-scsi

The following patches convert sg and st to always use scatterlists. The
patches were made against scsi-rc-fixes, but I am not asking for them to
merged there as they need a lot of testing. The only thing that is not
supported is HighMem with st DIO (sg does not look like it supported
HighMem with DIO). You do get bounce buffer capabilities for all other
cases though so the upper layer drivers do not have to worry about some
queue limits.

These patches are not the great cleanups I had planned to do originally.
I have wanted to:
1. convert ULDs to always use scatterlists
2. cleanup scsi_request usage.
3. move the ULDs to use block layer functions for buffer creation and
copy_to_user or direct io functionality since they duplicate it in the
drivers.

The problem is that  sg and st do large requests by allocating a
contigous block of pages (they also will reserve these buffers). To
support this the patches allow them to continue to allocating their
large buffers then pass them to a block layer helper blk_rq_map_kern_iov
which adds the pages to bios, then if needed adds multiple bios to a
request. The reason for the mutliple bios code is becuase a bio is
limited by the queue limits but also the BIO_MAX_PAGES.

In the end, I would like to consolodate the sg and st's buffer/iovec
management code and convert them to use the block layer's
blk_rq_map_usr* functions (sg's mmap code would still have to use this
new blk_rq_map_kern_iov helper as far as I can tell so that function and
these patches are somewhat useful).

The sg patch has been lightly tested by running the sg_utils programs
over it. I need to do some more testing. I am posting becuase I am
not sure if this incremental update is better, or if you guys want
all the answers solved at once? With these patches, just cpqfc, gdth and
osst need to be cleaned up.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-09-14 22:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-14 22:19 [PATCH RFC/RFT 0/4] convert st and sg to always use scatterlists Mike Christie

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).