From patchwork Thu Oct 11 04:12:23 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: 10635705 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 5DE0D933 for ; Thu, 11 Oct 2018 04:12:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 41B842A63B for ; Thu, 11 Oct 2018 04:12:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 321CA2A63D; Thu, 11 Oct 2018 04:12:35 +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 C86B42A61E for ; Thu, 11 Oct 2018 04:12:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EF7766B026D; Thu, 11 Oct 2018 00:12:33 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id EA7016B026E; Thu, 11 Oct 2018 00:12:33 -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 D6F346B026F; Thu, 11 Oct 2018 00:12:33 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by kanga.kvack.org (Postfix) with ESMTP id 96AB26B026D for ; Thu, 11 Oct 2018 00:12:33 -0400 (EDT) Received: by mail-pf1-f198.google.com with SMTP id p89-v6so6684641pfj.12 for ; Wed, 10 Oct 2018 21:12:33 -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=ZadgFER+Ti0t3eVadlM5lMUfqb6Yf1z3Jkv4eD79Mn/BJSHB/JlVVE6mZ5dYeTd6j2 IsanOjaW86MjyC3WE0ER+onNCQB1KCm3Sa2Y0vfq0PcRRgEfnnTBeTby56LNoWoIXRDy gdZx03X2JuPLk+eL5VfhHBDJ4za22Z3oR3Qf+qVTsUYxLIyIYicKsKo2q8HVMqxU26mh N8rr8HTYIpUJxVMAyxvygSO2t3CxoiKAxqpq6Ujr/AKbtWFySsU1M5AJrGJbypSupKbG ASmD7DTiJq0k7EzoGQyguIqyLFjxu8l0W88z9iwzifePBdO5/LuoBU1vWIlOvCxsKESo Mwmw== X-Gm-Message-State: ABuFfojEJIPqqlQKjnGXNnoiq4UFzLelWIPDh7nDV9vw3ymfO5e7dgKX DyBwAh4Bcj4MX8vlAiMOVfY3GUfMHvbZcGqvXw5OEGZ8h6qgbBAHKdMKerwxzpIPur0uV3H0BjX qu/iy601RYy+UXWdgZL5RAhYGStqF+Pb6zt1gTM3W843gNhBkbzO6DcC7cYcGGY1DAQ== X-Received: by 2002:a62:7788:: with SMTP id s130-v6mr37456759pfc.189.1539231153302; Wed, 10 Oct 2018 21:12:33 -0700 (PDT) X-Google-Smtp-Source: ACcGV62bGpXBObEy6rhrqdZGWftZjos2thQEBK1oqks12AM1gv+4WmPj+M5qRlYYeIoaQJO/udxm X-Received: by 2002:a62:7788:: with SMTP id s130-v6mr37456725pfc.189.1539231152621; Wed, 10 Oct 2018 21:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539231152; cv=none; d=google.com; s=arc-20160816; b=RTmS8PKwgWUlTT/GYv5JACr4167c0reQDpOXWmFIwFHHcfRyjQKbns0yLRDTUqSJft yE/bFRq8Tv/fIaGu1lSuxct7t2W+9oZj/K+rlKTr6JJ//G93Kxl29Ma+Uxbq6W8NJ5Wx VSLF5Uv/kdFJOXfOvroZ06lwN+dg2rsQm/degqoi6tuk6z8WJfCp+URC4tc6vFmsCym0 x3xCzuvqITbyIcwDh2klywnYniqMgecfgfQI0muR5E7gZb8TxMzur4boS4PAKbvMhoCY e0aMCJxWBrFqpKGT8PXo1N4mZyQ/U2W6TyWogAlRXO62NwMVo2D6Bxq8UScKjSirQ4Sc LXwA== 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=HSrAbh9rD2IEGsrhQg3qptpm1xC0G746AsHwGu3asY6ra9qzTqHfQ1D1Lr7A0bs0ak 7RiKi8SPsKHSIeoH4CU4KsxPstQDHP2GfIa7f/APSXk9YMcJz9Bknn61xz+yLx6zuooa dXK2WRL+mHc/HdNdJ+qs6DNxAX8+yYVG8cLkRO93CvZ+IsB4R2QphHv4Oih3H0nE0hs5 7RtKUtpucLutT2VslEcazYTbZTdq2JN15Uvk0COTc8m0XiDCwbN0yZmgIZHVOgCdWxv/ YzKLw49OWZuk1HUsk4mdwU29JcOQKqECalpp3OInD0nL3caHNBVcmUZG4RR4t2QjI4Io uR+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=gGVBr+xu; spf=pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.85 as permitted sender) smtp.mailfrom=darrick.wong@oracle.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from userp2120.oracle.com (userp2120.oracle.com. [156.151.31.85]) by mx.google.com with ESMTPS id d13-v6si27466958pfo.108.2018.10.10.21.12.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Oct 2018 21:12:32 -0700 (PDT) Received-SPF: pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.85 as permitted sender) client-ip=156.151.31.85; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=gGVBr+xu; spf=pass (google.com: domain of darrick.wong@oracle.com designates 156.151.31.85 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 (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9B496bi191359; Thu, 11 Oct 2018 04:12:32 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=gGVBr+xuueHi48YgdV6/3br4ddfeOXNKO8kq7ROcMqMl1L6Jc71ruQAzdq5jlWhYuKO1 uRHGo0YxLVvT6vUbcJGAqqo4Zzp5zyyJfRVKs8696MKrKyZmj9R7io26NhW105Kb7/q5 BisUhnwBZh7C86kt2zJXBgJuvD2PtmsNOY6qBaIWiah/7DN8hyHkQoCPNX0JozKTL5xD +ybkKKxQZl52eCddUtVBw7HHL5F2zTIDIv9Z2ZJAfhpKJI1v9iIkj84bEJ39QS0eLpPC LpmA3xM6UgzZER+I0TPki2412rZ0Fz0u7o4Uec/7uvMVlCT5eK0OvCDc/NSP6dJqCrLY QA== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2120.oracle.com with ESMTP id 2mxnpr98u1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Oct 2018 04:12:31 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9B4CP18010556 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Oct 2018 04:12:25 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w9B4CPXa007856; Thu, 11 Oct 2018 04:12:25 GMT Received: from localhost (/10.159.132.249) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 11 Oct 2018 04:12:25 +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: Wed, 10 Oct 2018 21:12:23 -0700 Message-ID: <153923114361.5546.11838344265359068530.stgit@magnolia> In-Reply-To: <153923113649.5546.9840926895953408273.stgit@magnolia> References: <153923113649.5546.9840926895953408273.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9042 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-1810110039 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 */ /*