[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] block/raw-posix: Open file descriptor O_RDWR to
From: |
Richard W.M. Jones |
Subject: |
Re: [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:43:46 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
On Fri, Oct 02, 2015 at 03:36:04PM +0100, Peter Maydell wrote:
> 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?
Sorry about that. I have now made the bug public -- there was
absolutely no reason why it was private before.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org