From nobody Sat Oct 25 08:57:39 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 1520845929706740.5764953088263; Mon, 12 Mar 2018 02:12:09 -0700 (PDT) Received: from localhost ([::1]:57233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evJV2-0005pk-TE for importer@patchew.org; Mon, 12 Mar 2018 05:12:08 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1evJSh-0004M0-Ov for qemu-devel@nongnu.org; Mon, 12 Mar 2018 05:09:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1evJSc-0001DT-MR for qemu-devel@nongnu.org; Mon, 12 Mar 2018 05:09:43 -0400 Received: from 4.mo4.mail-out.ovh.net ([178.32.98.131]:40948) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1evJSc-0000nd-Eu for qemu-devel@nongnu.org; Mon, 12 Mar 2018 05:09:38 -0400 Received: from player693.ha.ovh.net (unknown [10.109.122.93]) by mo4.mail-out.ovh.net (Postfix) with ESMTP id 2A005156DCC for ; Mon, 12 Mar 2018 10:09:28 +0100 (CET) Received: from bahia.lan (lns-bzn-46-82-253-208-248.adsl.proxad.net [82.253.208.248]) (Authenticated sender: groug@kaod.org) by player693.ha.ovh.net (Postfix) with ESMTPA id 592D44400D2; Mon, 12 Mar 2018 10:09:26 +0100 (CET) From: Greg Kurz To: qemu-devel@nongnu.org Date: Mon, 12 Mar 2018 10:09:19 +0100 Message-ID: <152084575964.24079.3708480492746701627.stgit@bahia.lan> User-Agent: StGit/0.17.1-46-g6855-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Ovh-Tracer-Id: 4883872322894272832 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtfedrledvgdejgecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecu X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 178.32.98.131 Subject: [Qemu-devel] [PATCH] 9p: add trace event for v9fs_setattr() 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: Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Don't print the tv_nsec part of atime and mtime, to stay below the 10 argument limit of trace events. Signed-off-by: Greg Kurz Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/9pfs/9p.c | 5 +++++ hw/9pfs/trace-events | 2 ++ 2 files changed, 7 insertions(+) diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c index 64f3bb976c92..33825e16c150 100644 --- a/hw/9pfs/9p.c +++ b/hw/9pfs/9p.c @@ -1196,6 +1196,10 @@ static void coroutine_fn v9fs_setattr(void *opaque) goto out_nofid; } =20 + trace_v9fs_setattr(pdu->tag, pdu->id, fid, + v9iattr.valid, v9iattr.mode, v9iattr.uid, v9iattr.g= id, + v9iattr.size, v9iattr.atime_sec, v9iattr.mtime_sec); + fidp =3D get_fid(pdu, fid); if (fidp =3D=3D NULL) { err =3D -EINVAL; @@ -1260,6 +1264,7 @@ static void coroutine_fn v9fs_setattr(void *opaque) } } err =3D offset; + trace_v9fs_setattr_return(pdu->tag, pdu->id); out: put_fid(pdu, fidp); out_nofid: diff --git a/hw/9pfs/trace-events b/hw/9pfs/trace-events index 1aee350c42f1..881e4c4dd80b 100644 --- a/hw/9pfs/trace-events +++ b/hw/9pfs/trace-events @@ -46,3 +46,5 @@ v9fs_xattrwalk_return(uint16_t tag, uint8_t id, int64_t s= ize) "tag %d id %d size v9fs_xattrcreate(uint16_t tag, uint8_t id, int32_t fid, char* name, uint64= _t size, int flags) "tag %d id %d fid %d name %s size %"PRIu64" flags %d" v9fs_readlink(uint16_t tag, uint8_t id, int32_t fid) "tag %d id %d fid %d" v9fs_readlink_return(uint16_t tag, uint8_t id, char* target) "tag %d id %d= name %s" +v9fs_setattr(uint16_t tag, uint8_t id, int32_t fid, int32_t valid, int32_t= mode, int32_t uid, int32_t gid, int64_t size, int64_t atime_sec, int64_t m= time_sec) "tag %u id %u fid %d iattr=3D{valid %d mode %d uid %d gid %d size= %"PRId64" atime=3D%"PRId64" mtime=3D%"PRId64" }" +v9fs_setattr_return(uint16_t tag, uint8_t id) "tag %u id %u"