public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Christoph Hellwig <hch@lst.de>,
	borntraeger@de.ibm.com, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org
Subject: Re: [PATCH] virtio-blk: set QUEUE_ORDERED_DRAIN by default
Date: Tue, 25 Aug 2009 16:16:08 +0200	[thread overview]
Message-ID: <20090825141608.GA32658@lst.de> (raw)
In-Reply-To: <200908252341.38356.rusty@rustcorp.com.au>

On Tue, Aug 25, 2009 at 11:41:37PM +0930, Rusty Russell wrote:
> On Fri, 21 Aug 2009 06:26:16 am Christoph Hellwig wrote:
> > Currently virtio-blk doesn't set any QUEUE_ORDERED_ flag by default, which
> > means it does not allow filesystems to use barriers.  But the typical use
> > case for virtio-blk is to use a backed that uses synchronous I/O
> 
> Really?  Does qemu open with O_SYNC?
> 
> I'm definitely no block expert, but this seems strange...
> Rusty.

Qemu can open it various ways, but the only one that is fully safe
is O_SYNC (cache=writethrough).  The O_DIRECT (cache=none) option is also
fully safe with the above patch under some limited circumstances 
(disk write caches off and using a host device or fully allocated file).

Fixing the cache=writeback option and the majority case for cache=none
requires implementing a cache flush command, and for the latter one
also fixes to the host kernel I'm working on.  You will get another
patch to implement the proper cache controls in virtio-blk for me in
a couple of days, too.

  reply	other threads:[~2009-08-25 14:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-20 20:56 [PATCH] virtio-blk: set QUEUE_ORDERED_DRAIN by default Christoph Hellwig
2009-08-21  7:30 ` Christian Borntraeger
2009-08-25 14:11 ` Rusty Russell
2009-08-25 14:16   ` Christoph Hellwig [this message]
2009-08-26 12:06     ` Rusty Russell
2009-08-26 12:28       ` Avi Kivity
2009-08-27 10:43         ` Rusty Russell
2009-08-27 11:04           ` Avi Kivity
2009-08-28  1:15             ` Rusty Russell
2009-08-28  6:33               ` Avi Kivity
2009-08-27 17:06           ` Christoph Hellwig
2009-09-17 17:31 ` Christoph Hellwig
2009-09-22  6:27   ` Rusty Russell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090825141608.GA32658@lst.de \
    --to=hch@lst.de \
    --cc=borntraeger@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox