Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1591378yba; Sat, 6 Apr 2019 17:12:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkMr+JxggGzmxgMMmaAYkRwQCVvlJOvC26c+sZHuVJV+tbXQHw6HoQVmb5+kc0s07hQU1X X-Received: by 2002:a62:fb0a:: with SMTP id x10mr21503498pfm.179.1554595938622; Sat, 06 Apr 2019 17:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554595938; cv=none; d=google.com; s=arc-20160816; b=TGTwLkNjo68LLEnsUmbY0TAibscUDFMZ/I6zmBQ2M3oftrTO6XqrE+ZHNP19SswJ9z xTeXhVz+JhmR+uEHH7wBIyHzApveqsJ+i+tpseBGRg4H4H2TtX7Og7lyyWhqcJMyq68Y xlDoCO+kaJqsne03M9JJFH8MjMt7W4VYzp8GmI8PeMGMzlr8UYLqc/a35ua11PM69OO8 BRR4x1xS0bDXGeB5ifk/1zqXDHUzt9eFvfiJz7q7RUCqo4w68MsfGyFEJtRYSTBlYENz QjhxnTaBp7sCPmU5IF4VEcACiqeBVG7/JOtKGHiH5PGiYAF+gPM1VdjFgV0muJ7VR1IF p6Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nAcHuzKOp7Og35xJ9qkPg9RRl0wfwnr6s1xFaxaVBMk=; b=xqgTdDp+LQolI39iWEj51xpkunwu2JBYo/5GflTeKY8CLInn3XQvvQ18n28B+8sQEj ucRjB9GcdMUd4a35cNhgDi7d8Y1PR4+/MbUd1Czq9nSnzsRz5ve7SzrDZHIZ6AfrlwxS 9u+uVetAND0qannowNuKi6eQV8QgET9J9td4Hl9DdG/ZB2sSPDuG821g8q/LfiZUWnxU ehD76dFx1PLziZmHq0LtkEs64lhIIqh5ftLPBRiK9+Kb9C+YwvXITV2d60P22gv9Yomf 43C7vywlou6HNgpnwb4+AZ2+kX6ltL1tyXhuIlfrH1w5BHRCq75aJtg41Idoh5g589hi 5fLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=kXodR83I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w1si18307766ply.420.2019.04.06.17.11.50; Sat, 06 Apr 2019 17:12:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=kXodR83I; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726372AbfDGAKu (ORCPT + 99 others); Sat, 6 Apr 2019 20:10:50 -0400 Received: from mail-qt1-f195.google.com ([209.85.160.195]:43670 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726314AbfDGAKt (ORCPT ); Sat, 6 Apr 2019 20:10:49 -0400 Received: by mail-qt1-f195.google.com with SMTP id v32so11514495qtc.10 for ; Sat, 06 Apr 2019 17:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=nAcHuzKOp7Og35xJ9qkPg9RRl0wfwnr6s1xFaxaVBMk=; b=kXodR83I85F2t6TrJ7lK5pPAb96V3ezu7UA6bktNZhLq/xWKFzioOv38hC6xnBFNPj BdJwvdXIcnZJ7PUefFAvoZsPOcmLwDt0o8/uCKAmuWh36/1oBfyyI2Nnp8yAfhd86a6p WHELMN8i4fjqF0lg09a6+Tx4r8Xwpyx7PNd57P9EbxjE9JbLK/cOkM27TgSsRA6JLhpF NhoHkTA10ZYhDR4C48WsN17PIbD5Igk7mjLhzIAxGtQWtWkjwVRli7Ag5M516ELmOqZ8 VjPPhy6uMfNwm0RGLaRSpoWuOSjibZgJvgAxGJ/+tWSQcCKjJ6SNqosuz+Zmskot9BZA OFoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=nAcHuzKOp7Og35xJ9qkPg9RRl0wfwnr6s1xFaxaVBMk=; b=smjVxj3IDUTboP2a5eLd/fBvjwkjzY0HXdP2u0e83AoR/HM3PME0UBAczVqndhNvYF MnXR4NDikQm/UIkyCAMD2mvxhCOeGgxyRyYvWSRBUX0XwSXpOUqCCO2zFbXp2MMVCkHx 3COMd4yFrzcsJp9iSbfVPFL7XcT5ty/K8/v7PUcqUgGUFCXt+PSPe7zfH0SnhVK62ock YH09Cpjjte3f7sFPrvpVRJTv0GPB13fELqqCd+Lwze7d7CW/jHrDR4rnIYwS4MNO49gc JueHTfcG1cbzck61lEtnvNypx+Q5bzSGqKKFnlyP17F+T+4HGU5k1x5T2+IVlqpuUxyW Ybvw== X-Gm-Message-State: APjAAAX6T2damFYztsUrExJ5aGcu22VBqEUupxGDxetq3SJaMSD1E553 Bwq24tCpZfDdUW2GfogFmuAOpA== X-Received: by 2002:ac8:2413:: with SMTP id c19mr18040488qtc.348.1554595848871; Sat, 06 Apr 2019 17:10:48 -0700 (PDT) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id k89sm3016349qte.33.2019.04.06.17.10.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Apr 2019 17:10:48 -0700 (PDT) Date: Sat, 6 Apr 2019 20:10:46 -0400 From: Josef Bacik To: Matt Mullins Cc: hall@fb.com, ast@kernel.org, bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Josef Bacik , Jens Axboe , Steven Rostedt , Ingo Molnar , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , "David S. Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Nicolas Ferre , linux-block@vger.kernel.org, nbd@other.debian.org Subject: Re: [PATCH bpf-next v2 2/5] nbd: trace sending nbd requests Message-ID: <20190407001045.vbmwrzaokqb4ufww@MacBook-Pro-91.local> References: <20190405235506.29236-1-mmullins@fb.com> <20190405235506.29236-3-mmullins@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190405235506.29236-3-mmullins@fb.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 05, 2019 at 04:55:03PM -0700, Matt Mullins wrote: > This adds a tracepoint that can both observe the nbd request being sent > to the server, as well as modify that request , e.g., setting a flag in > the request that will cause the server to collect detailed tracing data. > > The struct request * being handled is included to permit correlation > with the block tracepoints. > > Signed-off-by: Matt Mullins > --- > MAINTAINERS | 1 + > drivers/block/nbd.c | 5 ++++ > include/trace/events/nbd.h | 56 ++++++++++++++++++++++++++++++++++++++ > 3 files changed, 62 insertions(+) > create mode 100644 include/trace/events/nbd.h > > diff --git a/MAINTAINERS b/MAINTAINERS > index e17ebf70b548..6db583d2b0ea 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -10737,6 +10737,7 @@ L: linux-block@vger.kernel.org > L: nbd@other.debian.org > F: Documentation/blockdev/nbd.txt > F: drivers/block/nbd.c > +F: include/trace/events/nbd.h > F: include/uapi/linux/nbd.h > > NETWORK DROP MONITOR > diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c > index 90ba9f4c03f3..7393d04d255c 100644 > --- a/drivers/block/nbd.c > +++ b/drivers/block/nbd.c > @@ -44,6 +44,9 @@ > #include > #include > > +#define CREATE_TRACE_POINTS > +#include > + > static DEFINE_IDR(nbd_index_idr); > static DEFINE_MUTEX(nbd_index_mutex); > static int nbd_total_devices = 0; > @@ -526,6 +529,8 @@ static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int index) > handle = nbd_cmd_handle(cmd); > memcpy(request.handle, &handle, sizeof(handle)); > > + trace_nbd_send_request(&request, nbd->index, blk_mq_rq_from_pdu(cmd)); > + Just use the handle, not the pointer. Thanks, Josef