qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] block/nfs: Fine grained runtime options in nfs
@ 2016-10-10  5:09 Ashijeet Acharya
  2016-10-14 15:46 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
  0 siblings, 1 reply; 13+ messages in thread
From: Ashijeet Acharya @ 2016-10-10  5:09 UTC (permalink / raw)
  To: jcody; +Cc: Kevin Wolf, mreitz, pl, QEMU Developers, qemu-block

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.

Any help will be appreciated.

Thanks for reading
Ashijeet

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-10-18 16:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-10  5:09 [Qemu-devel] block/nfs: Fine grained runtime options in nfs Ashijeet Acharya
2016-10-14 15:46 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-10-17 18:00   ` 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

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).