From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtznu-0002f8-Rh for qemu-devel@nongnu.org; Fri, 20 Dec 2013 08:07:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vtzno-0001Ww-Sr for qemu-devel@nongnu.org; Fri, 20 Dec 2013 08:07:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45715) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vtzno-0001Wr-Ko for qemu-devel@nongnu.org; Fri, 20 Dec 2013 08:07:40 -0500 Date: Fri, 20 Dec 2013 14:07:29 +0100 From: Stefan Hajnoczi Message-ID: <20131220130729.GC5905@stefanha-thinkpad.redhat.com> References: <1387539117-2427-1-git-send-email-pl@kamp.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1387539117-2427-1-git-send-email-pl@kamp.de> Subject: Re: [Qemu-devel] [PATCHv3] block: add native support for NFS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, owasserm@redhat.com, ronniesahlberg@gmail.com, pbonzini@redhat.com 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.