qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Alexander Graf <agraf@suse.de>, qemu-devel@nongnu.org, avi@redhat.com
Subject: Re: [Qemu-devel] [PATCH 0/2] block: Write out internal caches even with cache=unsafe
Date: Mon, 24 Oct 2011 10:54:52 +0200	[thread overview]
Message-ID: <4EA527DC.90902@redhat.com> (raw)
In-Reply-To: <4EA5262D.7090901@redhat.com>

Am 24.10.2011 10:47, schrieb Paolo Bonzini:
> On 10/24/2011 10:17 AM, Kevin Wolf wrote:
>>>  I think it's not about "why is it there", but rather about "what is it
>>>  useful for".  My interpretation of it is "I do not need the image
>>>  anymore unless the command exits cleanly": VM installations, qemu-img
>>>  conversions, BDRV_O_SNAPSHOT (doesn't do it yet, but it could).  Even
>>>  SIGINT and SIGTERM would be excluded from this definition, but they cost
>>>  nothing so it's nice to include them.
>>
>> I think another common interpretation is: "I don't run this VM in
>> production but for development. I want the VM to go faster and I can
>> recreate the image in the unlikely event that power fails during my
>> work. But it certainly would be nasty."
> 
> Fair enough.
> 
>> But I think that starting to make exceptions for single block drivers
>> isn't a good idea anyway. If we want bdrv_flush() to write out all
>> metadata internal to qemu, I think the approach with checking the flag
>> in drivers calling things like fsync() is better. The common thing is to
>> do the flush.
> 
> I don't know... checking BDRV_O_NO_FLUSH in the drivers rather than in 
> the generic code sounds like a layering violation.  Perhaps what you're 
> after is a separation of bdrv_co_flush from bdrv_{,co_,aio_}fsync?  Then 
> BDRV_O_NO_FLUSH (better renamed to BDRV_O_NO_FSYNC...) would only 
> inhibit the latter.

Why? All other cache related BDRV_O_* flags are interpreted by the block
drivers, so why should BDRV_O_NO_FLUSH be special?

Kevin

  reply	other threads:[~2011-10-24  8:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21 17:08 [Qemu-devel] [PATCH 0/2] block: Write out internal caches even with cache=unsafe Kevin Wolf
2011-10-21 17:08 ` [Qemu-devel] [PATCH 1/2] raw-posix: Convert to bdrv_co_flush Kevin Wolf
2011-10-21 17:08 ` [Qemu-devel] [PATCH 2/2] block: Handle cache=unsafe only in raw-posix/win32 Kevin Wolf
2011-10-21 18:44 ` [Qemu-devel] [PATCH 0/2] block: Write out internal caches even with cache=unsafe Paolo Bonzini
2011-10-22 15:07   ` Alexander Graf
2011-10-23 14:33     ` Paolo Bonzini
2011-10-24  8:05       ` Kevin Wolf
2011-10-24  7:37   ` Kevin Wolf
2011-10-24  7:53     ` Paolo Bonzini
2011-10-24  8:17       ` Kevin Wolf
2011-10-24  8:47         ` Paolo Bonzini
2011-10-24  8:54           ` Kevin Wolf [this message]
2011-10-24  9:26             ` Paolo Bonzini
2011-10-24  9:36               ` Kevin Wolf
2011-10-24  9:40                 ` Paolo Bonzini
2011-10-24  9:53                   ` Kevin Wolf
2011-10-24 10:08                     ` Paolo Bonzini
2011-10-24  9:09         ` Peter Maydell

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=4EA527DC.90902@redhat.com \
    --to=kwolf@redhat.com \
    --cc=agraf@suse.de \
    --cc=avi@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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;
as well as URLs for NNTP newsgroup(s).