From: Stefan Hajnoczi <stefanha@gmail.com>
To: Ashijeet Acharya <ashijeetacharya@gmail.com>
Cc: jcody@redhat.com, Kevin Wolf <kwolf@redhat.com>,
pl@kamp.de, QEMU Developers <qemu-devel@nongnu.org>,
qemu-block@nongnu.org, mreitz@redhat.com
Subject: Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in nfs
Date: Fri, 14 Oct 2016 16:46:39 +0100 [thread overview]
Message-ID: <20161014154639.GF3482@stefanha-x1.localdomain> (raw)
In-Reply-To: <CAC2QTZYT_mPRJOny0bznb95WfiCShCzdmCgOZRaKfu_HbPK_sQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1873 bytes --]
On Mon, Oct 10, 2016 at 10:39:30AM +0530, Ashijeet Acharya wrote:
> Hi all,
>
> I was working on trying to add blockdev-add compatibility for the nfs
> block driver but before that runtime options need to be separated into
> various options rather than just a simple "filename" option.
>
> I have added the following until now:
> a) host
> b) port (not sure about this one, do we just use a default port number?)
> c) export
> d) path (path to the file)
>
> I have matched these with the URI but still let me know if i have
> missed anyone :)
>
> Now, in order to parse the uri for different runtime options, I have
> made two new functions nfs_parse_filename() and nfs_parse_uri() which
> is pretty similar to the way how other network block drivers do it.
>
> Currently we parse the uri in a nfs_client_open() function which takes
> 'const char *filename' as one of its parameters but I dont think
> that's the right way anymore because we pass 'qemu_opt_get(opts,
> "filename")' which is invalid due to no runtime option named
> "filename" available anymore. Right?
>
> While parsing uri we check for the query parameters inside a 'for
> loop', so I have moved that too inside
>
> nfs_parse_uri(const char *filename, QDict *options, Error **errp)
>
> but the problem is there is no struct NFSClient parameter here, so I
> cannot fill up its important fields while parsing the query
> parameters. I cannot do the same inside nfs_client_open() because I no
> longer parse the uri over there.....OR CAN I? A completely different
> approach will work too :)
>
> I can attach a pastebin link containing a raw patch if you want to get
> a clear view but I am afraid it doesn't compile at the moment due to
> the problems mentioned above.
Please post the code and annotate the relevant places where you are
stuck.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2016-10-14 15:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 5:09 [Qemu-devel] block/nfs: Fine grained runtime options in nfs Ashijeet Acharya
2016-10-14 15:46 ` Stefan Hajnoczi [this message]
2016-10-17 18:00 ` [Qemu-devel] [Qemu-block] " Ashijeet Acharya
2016-10-17 19:29 ` Eric Blake
2016-10-17 19:34 ` Ashijeet Acharya
2016-10-18 10:41 ` Peter Lieven
2016-10-18 12:46 ` Ashijeet Acharya
2016-10-18 13:04 ` Kevin Wolf
2016-10-18 13:14 ` Ashijeet Acharya
2016-10-18 13:33 ` Kevin Wolf
2016-10-18 13:49 ` Eric Blake
2016-10-18 16:13 ` Ashijeet Acharya
2016-10-18 16:18 ` Ashijeet Acharya
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=20161014154639.GF3482@stefanha-x1.localdomain \
--to=stefanha@gmail.com \
--cc=ashijeetacharya@gmail.com \
--cc=jcody@redhat.com \
--cc=kwolf@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 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).