Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp483214pxt; Fri, 6 Aug 2021 06:45:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDqK8m6suGmZL1EEdlzD0yr2dK6DEkgL95mn1+MEz5GihRMQ4klwDV5o4QuTDa8eo4Rmp+ X-Received: by 2002:a02:664e:: with SMTP id l14mr9845713jaf.56.1628257539709; Fri, 06 Aug 2021 06:45:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628257539; cv=none; d=google.com; s=arc-20160816; b=EPeqagNS/CbvfSf39iYQmV8r3CO1bGXMRTSQVR0gW/ESV5WkPh4x1PKuLJ5I3sQagy Of0CNbfWpqMI6R2NQKrz6aReAIP6Ou2JduDfJ4M4y3oW92duUOVQpMHCzREkK/MGq7Hv RFYRCFqn+AAcdLll8emqZuOrcmmKPh+WOvn8DcId/xp1EyaUwQRLpBA0Df9q9yIrhcGE U9H+ZNrMNlXJT8vDZXvTEBtrT17VeH6Kmlu+B9MRxc2np7xn4ZYALU7f5pIFNZSicIh/ Mo9T0jjjRIAM2Ipk5We0xYvc82mlVR4pfT3MrpFYyDZ5izgcV4SxsMmWJeAX+D6d+ILM Nuig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4D3YXEKB5zCq4jxKGpQHXMLx1XP1S0WYELRQJKJZ/qk=; b=otaCdVofVaWvpPyF96MejCiT2xyzy2oONKfstlbIk4yuIwIUyoX2qSjuVmdxHpyKJ1 iqQHQoYuu5TLynD+cj2cUHb3IAV0TU7tPRLWOQ3+0dGiBcVRgTxKtwSK22zzwCNveF0w PnwVagaCoVSoekXYYMkm8zY1NhP0Chw9XOfdpQR8bLyQgnUu/+F9EN3FFnoZMbTMNrw2 IHIUb3QcUFUCYBEC+O+LJz5pHhwB4bgLBNctYGVWT8a9Swoq6n3IibVNO4Tcxx3Cv7mw asMChbuaKFEQ1VJ2UfkR2TR2DbC9SwdkLW7KtM8CIlyuavQ50CN79Ab8x0eXKe9xAthy pyoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PK9eHDNN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m8si9371849jav.78.2021.08.06.06.45.26; Fri, 06 Aug 2021 06:45:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PK9eHDNN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244124AbhHFIVf (ORCPT + 99 others); Fri, 6 Aug 2021 04:21:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:48648 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243939AbhHFITF (ORCPT ); Fri, 6 Aug 2021 04:19:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5C9B9611C9; Fri, 6 Aug 2021 08:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628237929; bh=K7sEvxaluQcGZVGgQ/AHGFUbIVDlE0JjgJajWOr5M40=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PK9eHDNNfLwaZhWMOPwR+tSiZNYSi9jGWknFYCNi20CWAW8ge4RmCluy4YRckbgRO d07xOptgKYtpHdUrzAjAWmeOBaaeJcbF3BBGXJBM9SvpeTk1RvB00LD23z9nFNtU07 A1/WaYS92LQn8ObMGXnh3kWbO+E+F8I3xOjmEjJM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Keith Busch , Christoph Hellwig , Sasha Levin Subject: [PATCH 5.10 16/30] nvme: fix nvme_setup_command metadata trace event Date: Fri, 6 Aug 2021 10:16:54 +0200 Message-Id: <20210806081113.681341055@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210806081113.126861800@linuxfoundation.org> References: <20210806081113.126861800@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Keith Busch [ Upstream commit 234211b8dd161fa25f192c78d5a8d2dd6bf920a0 ] The metadata address is set after the trace event, so the trace is not capturing anything useful. Rather than logging the memory address, it's useful to know if the command carries a metadata payload, so change the trace event to log that true/false state instead. Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- drivers/nvme/host/trace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/nvme/host/trace.h b/drivers/nvme/host/trace.h index daaf700eae79..35bac7a25422 100644 --- a/drivers/nvme/host/trace.h +++ b/drivers/nvme/host/trace.h @@ -56,7 +56,7 @@ TRACE_EVENT(nvme_setup_cmd, __field(u8, fctype) __field(u16, cid) __field(u32, nsid) - __field(u64, metadata) + __field(bool, metadata) __array(u8, cdw10, 24) ), TP_fast_assign( @@ -66,13 +66,13 @@ TRACE_EVENT(nvme_setup_cmd, __entry->flags = cmd->common.flags; __entry->cid = cmd->common.command_id; __entry->nsid = le32_to_cpu(cmd->common.nsid); - __entry->metadata = le64_to_cpu(cmd->common.metadata); + __entry->metadata = !!blk_integrity_rq(req); __entry->fctype = cmd->fabrics.fctype; __assign_disk_name(__entry->disk, req->rq_disk); memcpy(__entry->cdw10, &cmd->common.cdw10, sizeof(__entry->cdw10)); ), - TP_printk("nvme%d: %sqid=%d, cmdid=%u, nsid=%u, flags=0x%x, meta=0x%llx, cmd=(%s %s)", + TP_printk("nvme%d: %sqid=%d, cmdid=%u, nsid=%u, flags=0x%x, meta=0x%x, cmd=(%s %s)", __entry->ctrl_id, __print_disk_name(__entry->disk), __entry->qid, __entry->cid, __entry->nsid, __entry->flags, __entry->metadata, -- 2.30.2