aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/cciss_scsi.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-08-24scsi: cciss: Drop obsolete driverHannes Reinecke1-1653/+0
The hpsa driver now has support for all boards the cciss driver used to support, so this patch removes the cciss driver and make hpsa an alias to cciss. Signed-off-by: Hannes Reinecke <hare@suse.com> Acked-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2017-02-22cciss: Remove kmalloc castTobin C. Harding1-2/+1
Coccinelle emits a warning about casting the return value of kmalloc(). Coccinelle suggests removing the cast as do kerneljanitors. Remove cast from kmalloc() call. Signed-off-by: Tobin C. Harding <me@tobin.cc> Acked-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Jens Axboe <axboe@fb.com>
2017-02-22cciss: Fix checkpatch OPEN_BRACETobin C. Harding1-10/+5
Checkpatch emits ERROR:OPEN_BRACE: that open brace { should be on the previous line. Move open brace to new line. Also add space after if/switch statement since we introduce more checkpatch errors if not fixed at the same time. Signed-off-by: Tobin C. Harding <me@tobin.cc> Acked-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Jens Axboe <axboe@fb.com>
2017-02-22cciss: Fix checkpatch TRAILING_WHITESPACETobin C. Harding1-85/+85
Checkpatch emits 85 trailing whitespace warnings. Remove trailing whitespace. Signed-off-by: Tobin C. Harding <me@tobin.cc> Acked-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Jens Axboe <axboe@fb.com>
2016-11-08scsi: cciss: replace custom function to hexdumpAndy Shevchenko1-62/+10
For small buffers we may use %*ph[N] specifier, for the bigger blocks print_hex_dump() call. Cc: Don Brace <don.brace@microsemi.com> Cc: esc.storagedev@microsemi.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Don Brace <don.brace@microsemi.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2015-05-31scsi: Do not set cmd_per_lun to 1 in the host templateHannes Reinecke1-1/+0
'0' is now used as the default cmd_per_lun value, so there's no need to explicitly set it to '1' in the host template. Signed-off-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <JBottomley@Odin.com>
2013-04-09cciss: switch to ->show_info()Al Viro1-51/+45
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2012-09-18cciss: fix handling of protocol errorStephen M. Cameron1-0/+1
If a command completes with a status of CMD_PROTOCOL_ERR, this information should be conveyed to the SCSI mid layer, not dropped on the floor. Unlike a similar bug in the hpsa driver, this bug only affects tape drives and CD and DVD ROM drives in the cciss driver, and to induce it, you have to disconnect (or damage) a cable, so it is not a very likely scenario (which would explain why the bug has gone undetected for the last 10 years.) Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-08-21cciss: fix incorrect scsi status reportingStephen M. Cameron1-10/+1
Delete code which sets SCSI status incorrectly as it's already been set correctly above this incorrect code. The bug was introduced in 2009 by commit b0e15f6db111 ("cciss: fix typo that causes scsi status to be lost.") Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Reported-by: Roel van Meer <roel.vanmeer@bokxing.nl> Tested-by: Roel van Meer <roel.vanmeer@bokxing.nl> Cc: Jens Axboe <axboe@kernel.dk> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-22cciss: Fix scsi tape io with more than 255 scatter gather elementsStephen M. Cameron1-1/+1
The total number of scatter gather elements in the CISS command used by the scsi tape code was being cast to a u8, which can hold at most 255 scatter gather elements. It should have been cast to a u16. Without this patch the command gets rejected by the controller since the total scatter gather count did not add up to the right value resulting in an i/o error. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
2012-03-22cciss: Initialize scsi host max_sectors for tape drive supportStephen M. Cameron1-0/+1
The default is too small (1024 blocks), use h->cciss_max_sectors (8192 blocks) Without this change, if you try to set the block size of a tape drive above 512*1024, via "mt -f /dev/st0 setblk nnn" where nnn is greater than 524288, it won't work right. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-11-16cciss: auto engage SCSI mid layer at driver load timeStephen M. Cameron1-0/+1
A long time ago, probably in 2002, one of the distros, or maybe more than one, loaded block drivers prior to loading the SCSI mid layer. This meant that the cciss driver, being a block driver, could not engage the SCSI mid layer at init time without panicking, and relied on being poked by a userland program after the system was up (and the SCSI mid layer was therefore present) to engage the SCSI mid layer. This is no longer the case, and cciss can safely rely on the SCSI mid layer being present at init time and engage the SCSI mid layer straight away. This means that users will see their tape drives and medium changers at driver load time without need for a script in /etc/rc.d that does this: for x in /proc/driver/cciss/cciss* do echo "engage scsi" > $x done However, if no tape drives or medium changers are detected, the SCSI mid layer will not be engaged. If a tape drive or medium change is later hot-added to the system it will then be necessary to use the above script or similar for the device(s) to be acceesible. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-07-26atomic: use <linux/atomic.h>Arun Sharma1-1/+1
This allows us to move duplicated code in <asm/atomic.h> (atomic_inc_not_zero() for now) to <linux/atomic.h> Signed-off-by: Arun Sharma <asharma@fb.com> Reviewed-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: David Miller <davem@davemloft.net> Cc: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-05-06cciss: add cciss_tape_cmds module paramterStephen M. Cameron1-18/+23
This is to allow number of commands reserved for use by SCSI tape drives and medium changers to be adjusted at driver load time via the kernel parameter cciss_tape_cmds, with a default value of 6, and a range of 2 - 16 inclusive. Previously, the driver limited the number of commands which could be queued to the SCSI half of the the driver to only 2. This is to fix the problem that if you had more than two tape drives, you couldn't, for example, erase or rewind them all at the same time. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-03-12Revert "cciss: Add missing allocation in scsi_cmd_stack_setup and corresponding deallocation"Jens Axboe1-9/+0
This reverts commit 978eb516a4e1a1b47163518d6f5d5e81ab27a583. The commit was broken, relying on other changes that have not been committed yet. Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-03-12cciss: fix missed command status value CMD_UNABORTABLEStephen M. Cameron1-2/+11
and fix a nearby typo, "do" that should have been "due" Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2011-03-11cciss: Add missing allocation in scsi_cmd_stack_setup and corresponding deallocationStephen M. Cameron1-0/+9
This bit got lost somewhere along the way. Without this, panic. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Cc: stable@kernel.org Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-11-16SCSI host lock push-downJeff Garzik1-3/+5
Move the mid-layer's ->queuecommand() invocation from being locked with the host lock to being unlocked to facilitate speeding up the critical path for drivers who don't need this lock taken anyway. The patch below presents a simple SCSI host lock push-down as an equivalent transformation. No locking or other behavior should change with this patch. All existing bugs and locking orders are preserved. Additionally, add one parameter to queuecommand, struct Scsi_Host * and remove one parameter from queuecommand, void (*done)(struct scsi_cmnd *) Scsi_Host* is a convenient pointer that most host drivers need anyway, and 'done' is redundant to struct scsi_cmnd->scsi_done. Minimal code disturbance was attempted with this change. Most drivers needed only two one-line modifications for their host lock push-down. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Acked-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-08-07cciss: change printks to dev_warn, etc.Stephen M. Cameron1-85/+74
cciss: change printks to dev_warn, etc. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-08-07cciss: separate cmd_alloc() and cmd_special_alloc()Stephen M. Cameron1-4/+6
cciss: separate cmd_alloc() and cmd_special_alloc() cmd_alloc() took a parameter which caused it to either allocate from a pre-allocated pool, or allocate using pci_alloc_consistent. This parameter is always known at compile time, so this would be better handled by breaking the function into two functions and differentiating the cases by function names. Same goes for cmd_free(). Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-08-07cciss: use consistent variable namesStephen M. Cameron1-303/+288
cciss: use consistent variable names "h", for the hba structure and "c" for the command structures. and get rid of trivial CCISS_LOCK macro. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-08-07cciss: Set the performant mode bit in the scsi half of the driverStephen M. Cameron1-18/+2
cciss: Set the performant mode bit in the scsi half of the driver In a couple of places, the performant mode bit wasn't being set in the scsi half of the driver, causing commands to seem to hang. Use enqueue_cmd_and_start_io() where appropriate. This fixes a bug that echo engage scsi > /proc/driver/cciss/cciss0 would hang. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-08-07cciss: remove errant debug codeMike Miller1-2/+0
Remove a debug statement left behind by accident Ths debug statement got left behind. It was commented out after use but not deleted. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-08-07cciss: add performant mode support for Stars/SiriusMike Miller1-2/+4
Add a mode of controller operation called Performant Mode. Even though cciss has been deprecated in favor of hpsa there are new controllers due out next year that HP must support in older vendor distros. Vendors require all fixes/features be upstream. These new controllers support only 16 commands in simple mode but support up to 1024 in performant mode. This requires us to add this support at this late date. The performant mode transport minimizes host PCI accesses by performinf many completions per read. PCI writes are posted so the host can write then immediately get off the bus not waiting for the writwe to complete to the target. In the context of performant mode the host read out to a controller pulls all posted writes into host memory ensuring the reply queue is coherent. Signed-off-by: Mike Miller <mike.miller@hp.com> Cc: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-15cciss: set SCSI max cmd len to 16, as default is wrongStephen M. Cameron1-0/+1
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Cc: Mike Miller <mikem@beardog.cce.hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-06-01cciss: call BUG() earlierDan Carpenter1-1/+1
I moved the range check after the increment. The current code would write past the end of the array once before calling BUG(). Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
2010-02-28cciss: Fix problem with scatter gather elements in the scsi half of the driverStephen M. Cameron1-26/+59
cciss: Fix problem with scatter gather elements in the scsi half of the driver When support for more than 31 scatter gather elements was added to the block half of the driver, the SCSI half of the driver was not addressed, and the bump from 31 to 32 scatter gather elements in the command block itself (not chained) actually broke the SCSI half of the driver, so that any transfer requiring 32 scatter gather elements wouldn't work. This fix also increases the max transfer size and size of the scatter gather table to the limit supported by the controller Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2010-02-28cciss: eliminate unnecessary pointer use in cciss scsi codeStephen M. Cameron1-16/+15
cciss: eliminate unnecessary pointer use in cciss scsi code An extra level of indirection was being used in some places for no real reason. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2010-02-28cciss: do not use void pointer for scsi hba dataStephen M. Cameron1-13/+10
cciss: do not use void pointer for scsi hba data and get rid of related unnecessary type casting and delete some superfluous and misleading comments nearby. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2010-02-28cciss: detect bad alignment of scsi commands at build timeStephen M. Cameron1-4/+8
cciss: detect bad alignment of scsi commands at build time Incidentally fix some nearby c++ style comments. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-13cciss: Fix weird usage of ENXIO in cciss_scsi.cStephen M. Cameron1-1/+1
cciss: Fix weird usage of ENXIO in cciss_scsi.c Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-11-13cciss: fix typo that causes scsi status to be lost.Stephen M. Cameron1-1/+1
cciss: fix typo that causes scsi status to be lost. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-06-09cciss: decode unit attention in SCSI error handling codescameron@beardog.cca.cpqcorp.net1-7/+16
Make SCSI reset error handler decode unit attention ASC and after a target reset wait for a unit attention that indicates a reset occurred rather than just for any old unit attention. Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-06-09cciss: change SCSI error handling routines to work with interrupts enabled.scameron@beardog.cca.cpqcorp.net1-15/+9
Change cciss scsi error handling routines to work with interrupts enabled. Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-06-09cciss: simplify interface of sendcmd() and sendcmd_withirq()scameron@beardog.cca.cpqcorp.net1-22/+4
Simplify interfaces of sendcmd() and sendcmd_withirq() so that they provide only one way to address commands instead of three ways. Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-06-09cciss: Use schedule_timeout_uninterruptible in SCSI error handling codescameron@beardog.cca.cpqcorp.net1-1/+1
Use schedule_timeout_uninterruptible instead of schedule_timeout in the scsi error handling code when waiting between TUR polls since we are not interested in nor want to be interrupted by signals. Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-06-02cciss: use schedule_timeout_interruptible()Andrew Morton1-2/+1
Use schedule_timeout_interruptible() instead of open-coding the set and schedule parts. Cc: Mike Miller <mikem@beardog.cca.cpqcorp.net> Cc: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2009-06-02cciss: fix SCSI device reset handlerStephen M. Cameron1-6/+79
Fix the SCSI reset error handler to send a working, properly addressed reset message to the target device and add code to wait for the target device to become ready by polling it with Test Unit Ready. The existing reset code was broken in that it didn't bother to set the 8-byte LUN address to anything besides zero, so the command was addressed to the controller, which pretended to the driver that the command succeeded, while doing nothing. Ages ago I tested this code, but unbeknownst to me, my test was flawed, and what I thought was a tape drive getting reset was actually nothing of the sort. Unfortunately, there is still lots of Smartarray firmware that doesn't handle doing target resets right, and this code won't help in those cases, but it also shouldn't make things worse in those cases than they already are. Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net> Cc: Mike Miller <mikem@beardog.cca.cpqcorp.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-10-09cciss: Fix cciss SCSI rescan code to better notice device changesscameron@beardog.cca.cpqcorp.net1-53/+98
Fix cciss SCSI rescan code to better notice device changes. If you hot-unplug a tape drive, then hot-plug a different tape drive into the same slot in a storage enclosure, the cciss driver wouldn't notice anything had changed, as it was only looking at the LUN address and device type. Now it looks at the inquiry page 0x83 device identifier, and vendor and model strings as well. Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-08-06cciss: add support for multi lun tape devicesMike Miller1-3/+37
This patch adds support for multi-lun devices in a SAS environment. It's required for the support of media changers. Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net> Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-08-06cciss: change the way we notify scsi midlayer of tape drivesMike Miller1-39/+118
This patch changes way we notify the scsi layer that something has changed on the SCSI tape side of the driver. The user can now just tell the driver to rescan a particular controller rather than having to know the SCSI nexus to echo into the SCSI mid-layer. Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net> Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-04-21cciss: fix warning oops on rmmod of driverscameron@beardog.cca.cpqcorp.net1-1/+1
* Fix oops on cciss rmmod due to calling pci_free_consistent with irqs disabled. Signed-off-by: Stephen M. Cameron <scameron@beardog.cca.cpqcorp.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-03-04resubmit: cciss: procfs updates to display info about manyMike Miller1-7/+3
volumes This patch allows us to display information about all of the logical volumes configured on a particular controller without stepping on memory even when there are many volumes (128 or more) configured. Please consider this for inclusion. Signed-off-by: Mike Miller <mike.miller@hp.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-02-03drivers/block/: Spelling fixesJoe Perches1-2/+2
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-29cciss: update copyright noticesMike Miller1-7/+7
This patch updates the copyright information for the cciss driver. It includes extending the year to 2007 (how timely) and some minor corrections deemed necessary by HP legal and the Open Source Review Board. Please consider this patch for inclusion. Signed-off-by: Mike Miller <mike.miller@hp.com> -------------------------------------------------------------------------------- Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-05-29[SCSI] cciss: convert to use the data buffer accessorsFUJITA Tomonori1-53/+22
- remove the unnecessary map_single path. - convert to use the new accessors for the sg lists and the parameters. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Mike Miller <Mike.Miller@hp.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-05-08cciss: include scsi/scsi.h unconditionallyStephen Cameron1-1/+0
Make cciss unconditionally include scsi/scsi.h, because of the use of SCSI_IOCTL_GET_IDLUN and SCSI_IOCTL_GET_BUS_NUMBER. Signed-off-by: Stephen M. Cameron <steve.cameron@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-10-01[PATCH] completions: lockdep annotate on stack completionsPeter Zijlstra1-1/+1
All on stack DECLARE_COMPLETIONs should be replaced by: DECLARE_COMPLETION_ONSTACK Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-08-06[SCSI] Improve inquiry printingMatthew Wilcox1-9/+5
- Replace scsi_device_types array API with scsi_device_type function API. Gets rid of a lot of common code, as well as being easier to use. - Add the new device types in SPC4 r05a, and rename some of the older ones. - Reformat the printing of inquiry data; now fits on one line and includes PQ. I think I've addressed all the feedback from the previous versions. My current test box prints: scsi 2:0:1:0: Direct access HP 18.2G ATLAS10K3_18_SCA HP05 PQ: 0 ANSI: 2 Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-06[SCSI] fix up request buffer reference in various scsi driversChristoph Hellwig1-3/+3
Various scsi drivers use scsi_cmnd.buffer and scsi_cmnd.bufflen in their queuecommand functions. Those fields are internal storage for the midlayer only and are used to restore the original payload after request_buffer and request_bufflen have been overwritten for EH. Using the buffer and bufflen fields means they do very broken things in error handling. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>