[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv3] block: add native support for NFS
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCHv3] block: add native support for NFS |
Date: |
Fri, 20 Dec 2013 14:07:29 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Dec 20, 2013 at 12:31:57PM +0100, Peter Lieven wrote:
> - DID NOT add full implementation of bdrv_get_allocated_file_size because
> we are not in a coroutine context and I cannot do an async call here.
> I could do a sync call if there would be a guarantee that no requests
> are in flight. [Stefan]
Let's discuss in the other email thread where we started.
> +static int64_t nfs_client_open(NFSClient *client, const char *filename,
> + int flags, Error **errp)
> +{
> + int ret = -EINVAL;
> + URI *uri;
> + char *file = NULL, *strp = NULL;
> + struct stat st;
> +
> + uri = uri_parse(filename);
> + if (!uri) {
> + error_setg(errp, "Invalid URL specified.\n");
\n should not be included in error_setg() messages.
> + goto fail;
> + }
> + strp = strrchr(uri->path, '/');
> + if (strp == NULL) {
> + error_setg(errp, "Invalid URL specified.\n");
\n should not be included in error_setg() messages.