All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Ashijeet Acharya <ashijeetacharya@gmail.com>
Cc: eblake@redhat.com, pl@kamp.de, jcody@redhat.com,
	mreitz@redhat.com, armbru@redhat.com, qemu-devel@nongnu.org,
	qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 0/2] block: allow blockdev-add for NFS
Date: Thu, 27 Oct 2016 18:43:45 +0200	[thread overview]
Message-ID: <20161027164345.GL4027@noname.redhat.com> (raw)
In-Reply-To: <1477565022-11377-1-git-send-email-ashijeetacharya@gmail.com>

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)

      parent reply	other threads:[~2016-10-27 16:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27 10:43 [Qemu-devel] [PATCH v3 0/2] block: allow blockdev-add for NFS Ashijeet Acharya
2016-10-27 10:43 ` [Qemu-devel] [PATCH v3 1/2] block/nfs: Introduce runtime_opts in NFS Ashijeet Acharya
2016-10-27 10:43 ` [Qemu-devel] [PATCH v3 2/2] qapi: allow blockdev-add for NFS Ashijeet Acharya
2016-10-27 16:45   ` Kevin Wolf
2016-10-27 16:43 ` Kevin Wolf [this message]

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=20161027164345.GL4027@noname.redhat.com \
    --to=kwolf@redhat.com \
    --cc=armbru@redhat.com \
    --cc=ashijeetacharya@gmail.com \
    --cc=eblake@redhat.com \
    --cc=jcody@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.