From owner-freebsd-hackers@FreeBSD.ORG Sun Apr 25 05:39:35 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE70C106564A for ; Sun, 25 Apr 2010 05:39:35 +0000 (UTC) (envelope-from delphij@gmail.com) Received: from mail-px0-f182.google.com (mail-px0-f182.google.com [209.85.212.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9430D8FC0C for ; Sun, 25 Apr 2010 05:39:35 +0000 (UTC) Received: by pxi17 with SMTP id 17so1359119pxi.13 for ; Sat, 24 Apr 2010 22:39:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=1b7ozL8uRZoR1GB2FMNN8KUbSY/U7UTGmk6b1kKtUj8=; b=clZ77PXnKY1lh/47Ha2nPYt1gwI9w+fJzVg6Aup0kVhCb27S/z5jNxVw4sHke/ji17 7IxpHbNkzQyCggdqr0vdkvbV25DTfbdjCk7WjQW+kZ1DvtuwzxiaDpGL7eoHnFtJgNfm SuOM+ZjmHgH70FQUJfNVu/JIDeiF3T6tEQScM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=PJFqDm58u9HASDJ20zsKCI9P8EFexUBczpR0oEtYAHphOGBDrFc/9xcTmhT0Ea0BJf z32LvHPWjUAcMOhMgAdd4pe9oAdbzXeNA4pBPli6iByt4HCBHoB/WOYTwgNoJqaaq/zM uYjdZWpIDPNz1dbsRjl23PNbpTkuRyDeVP0i0= MIME-Version: 1.0 Received: by 10.141.91.13 with SMTP id t13mr2011860rvl.266.1272173966163; Sat, 24 Apr 2010 22:39:26 -0700 (PDT) Received: by 10.140.169.10 with HTTP; Sat, 24 Apr 2010 22:39:26 -0700 (PDT) In-Reply-To: <20100425032047.GA89136@les.ath.cx> References: <20100425032047.GA89136@les.ath.cx> Date: Sat, 24 Apr 2010 22:39:26 -0700 Message-ID: From: Xin LI To: YONETANI Tomokazu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@freebsd.org Subject: Re: BIO_FLUSH and ips(4) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Apr 2010 05:39:35 -0000 Hi, On Sat, Apr 24, 2010 at 8:20 PM, YONETANI Tomokazu w= rote: > Hello. > > The ServeRAID driver, or ips(4), seems to distinguish read or write reque= sts > with a macro called ips_read_request(), which is defined as > > =C2=A0#define ips_read_request(iobuf) =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 ((iobuf)->bio_cmd =3D=3D BIO_READ) > > in its strategy routine and a few other places. =C2=A0So when the request= is > BIO_FLUSH, the ips driver issues a write command (IPS_WRITE_CMD) with > length =3D=3D 0, right? > > My question is, do ServeRAID controllers treat 0-byte write command > as a sync-to-disk request, or is there any command for that purpose? > There's a command called IPS_CACHE_FLUSH_CMD defined in ipsreg.h, > but it's not used anywhere in the normal code path. It seems Linux driver is using it (on shutdown/reset) but I'm not sure if this would have some side effect, etc.? Cheers, --=20 Xin LI http://www.delphij.net