From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH, RFC] virtio_blk: add cache flush command Date: Tue, 12 May 2009 09:26:27 +0200 Message-ID: <20090512072627.GC5627@lst.de> References: <20090511083908.GB20082@lst.de> <4A083B7C.1000703@codemonkey.ws> <20090511154046.GA4226@lst.de> <4A085471.40809@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , Rusty Russell , kvm@vger.kernel.org To: Anthony Liguori Return-path: Received: from verein.lst.de ([213.95.11.210]:44928 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752721AbZELH0g (ORCPT ); Tue, 12 May 2009 03:26:36 -0400 Content-Disposition: inline In-Reply-To: <4A085471.40809@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, May 11, 2009 at 11:38:09AM -0500, Anthony Liguori wrote: > >Right now it doesn't, but it probably should. > > > > So then with cache=writeback, fsync behaves itself but O_DIRECT writes > do not. Right now O_DIRECT does not do an explicit cache flush, but due to the way barriers are implemented in Linux we do get the cache flush as part of the metadata updates after I/O completion. > fsync is pretty crappy on ext3 default configs. I'm concerned that this > could be considered a DoS by a malicious guest. If it sat in a T_FLUSH > loop, it would potentially bring your system to a crawl, no? It's exactly the same effect as a regular user doing fsync in a loop, whatever that causes on ext3.