[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block/file-posix: fix the wrong result of find_

From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH] block/file-posix: fix the wrong result of find_allocation() in macOS.
Date: Sat, 8 Sep 2018 16:34:36 +0100

On 8 September 2018 at 15:15, Yan-Jie Wang <address@hidden> wrote:
> In macOS, lseek with SEEK_DATA behaves differently.
> It seeks to the next data region even though offset is in the middle of
> a data region. In addition, there may be many data regions without any
> hole among them, like this: |---Data---|---Data---|
> Because of this, qemu-img convert with raw images as input may create
> corrupted images in macOS especially for large files, and qemu-img
> map may also report wrong things. This patch fixes this undesired
> behaviors.

Hi. I have two general questions here:
(1) is this behaviour of SEEK_DATA specific to macOS, or do the
other BSDs (FreeBSD, OpenBSD, NetBSD) also have it ?
(2) is there a way to determine which flavour of SEEK_DATA we
have as a configure-time test rather than having to hardcode
an OS-specific #ifdef ?

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]