From owner-freebsd-questions@FreeBSD.ORG Thu Jun 12 11:43:03 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 22FE337B404 for ; Thu, 12 Jun 2003 11:43:03 -0700 (PDT) Received: from mail.allocity.com (exchange.allocity.com [65.90.51.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BAE143F75 for ; Thu, 12 Jun 2003 11:43:00 -0700 (PDT) (envelope-from bbawn@allocity.com) Received: from allocity.com ([10.105.2.29]) by mail.allocity.com with Microsoft SMTPSVC(5.0.2195.5329); Thu, 12 Jun 2003 12:42:58 -0600 Message-ID: <3EE8C998.10608@allocity.com> Date: Thu, 12 Jun 2003 12:42:32 -0600 From: Bob Bawn User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-us MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 12 Jun 2003 18:42:58.0490 (UTC) FILETIME=[71CC69A0:01C33112] Subject: problem with large aio_write()s to raw device with Compaq ciss driver X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jun 2003 18:43:03 -0000 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: on pcib0 Jun 6 10:00:16 queso /kernel: ciss0: 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 Jun 6 10:00:16 queso /kernel: ciss0: active I/O method 0x3 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 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@allocity.com