From: Peter Lieven <pl@kamp.de>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
Jeff Cody <jcody@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
owasserm@redhat.com, Federico Simoncelli <fsimonce@redhat.com>,
ronniesahlberg@gmail.com,
Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCHv7 0/5] block: add native support for NFS
Date: Wed, 29 Jan 2014 15:13:28 +0100 [thread overview]
Message-ID: <52E90C88.90705@kamp.de> (raw)
In-Reply-To: <20140129135950.GB23531@stefanha-thinkpad.muc.redhat.com>
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
next prev parent reply other threads:[~2014-01-29 14:14 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-29 8:50 [Qemu-devel] [PATCHv7 0/5] block: add native support for NFS Peter Lieven
2014-01-29 8:50 ` [Qemu-devel] [PATCHv7 1/5] " Peter Lieven
2014-01-29 16:19 ` Benoît Canet
2014-01-29 16:38 ` Peter Lieven
2014-01-30 9:05 ` Stefan Hajnoczi
2014-01-30 9:12 ` Peter Lieven
2014-01-30 14:23 ` Stefan Hajnoczi
2014-01-30 21:33 ` Peter Lieven
2014-01-30 14:22 ` Stefan Hajnoczi
2014-01-30 21:35 ` Peter Lieven
2014-01-31 8:57 ` Stefan Hajnoczi
2014-01-31 9:11 ` Peter Lieven
2014-01-31 10:46 ` Stefan Hajnoczi
2014-01-31 11:16 ` Peter Lieven
2014-01-31 11:36 ` Peter Lieven
2014-01-29 8:50 ` [Qemu-devel] [PATCHv7 2/5] qemu-iotests: change _supported_proto to file for various tests Peter Lieven
2014-01-29 8:50 ` [Qemu-devel] [PATCHv7 3/5] qemu-iotests: enable support for NFS protocol Peter Lieven
2014-01-29 8:50 ` [Qemu-devel] [PATCHv7 4/5] qemu-iotests: enable test 016 and 025 to work with " Peter Lieven
2014-01-29 8:50 ` [Qemu-devel] [PATCHv7 5/5] qemu-iotests: blacklist test 020 for " Peter Lieven
2014-01-29 13:59 ` [Qemu-devel] [PATCHv7 0/5] block: add native support for NFS Stefan Hajnoczi
2014-01-29 14:13 ` Peter Lieven [this message]
2014-01-29 14:22 ` Peter Lieven
2014-01-29 14:26 ` Peter Lieven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52E90C88.90705@kamp.de \
--to=pl@kamp.de \
--cc=famz@redhat.com \
--cc=fsimonce@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=owasserm@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.com \
--cc=stefanha@redhat.com \
--cc=xiawenc@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).