[Qemu-devel] [Bug 1776920] Re: qemu-img convert on Mac OSX creates corrupt images

2018-09-07 Thread Yan-Jie Wang
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

[Qemu-devel] [PATCH] block/file-posix: fix the wrong result of find_allocation() in macOS.

2018-09-08 Thread Yan-Jie Wang
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. Signed-off-by: Yan-Jie Wang --- block/file-posix.c | 59 ++ 1 file changed, 59 insertions