From nobody Sun Oct 5 19:23:31 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499454631162749.462641222918; Fri, 7 Jul 2017 12:10:31 -0700 (PDT) Received: from localhost ([::1]:58459 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTYe2-0007fA-0E for importer@patchew.org; Fri, 07 Jul 2017 15:10:26 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43699) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTYdE-0007FB-Vc for qemu-devel@nongnu.org; Fri, 07 Jul 2017 15:09:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTYdD-0008FL-NJ for qemu-devel@nongnu.org; Fri, 07 Jul 2017 15:09:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35124) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTYd7-0008CE-AV; Fri, 07 Jul 2017 15:09:29 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A1E6C769E0; Fri, 7 Jul 2017 19:09:27 +0000 (UTC) Received: from red.redhat.com (ovpn-120-204.rdu2.redhat.com [10.10.120.204]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6496C600C2; Fri, 7 Jul 2017 19:09:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A1E6C769E0 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=eblake@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A1E6C769E0 From: Eric Blake To: qemu-devel@nongnu.org Date: Fri, 7 Jul 2017 14:09:19 -0500 Message-Id: <20170707190919.31246-1-eblake@redhat.com> In-Reply-To: <514bf953-81b7-d379-db20-0cb2af29094b@redhat.com> References: <514bf953-81b7-d379-db20-0cb2af29094b@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 07 Jul 2017 19:09:28 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] fixup! nbd: use generic trace subsystem instead of TRACE macro X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: den@openvz.org, vsementsov@virtuozzo.com, "open list:Network Block Dev..." , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Vladimir Sementsov-Ogievskiy [eblake minor tweaks to a couple of traces] Signed-off-by: Eric Blake --- If you are okay with this, I plan to squash this into your patch 10 when I send my pull request nbd/client.c | 3 +-- nbd/server.c | 5 +++-- nbd/trace-events | 4 +--- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/nbd/client.c b/nbd/client.c index ab46653..9c52b9b 100644 --- a/nbd/client.c +++ b/nbd/client.c @@ -346,7 +346,6 @@ static int nbd_receive_query_exports(QIOChannel *ioc, return -1; } - trace_nbd_receive_query_exports_loop(); while (1) { int ret =3D nbd_receive_list(ioc, wantname, &foundExport, errp); @@ -472,7 +471,7 @@ int nbd_receive_negotiate(QIOChannel *ioc, const char *= name, uint16_t *flags, goto fail; } magic =3D be64_to_cpu(magic); - trace_nbd_receive_negotiate_magic2(magic); + trace_nbd_receive_negotiate_magic(magic); if (magic =3D=3D NBD_OPTS_MAGIC) { uint32_t clientflags =3D 0; diff --git a/nbd/server.c b/nbd/server.c index ca95f43..9b0c588 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -422,8 +422,9 @@ static int nbd_negotiate_options(NBDClient *client, Err= or **errp) error_prepend(errp, "read failed: "); return -EINVAL; } - trace_nbd_negotiate_options_check_magic(); - if (magic !=3D be64_to_cpu(NBD_OPTS_MAGIC)) { + magic =3D be64_to_cpu(magic); + trace_nbd_negotiate_options_check_magic(magic); + if (magic !=3D NBD_OPTS_MAGIC) { error_setg(errp, "Bad magic received"); return -EINVAL; } diff --git a/nbd/trace-events b/nbd/trace-events index b20165a..4b233b8 100644 --- a/nbd/trace-events +++ b/nbd/trace-events @@ -4,7 +4,6 @@ nbd_send_option_request(uint32_t opt, uint32_t len) "Sendin= g option request %" P nbd_receive_option_reply(uint32_t option, uint32_t type, uint32_t length) = "Received option reply %" PRIx32", type %" PRIx32", len %" PRIu32 nbd_reply_err_unsup(uint32_t option) "server doesn't understand request %"= PRIx32 ", attempting fallback" nbd_receive_query_exports_start(const char *wantname) "Querying export lis= t for '%s'" -nbd_receive_query_exports_loop(void) "Reading available export names" nbd_receive_query_exports_success(const char *wantname) "Found desired exp= ort name '%s'" nbd_receive_starttls_request(void) "Requesting TLS from server" nbd_receive_starttls_reply(void) "Getting TLS reply from server" @@ -12,7 +11,6 @@ nbd_receive_starttls_new_client(void) "TLS request approv= ed, setting up TLS" nbd_receive_starttls_tls_handshake(void) "Starting TLS handshake" nbd_receive_negotiate(void *tlscreds, const char *hostname) "Receiving neg= otiation tlscreds=3D%p hostname=3D%s" nbd_receive_negotiate_magic(uint64_t magic) "Magic is 0x%" PRIx64 -nbd_receive_negotiate_magic2(uint64_t magic) "Magic is 0x%" PRIx64 nbd_receive_negotiate_server_flags(uint32_t globalflags) "Global flags are= %" PRIx32 nbd_receive_negotiate_default_name(void) "Using default NBD export name \"= \"" nbd_receive_negotiate_size_flags(uint64_t size, uint16_t flags) "Size is %= " PRIu64 ", export flags %" PRIx16 @@ -40,7 +38,7 @@ nbd_negotiate_handle_starttls_handshake(void) "Starting T= LS handshake" nbd_negotiate_options_flags(void) "Checking client flags" nbd_negotiate_options_newstyle(void) "Client supports fixed newstyle hands= hake" nbd_negotiate_options_no_zeroes(void) "Client supports no zeroes at handsh= ake end" -nbd_negotiate_options_check_magic(void) "Checking opts magic" +nbd_negotiate_options_check_magic(uint64_t magic) "Checking opts magic 0x%= " PRIx64 nbd_negotiate_options_check_option(uint32_t option) "Checking option 0x%" = PRIx32 nbd_opt_abort_reply_failed(const char *error) "Reply to NBD_OPT_ABORT requ= est failed: %s" nbd_negotiate_begin(void) "Beginning negotiation" --=20 2.9.4