[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in

From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [Qemu-block] block/nfs: Fine grained runtime options in nfs
Date: Fri, 14 Oct 2016 16:46:39 +0100
User-agent: Mutt/1.7.0 (2016-08-17)

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


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]