[PATCH RFC/RFT 0/4] convert st and sg to always use scatterlists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux