problem with large aio_write()s to raw device with Compaq ciss
driver
Bob Bawn
bbawn at allocity.com
Thu Jun 12 11:43:03 PDT 2003
Hello,
I am running FreeBSD 4.7 on a Compaq DL 380 with a Compaq Smart Array
5i.
My application accesses a raw device (e.g. /dev/da0s1g) using
aio_write(2).
aio_writes of buffers larger than 224 (512-byte) blocks fail with EIO.
This works on various other hardware configurations (Dell RAID, SCSI
disk, IDE disk, etc.) so I suspect the ciss driver.
Synchronous (write(2)) writes larger than 224 blocks to the raw device
succeed.
aio_writes to normal files succeed.
Glancing through the ciss source, I noticed that 224 * 512 = 28 * 4096
where 28 is CISS_COMMAND_SG_LENGTH (the max number of scatter/gather per
command??). So maybe the write fails if the s/g vector doesn't fit in
a single command? (I am a non-expert in this area, so this is
speculative...)
I could maybe understand aio_write returning a partial successful write
here but EIO seems pretty harsh.
It's seems possible that I have something mis-configured. Here are the
boot messages from ciss:
Jun 6 10:00:16 queso /kernel: pci0: <PCI bus> on pcib0
Jun 6 10:00:16 queso /kernel: ciss0: <Compaq Smart Array 5i> port
0x2000-0x20ff mem 0xf5ef0000-0xf5ef3fff,0xf7ec0000-0xf7efffff irq 3 at
device 1.0 on pci0
Jun 6 10:00:16 queso /kernel: ciss0: using 256 of 1024 available
commands
Jun 6 10:00:16 queso /kernel: ciss0: 3 logical drives configured
Jun 6 10:00:16 queso /kernel: ciss0: firmware 1.92
Jun 6 10:00:16 queso /kernel: ciss0: 2 SCSI channels
Jun 6 10:00:16 queso /kernel: ciss0: signature 'CISS'
Jun 6 10:00:16 queso /kernel: ciss0: valence 1
Jun 6 10:00:16 queso /kernel: ciss0: supported I/O methods
0xe<simple,performant,MEMQ>
Jun 6 10:00:16 queso /kernel: ciss0: active I/O method 0x3<simple>
Jun 6 10:00:16 queso /kernel: ciss0: 4G page base 0x00000000
Jun 6 10:00:16 queso /kernel: ciss0: interrupt coalesce delay 1000us
Jun 6 10:00:16 queso /kernel: ciss0: interrupt coalesce count 16
Jun 6 10:00:16 queso /kernel: ciss0: max outstanding commands 1024
Jun 6 10:00:16 queso /kernel: ciss0: bus types 0x2<ultra3>
Jun 6 10:00:16 queso /kernel: ciss0: server name ''
Jun 6 10:00:16 queso /kernel: ciss0: heartbeat 0x10000033
Jun 6 10:00:16 queso /kernel: ciss0: 3 logical drives
Jun 6 10:00:16 queso /kernel: ciss0: logical drive 0: RAID 5, 92160MB
online
Jun 6 10:00:16 queso /kernel: ciss0: logical drive 1: RAID 5, 92160MB
online
Jun 6 10:00:16 queso /kernel: ciss0: logical drive 2: RAID 5, 92160MB
online
Thanks,
Bob Bawn
bbawn at allocity.com
More information about the freebsd-questions
mailing list