qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
	Anton Nefedov <anton.nefedov@virtuozzo.com>,
	Alberto Garcia <berto@igalia.com>,
	qemu-block@nongnu.org, qemu-devel@nongnu.org,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Subject: Re: [RFC 0/3] block/file-posix: Work around XFS bug
Date: Mon, 28 Oct 2019 10:24:02 +0100	[thread overview]
Message-ID: <81bb0f91-2671-c9e5-f791-c7470dfd75ce@redhat.com> (raw)
In-Reply-To: <20191027123555.GN4472@stefanha-x1.localdomain>


[-- Attachment #1.1: Type: text/plain, Size: 2119 bytes --]

On 27.10.19 13:35, Stefan Hajnoczi wrote:
> On Fri, Oct 25, 2019 at 11:58:46AM +0200, Max Reitz wrote:
>> As for how we can address the issue, I see three ways:
>> (1) The one presented in this series: On XFS with aio=native, we extend
>>     tracked requests for post-EOF fallocate() calls (i.e., write-zero
>>     operations) to reach until infinity (INT64_MAX in practice), mark
>>     them serializing and wait for other conflicting requests.
>>
>>     Advantages:
>>     + Limits the impact to very specific cases
>>       (And that means it wouldn’t hurt too much to keep this workaround
>>       even when the XFS driver has been fixed)
>>     + Works around the bug where it happens, namely in file-posix
>>
>>     Disadvantages:
>>     - A bit complex
>>     - A bit of a layering violation (should file-posix have access to
>>       tracked requests?)
> 
> Your patch series is reasonable.  I don't think it's too bad.
> 
> The main question is how to detect the XFS fix once it ships.  XFS
> already has a ton of ioctls, so maybe they don't mind adding a
> feature/quirk bit map ioctl for publishing information about bug fixes
> to userspace.  I didn't see another obvious way of doing it, maybe a
> mount option that the kernel automatically sets and that gets reported
> to userspace?

I’ll add a note to the RH BZ.

> If we imagine that XFS will not provide a mechanism to detect the
> presence of the fix, then could we ask QEMU package maintainers to
> ./configure --disable-xfs-fallocate-beyond-eof-workaround at some point
> in the future when their distro has been shipping a fixed kernel for a
> while?  It's ugly because it doesn't work if the user installs an older
> custom-built kernel on the host.  But at least it will cover 98% of
> users...

:-/

I don’t like it, but I suppose it would work.  We could also
automatically enable this disabling option in configure when we detect
uname to report a kernel version that must include the fix.  (This
wouldn’t work for kernel with backported fixes, but those disappear over
time...)

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2019-10-28  9:25 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  9:58 [RFC 0/3] block/file-posix: Work around XFS bug Max Reitz
2019-10-25  9:58 ` [RFC 1/3] block: Make wait/mark serialising requests public Max Reitz
2019-10-25  9:58 ` [RFC 2/3] block/file-posix: Detect XFS with CONFIG_FALLOCATE Max Reitz
2019-10-25 10:19   ` Kevin Wolf
2019-10-25 10:22     ` Max Reitz
2019-10-25 10:35       ` Kevin Wolf
2019-10-25 10:41         ` Max Reitz
2019-10-26 17:26   ` Nir Soffer
2019-10-25  9:58 ` [RFC 3/3] block/file-posix: Let post-EOF fallocate serialize Max Reitz
2019-10-26 17:28   ` Nir Soffer
2019-10-25 13:40 ` [RFC 0/3] block/file-posix: Work around XFS bug Vladimir Sementsov-Ogievskiy
2019-10-25 13:56   ` Vladimir Sementsov-Ogievskiy
2019-10-25 14:19     ` Max Reitz
2019-10-25 14:35       ` Kevin Wolf
2019-10-25 14:36       ` Vladimir Sementsov-Ogievskiy
2019-10-27 12:21         ` Stefan Hajnoczi
2019-11-04 14:03       ` Alberto Garcia
2019-11-04 14:25         ` Max Reitz
2019-11-04 15:12           ` Alberto Garcia
2019-11-04 15:14             ` Max Reitz
2019-11-04 15:49               ` Alberto Garcia
2019-11-04 16:07                 ` Max Reitz
2019-10-25 13:46 ` Peter Maydell
2019-10-25 14:16   ` Max Reitz
2019-10-25 14:17     ` Peter Maydell
2019-10-25 14:21       ` Max Reitz
2019-10-25 14:56         ` Peter Maydell
2019-10-26  0:14 ` no-reply
2019-10-26 17:37 ` Nir Soffer
2019-10-26 17:52   ` Vladimir Sementsov-Ogievskiy
2019-10-28  8:56     ` Max Reitz
2019-10-27 12:35 ` Stefan Hajnoczi
2019-10-28  9:24   ` Max Reitz [this message]
2019-10-28  9:30     ` Max Reitz
2019-10-28  9:56       ` Max Reitz
2019-10-28 10:07         ` Vladimir Sementsov-Ogievskiy
2019-10-28 10:10           ` Max Reitz
2019-10-28 11:19             ` Vladimir Sementsov-Ogievskiy
2019-10-28 11:04   ` Kevin Wolf
2019-10-28 11:25     ` Vladimir Sementsov-Ogievskiy
2019-10-29  8:50       ` Max Reitz
2019-10-29 11:48         ` Vladimir Sementsov-Ogievskiy
2019-10-29 11:55           ` Max Reitz
2019-10-29 12:05             ` Vladimir Sementsov-Ogievskiy
2019-10-29 12:11               ` Max Reitz
2019-10-29 12:19                 ` Vladimir Sementsov-Ogievskiy
2019-10-29 12:23                   ` Max Reitz

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=81bb0f91-2671-c9e5-f791-c7470dfd75ce@redhat.com \
    --to=mreitz@redhat.com \
    --cc=anton.nefedov@virtuozzo.com \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.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).