From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8Vto-0007qo-1O for qemu-devel@nongnu.org; Wed, 29 Jan 2014 09:14:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8Vtf-0003ri-Ke for qemu-devel@nongnu.org; Wed, 29 Jan 2014 09:13:51 -0500 Received: from mx.ipv6.kamp.de ([2a02:248:0:51::16]:51031 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8Vtf-0003qL-9z for qemu-devel@nongnu.org; Wed, 29 Jan 2014 09:13:43 -0500 Message-ID: <52E90C88.90705@kamp.de> Date: Wed, 29 Jan 2014 15:13:28 +0100 From: Peter Lieven MIME-Version: 1.0 References: <1390985425-13165-1-git-send-email-pl@kamp.de> <20140129135950.GB23531@stefanha-thinkpad.muc.redhat.com> In-Reply-To: <20140129135950.GB23531@stefanha-thinkpad.muc.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv7 0/5] block: add native support for NFS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Kevin Wolf , Fam Zheng , Jeff Cody , qemu-devel@nongnu.org, Max Reitz , owasserm@redhat.com, Federico Simoncelli , ronniesahlberg@gmail.com, Wenchao Xia On 29.01.2014 14:59, Stefan Hajnoczi wrote: > On Wed, Jan 29, 2014 at 09:50:20AM +0100, Peter Lieven wrote: >> This adds v6 of the NFS protocol driver + qemu-iotest adjustments. >> >> v6->v7: >> - removed unsused and partially non-existing libnfs header file includes [Stefan] >> - adjusted usage of qemu_opts_create_nofail [Stefan] >> - removed patch to fix output of qemu-iotest 067 >> - only blacklist qemu-iotest 020 for NFS do not change proto from generic to file [Fam] > It compiles now but I can't create an image on my /home NFS export: > > $ ./qemu-img create -f qcow2 'nfs://127.0.0.1/home/stefanha/qemu/test-nfs.img?uid=1000&gid=1000' 8G > Formatting 'nfs://127.0.0.1/home/stefanha/qemu/test-nfs.img?uid=1000&gid=1000', fmt=qcow2 size=8589934592 encryption=off cluster_size=65536 lazy_refcounts=off > qemu-img: nfs://127.0.0.1/home/stefanha/qemu/test-nfs.img?uid=1000&gid=1000: Failed to create file: nfs_creat_async failed > > I added printfs to the code, block/nfs.c is mounting /home/stefanha/qemu > and tries to create the file /test-nfs.img. > > I'm using the Linux kernel NFS server. Unfortunately I don't have more > time to debug this but I'd like to test this feature successfully before > merging it into QEMU. Any ideas why libnfs refuses to create the file? > (It's failing in nfs_lookuppath_async() with "Path is empty".) > > Ronnie: libnfs clobbers the nfs->rpc error string so you cannot see the > detailed error message: > > In this case nfs_creat() clobbers the error with "Failed to create file: > nfs_creat_async failed". In fact the message was "Out of memory: failed > to start parsing the path components" from nfs_creat_async(), but that's > clobbering the true error too. It really should be "Path is empty" from > nfs_lookuppath_async(). > > It would be nice to preserve the full error string, otherwise the user > cannot make sense of the problem. > > Stefan I do not understand why your path is empty... Running almost the same test: ~/git/qemu$ ./qemu-img create -f qcow2 'nfs://127.0.0.1/home/lieven/git/qemu/test-nfs.img?uid=1000&gid=1000' 8G Formatting 'nfs://127.0.0.1/home/lieven/git/qemu/test-nfs.img?uid=1000&gid=1000', fmt=qcow2 size=8589934592 encryption=off cluster_size=65536 lazy_refcounts=off qemu-img: nfs://127.0.0.1/home/lieven/git/qemu/test-nfs.img?uid=1000&gid=1000: Failed to mount nfs share: mount/mnt call failed with "RPC error: Mount failed with error MNT3ERR_ACCES(13) Permission denied(13)" I have to run as root or specify 'insecure' option in /etc/exports ~/git/qemu$ sudo ./qemu-img create -f qcow2 'nfs://127.0.0.1/home/lieven/git/qemu/test-nfs.img?uid=1000&gid=1000' 8G Formatting 'nfs://127.0.0.1/home/lieven/git/qemu/test-nfs.img?uid=1000&gid=1000', fmt=qcow2 size=8589934592 encryption=off cluster_size=65536 lazy_refcounts=off The last succeeds without problems. Peter