From: Kevin Wolf <kwolf@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: benoit.canet@irqsave.net, Fam Zheng <famz@redhat.com>,
ronniesahlberg@gmail.com, Jeff Cody <jcody@redhat.com>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
owasserm@redhat.com, Federico Simoncelli <fsimonce@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCHv9 1/5] block: add native support for NFS
Date: Mon, 3 Feb 2014 14:18:54 +0100 [thread overview]
Message-ID: <20140203131854.GL3643@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <1391419577-10569-2-git-send-email-pl@kamp.de>
Am 03.02.2014 um 10:26 hat Peter Lieven geschrieben:
> This patch adds native support for accessing images on NFS
> shares without the requirement to actually mount the entire
> NFS share on the host.
>
> NFS Images can simply be specified by an url of the form:
> nfs://<host>/<export>/<filename>[?param=value[¶m2=value2[&...]]]
>
> For example:
> qemu-img create -f qcow2 nfs://10.0.0.1/qemu-images/test.qcow2
>
> You need LibNFS from Ronnie Sahlberg available at:
> git://github.com/sahlberg/libnfs.git
> for this to work.
>
> During configure it is automatically probed for libnfs and support
> is enabled on-the-fly. You can forbid or enforce libnfs support
> with --disable-libnfs or --enable-libnfs respectively.
>
> Due to NFS restrictions you might need to execute your binaries
> as root, allow them to open priviledged ports (<1024) or specify
> insecure option on the NFS server.
>
> For additional information on ROOT vs. non-ROOT operation and URL
> format + parameters see:
> https://raw.github.com/sahlberg/libnfs/master/README
>
> Supported by qemu are the uid, gid and tcp-syncnt URL parameters.
>
> LibNFS currently support NFS version 3 only.
>
> Signed-off-by: Peter Lieven <pl@kamp.de>
Some minor comments in case you need to respin for another reason:
> MAINTAINERS | 5 +
> block/Makefile.objs | 1 +
> block/nfs.c | 439 +++++++++++++++++++++++++++++++++++++++++++++++++++
> configure | 26 +++
> qapi-schema.json | 1 +
> 5 files changed, 472 insertions(+)
> create mode 100644 block/nfs.c
> +typedef struct NFSRPC {
> + int ret;
> + int complete;
Should be bool.
> + QEMUIOVector *iov;
> + struct stat *st;
> + Coroutine *co;
> + QEMUBH *bh;
> +} NFSRPC;
> +static BlockDriver bdrv_nfs = {
> + .format_name = "nfs",
> + .protocol_name = "nfs",
> +
> + .instance_size = sizeof(NFSClient),
> + .bdrv_needs_filename = true,
> + .bdrv_has_zero_init = nfs_has_zero_init,
> + .bdrv_get_allocated_file_size = nfs_get_allocated_file_size,
> + .bdrv_truncate = nfs_file_truncate,
This group of options could have used alignment for = as well. :-)
> + .bdrv_file_open = nfs_file_open,
> + .bdrv_close = nfs_file_close,
> + .bdrv_create = nfs_file_create,
> +
> + .bdrv_co_readv = nfs_co_readv,
> + .bdrv_co_writev = nfs_co_writev,
> + .bdrv_co_flush_to_disk = nfs_co_flush,
> +};
Kevin
next prev parent reply other threads:[~2014-02-03 13:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 9:26 [Qemu-devel] [PATCHv9 0/5] block: add native support for NFS Peter Lieven
2014-02-03 9:26 ` [Qemu-devel] [PATCHv9 1/5] " Peter Lieven
2014-02-03 13:18 ` Kevin Wolf [this message]
2014-02-03 9:26 ` [Qemu-devel] [PATCHv9 2/5] qemu-iotests: change _supported_proto to file for various tests Peter Lieven
2014-02-03 9:26 ` [Qemu-devel] [PATCHv9 3/5] qemu-iotests: blacklist test 020 for NFS protocol Peter Lieven
2014-02-03 9:26 ` [Qemu-devel] [PATCHv9 4/5] qemu-iotests: enable test 016 and 025 to work with " Peter Lieven
2014-02-03 9:26 ` [Qemu-devel] [PATCHv9 5/5] qemu-iotests: enable support for " Peter Lieven
2014-02-03 13:22 ` [Qemu-devel] [PATCHv9 0/5] block: add native support for NFS Kevin Wolf
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=20140203131854.GL3643@dhcp-200-207.str.redhat.com \
--to=kwolf@redhat.com \
--cc=benoit.canet@irqsave.net \
--cc=famz@redhat.com \
--cc=fsimonce@redhat.com \
--cc=jcody@redhat.com \
--cc=mreitz@redhat.com \
--cc=owasserm@redhat.com \
--cc=pl@kamp.de \
--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).