From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bznmV-0006RR-0b for qemu-devel@nongnu.org; Thu, 27 Oct 2016 12:43:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bznmU-0006cy-4H for qemu-devel@nongnu.org; Thu, 27 Oct 2016 12:43:55 -0400 Date: Thu, 27 Oct 2016 18:43:45 +0200 From: Kevin Wolf Message-ID: <20161027164345.GL4027@noname.redhat.com> References: <1477565022-11377-1-git-send-email-ashijeetacharya@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1477565022-11377-1-git-send-email-ashijeetacharya@gmail.com> Subject: Re: [Qemu-devel] [PATCH v3 0/2] block: allow blockdev-add for NFS List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Ashijeet Acharya Cc: eblake@redhat.com, pl@kamp.de, jcody@redhat.com, mreitz@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org Am 27.10.2016 um 12:43 hat Ashijeet Acharya geschrieben: > Previously posted series patches: > v2: https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg05844.html > v1: https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg04487.html > > This series adds blockdev-add support for NFS block driver. > > Patch 1 helps to prepare NFS driver to make use of several runtime_opts > as they appear in the URI. This will make NFS to do things similar to > the way other drivers available in the block layer do. > > Patch 2 helps to allow blockdev-add support for the NFS block driver > by making the NFS option available. qemu-iotests 104 used to work with NFS before this series and fails now (see diff below). Probably you need a .bdrv_refresh_filename() implementation to go back from options to the original URL. This is a minor problem, though, and we can fix it in a follow-up. The more important problem is that you didn't address my comment that you don't actually process options as they are specified in the schema, which means that you can't actually use blockdev-add: {"execute":"blockdev-add","arguments":{"driver":"nfs","node-name":"disk","server":{"type":"inet","host":"localhost"},"path":"/home/kwolf/images/hd.img"}} {"error": {"class": "GenericError", "desc": "No hostname was specified"}} On the command line you can just directly use "host" without embedding it into "server", but that doesn't match the schema and therefore doesn't work with blockdev-add: {"execute":"blockdev-add","arguments":{"driver":"nfs","node-name":"disk","host":"localhost","path":"/home/kwolf/images/hd.img"}} {"error": {"class": "GenericError", "desc": "Parameter 'server' is missing"}} Kevin --- /home/kwolf/source/qemu/tests/qemu-iotests/104.out 2016-08-12 17:42:34.307082303 +0200 +++ 104.out.bad 2016-10-27 18:34:58.111108932 +0200 @@ -2,11 +2,11 @@ === Check qemu-img info output === Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1024 -image: TEST_DIR/t.IMGFMT +image: json:{"driver": "IMGFMT", "file": {"host": "127.0.0.1", "driver": "nfs", "path": "//home/kwolf/images/tmp/t.IMGFMT"}} file format: IMGFMT virtual size: 1.0K (1024 bytes) Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=1234 -image: TEST_DIR/t.IMGFMT +image: json:{"driver": "IMGFMT", "file": {"host": "127.0.0.1", "driver": "nfs", "path": "//home/kwolf/images/tmp/t.IMGFMT"}} file format: IMGFMT virtual size: 1.5K (1536 bytes)