From: Eric Blake <eblake@redhat.com>
To: Bug 1776920 <1776920@bugs.launchpad.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [Bug 1776920] Re: qemu-img convert on Mac OSX creates corrupt images
Date: Fri, 7 Sep 2018 15:04:22 -0500 [thread overview]
Message-ID: <e44e6746-8b94-c9e9-698f-514265208e68@redhat.com> (raw)
In-Reply-To: <153634345465.24629.12107192195596244951.malone@gac.canonical.com>
On 09/07/2018 01:04 PM, Yan-Jie Wang wrote:
> I have done some experiments and find out that
> the behavior of lseek with whence set to SEEK_DATA is different from the behavior of Linux's lseek.
>
> If the supplied offset is in the middle of a data region, it returns the
> start of the next data region. There may be many data regions in a big
> file even though it has no hole.
>
> return value of lseek with whence set to SEEK_DATA:
>
> |--(offset)--Data----|(return value)----Data----|
> |--(offset)--Data----|----Hole----|(return value)----Data----|
>
>
> ** Patch added: "macOS-lseek.patch"
> https://bugs.launchpad.net/qemu/+bug/1776920/+attachment/5186138/+files/macOS-lseek.patch
While a developer can chase a URL, our CI tools can't. Can you please
also send that patch directly to qemu-devel@nongnu.org, so that it gets
the same level of review as other patches?
But I am very reluctant to take your patch. MacOS is flat-out buggy and
in violation of the specification of lseek(SEEK_DATA), so making all
applications work around their bug is not going to scale as well as
having them fix their bug in the first place.
Here's the proposed POSIX specification for what lseek(SEEK_DATA) is
supposed to do:
http://austingroupbugs.net/view.php?id=415#c862
That text has been present for 7 years now - so anyone implementing
SEEK_DATA should really be paying attention to interoperability with
that text.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2018-09-07 20:04 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-14 14:05 [Qemu-devel] [Bug 1776920] [NEW] qemu-img convert on Mac OSX creates corrupt images Waldemar Kozaczuk
2018-06-14 14:46 ` [Qemu-devel] [Bug 1776920] " Christian Ehrhardt
2018-06-14 15:06 ` Waldemar Kozaczuk
2018-06-14 15:29 ` Christian Ehrhardt
2018-06-14 19:22 ` John Snow
2018-06-14 21:49 ` Waldemar Kozaczuk
2018-06-14 21:53 ` Waldemar Kozaczuk
2018-06-14 21:54 ` Waldemar Kozaczuk
2018-06-14 21:55 ` Waldemar Kozaczuk
2018-06-14 21:56 ` Waldemar Kozaczuk
2018-06-14 21:58 ` Waldemar Kozaczuk
2018-06-14 22:02 ` Waldemar Kozaczuk
2018-06-19 22:23 ` Waldemar Kozaczuk
2018-06-20 15:54 ` John Snow
2018-06-20 18:33 ` Waldemar Kozaczuk
2018-06-20 19:44 ` John Snow
2018-06-21 12:00 ` Waldemar Kozaczuk
2018-06-21 17:11 ` John Snow
2018-07-06 22:30 ` Waldemar Kozaczuk
2018-07-25 19:53 ` John Snow
2018-09-07 18:04 ` Yan-Jie Wang
2018-09-07 20:04 ` Eric Blake [this message]
2019-07-23 19:28 ` Sven R
2019-08-09 22:32 ` John Snow
2021-04-22 5:55 ` Thomas Huth
2021-06-18 15:27 ` Thomas Huth
2021-06-22 4:17 ` Launchpad Bug Tracker
2021-06-22 20:00 ` Juan Niño
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=e44e6746-8b94-c9e9-698f-514265208e68@redhat.com \
--to=eblake@redhat.com \
--cc=1776920@bugs.launchpad.net \
--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).