From patchwork Sat Oct 13 00:05:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10639405 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 88E841869 for ; Sat, 13 Oct 2018 00:05:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 756942B78F for ; Sat, 13 Oct 2018 00:05:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 690D32B7A0; Sat, 13 Oct 2018 00:05:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CA702B78F for ; Sat, 13 Oct 2018 00:05:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 19DF36B000A; Fri, 12 Oct 2018 20:05:49 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 176696B000C; Fri, 12 Oct 2018 20:05:49 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 062866B000D; Fri, 12 Oct 2018 20:05:48 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by kanga.kvack.org (Postfix) with ESMTP id CF9E96B000A for ; Fri, 12 Oct 2018 20:05:48 -0400 (EDT) Received: by mail-qt1-f198.google.com with SMTP id f20-v6so13786593qta.16 for ; Fri, 12 Oct 2018 17:05:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:subject:from:to:cc:date :message-id:in-reply-to:references:user-agent:mime-version :content-transfer-encoding; bh=SGDSArbiullpYs/XPOG6T2xvgHyk5haCgm1b67adURI=; b=RP9CVJ03wD3A1hR7zPB9vs7rBshC6KZXBiOGMo0R8q0jfrt8eUqviG4rSKhih8hxWA Sg16VXWvE8FSUkgyk3GiIkLVfVyr0GFaEMS4mWQ8EJkQ41yi6TQ66QBEmyfVKKKtKeoq H6jbggSijm6FE69q+YP7KuLCcFrXnZsUvWJ+nRkSu7miLXv0gWCTlCLW+fSdFG6Onwbg XB/kV0zjuPwLe2FSDS9fjjxhzAIsM0yA4/+2sLqOd0WFqUoiiy7MOLbGWEIhuU8MggVK H+Qm8ieyg607L4PvcQ3rhjAShAgnFy5p2QRdRdhOryYPRgUASXNlLggUDZV7o1g9oS18 ojQw== X-Gm-Message-State: ABuFfoimSgDTTPnl19chwgOCLqGQ6ROvoKR0cIaXgInZDs3kPtBVRydP V8TezBvP1c77CvxugW/PnpUMaW8zI816etgB4Q7kVPt1kLaNBstIN6wqI6M6hhmT7zEDZgputss 1HzLpmRkRLCBBd75k50WFJKCyXZiTAiYRZpbvNgrk4qkshDD+uoNY+PjNu4uiomL6qw== X-Received: by 2002:ac8:3f56:: with SMTP id w22-v6mr7694076qtk.151.1539389148634; Fri, 12 Oct 2018 17:05:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV620/n626u7Wi/xq1E8lZAYw8p2+EHDxaYYxlqb9Go8ELV7XAfWUufB0PFN3a5rPMkXI/jtd X-Received: by 2002:ac8:3f56:: with SMTP id w22-v6mr7694054qtk.151.1539389148182; Fri, 12 Oct 2018 17:05:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539389148; cv=none; d=google.com; s=arc-20160816; b=t0MjjRyo0TROXD7nEmpRjJShpuUHGa0U+FGqMYYMV1ht19xALpi3lH1AFHKHzENI4x v9uEvukcR9PQvyfIEOjvVo8Cjwh3hyAg3JX6yV8GGvN6y1scXJVDw7Ru7TcSVykzS+du +FrjV6EKMjzlOAaREVcj5DVXh2hgmhPv82P0CfOQT8FmqWtcHZRRRpYJesZs/Mf9CyL4 EfN7qki4ArsV5JyfwnTpIJlmXPUJMA1rkRGh98ahfU2/w63N6ETC+7uzD66ry2A4CDLM fnJL6ALJSWSQACqcBx82Zq4uROmkGS70A6bRd/8pNtSt6pRqSBSVnWfPoqeG1GyaTUaA m8+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:cc:to:from:subject:dkim-signature; bh=SGDSArbiullpYs/XPOG6T2xvgHyk5haCgm1b67adURI=; b=YcyQbnErCNsS+mFDKl+r+zYQehhe5hzPrJviOmkNV6s4nweiYrnR0ESOZBL9RBNXBd 9BctU1lkxtvGaMfzoVeB67G0g/AXzQq/+rt8yIuY8GL9X9Kp0kxC0zFZBR1hQwE0V5Tl 1xA+XTCVLHLBA8B8azeQGZXpVwRDT1q8Uo8SjrwNSrB2uF1k6xiBLjaqJ+1ryGcG2mdw /U6fIOKZD1Inlv0pqk+OQbe3szbAJ8/QSciMw/fCSQe77GAIU4vesnuU22DpX8q/o+gi p5UUv/FyA3GV+fP2QMwr08/Nm4qFgZeuM8ECGyOdancO9knRN1aQ1/SQd5hjGFX7WK5j VtIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=oNwgpjID; spf=pass (google.com: domain of darrick.wong@oracle.com designates 141.146.126.78 as permitted sender) smtp.mailfrom=darrick.wong@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from aserp2120.oracle.com (aserp2120.oracle.com. [141.146.126.78]) by mx.google.com with ESMTPS id z36-v6si770182qtc.248.2018.10.12.17.05.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 12 Oct 2018 17:05:48 -0700 (PDT) Received-SPF: pass (google.com: domain of darrick.wong@oracle.com designates 141.146.126.78 as permitted sender) client-ip=141.146.126.78; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=oNwgpjID; spf=pass (google.com: domain of darrick.wong@oracle.com designates 141.146.126.78 as permitted sender) smtp.mailfrom=darrick.wong@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9D057BO163699; Sat, 13 Oct 2018 00:05:47 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=SGDSArbiullpYs/XPOG6T2xvgHyk5haCgm1b67adURI=; b=oNwgpjIDNZVADHF5FGmmdkQvamecTKFIaqC7ydjFmufj+jzFl6rFFLISwtTT5t3U9+5U D7MM8isYqFusr3GLyZwmZ5szb86Dtw5SjUtwaHW6XEyNf1UBucufHwN/oE+ikbYrnFSG nlkg07QtKvrOmY2GCsGIhxfBO1/V7coUlLeXERJGusfETdfGTfniSvCkv534a3IA0Xt1 Ad0w0Us+OSSaR5q09HLtl+iwL/wR+dba9bYCgcnA8BzEzVNRh16Q/GT9sBNt4JVWj1JO 3KAFVEfACyq4N9g8fvZWYbONq/P/ksb65LROmKA7kBbCfV2Y9HO3HYGUo+Um2bAifwhc rQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2mxn0qnmbv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 13 Oct 2018 00:05:47 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9D05jCW000443 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 13 Oct 2018 00:05:45 GMT Received: from abhmp0001.oracle.com (abhmp0001.oracle.com [141.146.116.7]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9D05jc7017409; Sat, 13 Oct 2018 00:05:45 GMT Received: from localhost (/10.159.251.254) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 13 Oct 2018 00:05:45 +0000 Subject: [PATCH 01/25] xfs: add a per-xfs trace_printk macro From: "Darrick J. Wong" To: david@fromorbit.com, darrick.wong@oracle.com Cc: sandeen@redhat.com, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, ocfs2-devel@oss.oracle.com Date: Fri, 12 Oct 2018 17:05:36 -0700 Message-ID: <153938913665.8361.8967777059460905975.stgit@magnolia> In-Reply-To: <153938912912.8361.13446310416406388958.stgit@magnolia> References: <153938912912.8361.13446310416406388958.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9044 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=966 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810130000 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Add a "xfs_tprintk" macro so that developers can use trace_printk to print out arbitrary debugging information with the XFS device name attached to the trace output. Signed-off-by: Darrick J. Wong --- fs/xfs/xfs_error.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fs/xfs/xfs_error.h b/fs/xfs/xfs_error.h index 246d3e989c6c..5caa8bdf6c38 100644 --- a/fs/xfs/xfs_error.h +++ b/fs/xfs/xfs_error.h @@ -76,6 +76,11 @@ extern int xfs_errortag_set(struct xfs_mount *mp, unsigned int error_tag, unsigned int tag_value); extern int xfs_errortag_add(struct xfs_mount *mp, unsigned int error_tag); extern int xfs_errortag_clearall(struct xfs_mount *mp); + +/* trace printk version of xfs_err and friends */ +#define xfs_tprintk(mp, fmt, args...) \ + trace_printk("dev %d:%d " fmt, MAJOR((mp)->m_super->s_dev), \ + MINOR((mp)->m_super->s_dev), ##args) #else #define xfs_errortag_init(mp) (0) #define xfs_errortag_del(mp) @@ -83,6 +88,7 @@ extern int xfs_errortag_clearall(struct xfs_mount *mp); #define xfs_errortag_set(mp, tag, val) (ENOSYS) #define xfs_errortag_add(mp, tag) (ENOSYS) #define xfs_errortag_clearall(mp) (ENOSYS) +#define xfs_tprintk(mp, fmt, args...) do { } while (0) #endif /* DEBUG */ /*