From: Christian Borntraeger Subject: Re: [PATCH, RFC] virtio_blk: add cache flush command Date: Tue, 12 May 2009 16:18:36 +0200 Message-ID: <200905121618.36104.borntraeger@de.ibm.com> References: <20090511083908.GB20082@lst.de> <200905122324.14970.rusty@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Christoph Hellwig , kvm@vger.kernel.org To: Rusty Russell Return-path: Received: from mtagate4.uk.ibm.com ([195.212.29.137]:47860 "EHLO mtagate4.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751914AbZELOSj (ORCPT ); Tue, 12 May 2009 10:18:39 -0400 Received: from d06nrmr1806.portsmouth.uk.ibm.com (d06nrmr1806.portsmouth.uk.ibm.com [9.149.39.193]) by mtagate4.uk.ibm.com (8.14.3/8.13.8) with ESMTP id n4CEIbBX021596 for ; Tue, 12 May 2009 14:18:37 GMT Received: from d06av04.portsmouth.uk.ibm.com (d06av04.portsmouth.uk.ibm.com [9.149.37.216]) by d06nrmr1806.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4CEIbO13231788 for ; Tue, 12 May 2009 15:18:37 +0100 Received: from d06av04.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av04.portsmouth.uk.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4CEIaKm010380 for ; Tue, 12 May 2009 15:18:37 +0100 In-Reply-To: <200905122324.14970.rusty@rustcorp.com.au> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Am Tuesday 12 May 2009 15:54:14 schrieb Rusty Russell: > On Mon, 11 May 2009 06:09:08 pm Christoph Hellwig wrote: > > Do we need a new feature flag for this command or can we expect that > > all previous barrier support was buggy enough anyway? > > You mean reuse the VIRTIO_BLK_F_BARRIER for this as well? Seems fine. > > AFAIK only lguest offered that, and lguest has no ABI. Best would be to > implement VIRTIO_BLK_T_FLUSH as well; it's supposed to be demo code, and it > should be easy). It is also used by kuli (http://www.ibm.com/developerworks/linux/linux390/kuli.html) and kuli used fdatasync. Since kuli is on offical webpages it takes a while to update that code. When you reuse the VIRTIO_BLK_F_BARRIER flag, that would trigger some VIRTIO_BLK_T_FLUSH commands sent to the kuli host, right? I think the if/else logic of kuli would interpret that as a read request....I am voting for a new feature flag :-) Christian