qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [Qemu-devel] [PATCH] block/raw-posix: Open file descrip


From: Peter Maydell
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH] block/raw-posix: Open file descriptor O_RDWR to work around glibc posix_fallocate emulation issue.
Date: Fri, 2 Oct 2015 15:36:04 +0100

On 29 September 2015 at 16:54, Richard W.M. Jones <address@hidden> wrote:
>   https://bugzilla.redhat.com/show_bug.cgi?id=1265196
>
> The following command fails on an NFS mountpoint:
>
>   $ qemu-img create -f qcow2 -o preallocation=falloc disk.img 262144
>   Formatting 'disk.img', fmt=qcow2 size=262144 encryption=off 
> cluster_size=65536 preallocation='falloc' lazy_refcounts=off
>   qemu-img: disk.img: Could not preallocate data for the new file: Bad file 
> descriptor
>
> The reason turns out to be because NFS doesn't support the
> posix_fallocate call.  glibc emulates it instead.  However glibc's
> emulation involves using the pread(2) syscall.  The pread syscall
> fails with EBADF if the file descriptor is opened without the read
> open-flag (ie. open (..., O_WRONLY)).
>
> I contacted glibc upstream about this, and their response is here:
>
>   https://bugzilla.redhat.com/show_bug.cgi?id=1265196#c9

"You are not authorized to access bug #1265196."

Any chance of a working URL if we're going to immortalize it
in QEMU's git log?

thanks
-- PMM



reply via email to

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