qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: "Markus Armbruster" <armbru@redhat.com>,
	qemu-devel@nongnu.org, "Pádraig Brady" <pbrady@redhat.com>,
	"Michael Steffens" <michael_steffens@posteo.de>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] block/raw-posix: use seek_hole ahead of fiemap
Date: Thu, 25 Sep 2014 11:52:26 +0200	[thread overview]
Message-ID: <20140925095226.GG4667@noname.redhat.com> (raw)
In-Reply-To: <20140925090041.GE20349@thor.bakeyournoodle.com>

[-- Attachment #1: Type: text/plain, Size: 1974 bytes --]

Am 25.09.2014 um 11:00 hat Tony Breeds geschrieben:
> On Thu, Sep 25, 2014 at 09:30:30AM +0200, Kevin Wolf wrote:
> 
> > Does this fix the problem or does it just make it less likely that it
> > becomes apparent?
> 
> Sorry for not making this clearer in my commit message.
> 
> I haven't been able to reproduce the corruption with the fiemap flag
> change.
>  
> > If there is a data corruptor, we need to fix it, not just ensure that
> > only the less common environments are affected.
> 
> I agree. I believe that the FIEMAP_FLAG_SYNC flag change fixes the
> corrupter and then, as you say, makes that code less commonly executed.
>  
> > That looks like a logically separate change, so it should probably be
> > a separate patch.
> 
> Sure I can do that, and be more explicit about the reason in the commit
> message.
>  
> > Is this fix for the corruptor? The commit message doesn't make it
> > clear. If so and fiemap is safe now, why would we still prefer
> > seek_hole?
> 
> The preference for seek_hole was a suggestion from Pádraig Brady , so
> I'll let him defend that :) but as I said above I think it was about 
> reducing the situations where fiemap was/is called.

Okay. I'm not opposed to the change, we just need to split and document
it properly.

So first we should fix the bug by adding FIEMAP_FLAG_SYNC. Or actually,
it might just be a workaround for a kernel bug. Is the expected
behaviour documented, and if yes, what is it? We should describe as
precisely as possible what the situation is and why we have to add this
flag in qemu. You can probably reuse a good part of your current commit
message for that and extend it a bit.

And then we may or may not make the second change with the preference
for seek_hole. If FIEMAP_FLAG_SYNC actually does additional writes or an
fsync(), switching is a performance optimisation and might be justified
as such. Maybe Pádraig has some more input on this.

Kevin

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-09-25  9:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-25  5:23 [Qemu-devel] [PATCH] block/raw-posix: use seek_hole ahead of fiemap Tony Breeds
2014-09-25  6:21 ` Markus Armbruster
2014-09-25  6:29   ` Tony Breeds
2014-09-25  6:42     ` Greg Kurz
2014-09-25  6:48       ` Tony Breeds
2014-09-25  6:47     ` Markus Armbruster
2014-09-25  7:30   ` Kevin Wolf
2014-09-25  9:00     ` Tony Breeds
2014-09-25  9:52       ` Kevin Wolf [this message]
2014-09-25 10:41       ` Pádraig Brady
2014-09-25 12:45     ` Eric Blake
2014-09-25 12:40 ` Eric Blake
2014-09-25 23:14 ` [Qemu-devel] [PATCH v2 1/2] block/raw-posix: Fix disk corruption in try_fiemap Tony Breeds
2014-09-25 23:14   ` [Qemu-devel] [PATCH v2 2/2] block/raw-posix: use seek_hole ahead of fiemap Tony Breeds
2014-09-26 17:04     ` Max Reitz
2014-09-26 17:22     ` Eric Blake
2014-09-26 17:05   ` [Qemu-devel] [PATCH v2 1/2] block/raw-posix: Fix disk corruption in try_fiemap Max Reitz
2014-09-26 17:09   ` Eric Blake
2014-09-26 22:15     ` Tony Breeds
2014-10-14 12:35   ` Kevin Wolf

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=20140925095226.GG4667@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=michael_steffens@posteo.de \
    --cc=mreitz@redhat.com \
    --cc=pbrady@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).