From: Stefan Hajnoczi <stefanha@gmail.com>
To: Peter Lieven <pl@kamp.de>
Cc: kwolf@redhat.com, jcody@redhat.com, ronniesahlberg@gmail.com,
qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH V2] block/nfs: add support for setting debug level
Date: Mon, 29 Jun 2015 17:10:15 +0100 [thread overview]
Message-ID: <20150629161015.GD24772@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1435316769-25381-1-git-send-email-pl@kamp.de>
[-- Attachment #1: Type: text/plain, Size: 1461 bytes --]
On Fri, Jun 26, 2015 at 01:06:09PM +0200, Peter Lieven wrote:
> upcoming libnfs versions will support logging debug messages. Add
> support for it in qemu through a cmdline parameter.
>
> Example
> qemu -nfs debug=99 -cdrom nfs://...
>
> Signed-off-by: Peter Lieven <pl@kamp.de>
> ---
> v1->v2: reworked patch to accept the debug level as a cmdline
> parameter instead of an URI parameter [Stefan]
>
> block/nfs.c | 40 ++++++++++++++++++++++++++++++++++++++++
> qemu-options.hx | 21 +++++++++++++++++++++
> vl.c | 8 ++++++++
> 3 files changed, 69 insertions(+)
>
> diff --git a/block/nfs.c b/block/nfs.c
> index ca9e24e..43d48ae 100644
> --- a/block/nfs.c
> +++ b/block/nfs.c
> @@ -274,6 +274,30 @@ static void nfs_file_close(BlockDriverState *bs)
> nfs_client_close(client);
> }
>
> +static void nfs_parse_options(NFSClient *client)
> +{
> + QemuOptsList *list;
> + QemuOpts *opts;
> + const char *debug;
> +
> + list = qemu_find_opts("nfs");
> + if (list) {
> + opts = QTAILQ_FIRST(&list->head);
> + if (opts) {
> + debug = qemu_opt_get(opts, "debug");
> + if (debug) {
> +#ifdef LIBNFS_FEATURE_DEBUG
> + nfs_set_debug(client->context, atoi(debug));
This is a per-context API and there are already per-drive run-time
options.
Please use per-drive options instead of adding a global option.
Stefan
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
prev parent reply other threads:[~2015-06-29 16:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-26 11:06 [Qemu-devel] [PATCH V2] block/nfs: add support for setting debug level Peter Lieven
2015-06-29 16:10 ` Stefan Hajnoczi [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=20150629161015.GD24772@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=ronniesahlberg@gmail.com \
/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).