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

Re: Problems with SG_IO ioctls on sd device (verses sg device)



On Wed, 2005-01-26 at 11:40 +1100, Burn Alting wrote:
> All,
> 
> I need help. I am using ftp.kernel.org's linux-2.6.10 on a Fedora
> Core 3 system. I eventually want my code to work on a 'clean'
> Fedora Core system, but I have put the ftp.kernel.org's kernel
> up so I can cross-test the same devices with /dev/sgX.
> 
> I have a problem when I use /dev/sdX as opposed to /dev/sgX (eg /dev/sda
> compared to /dev/sg0). I am setting up SCSI write commands of arbitrary
> size, in an sg_io_hdr_t and sending the command to the device with a
> SG_IO ioctl call. I am using a LSI Logic LSIFC929 as the HBA in a Dual
> Xeon server and a raid as the target. I can issue writes up to 2048
> blocks in size to /dev/sg0 but when I write this many to /dev/sda (with
> the same code), it fails.

this is a bug in /dev/sg0; it accepts data bigger than the device
advertised it could take. The result is that it either sends it anyway
(which may well blow up) or silently splits it up internally (at which
point you should wonder if your app shouldn't be the one splitting it
up)

Attachment: signature.asc
Description: This is a digitally signed message part


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