From patchwork Wed Oct 10 00:10:45 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: 10633421 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 1E01516B1 for ; Wed, 10 Oct 2018 00:10:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E48029C92 for ; Wed, 10 Oct 2018 00:10:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0C48129C99; Wed, 10 Oct 2018 00:10:58 +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 A98E829C98 for ; Wed, 10 Oct 2018 00:10:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B08C26B000A; Tue, 9 Oct 2018 20:10:56 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id AB91F6B000C; Tue, 9 Oct 2018 20:10:56 -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 9A93C6B000D; Tue, 9 Oct 2018 20:10:56 -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 5BC0B6B000A for ; Tue, 9 Oct 2018 20:10:56 -0400 (EDT) Received: by mail-pf1-f198.google.com with SMTP id 14-v6so3177673pfk.22 for ; Tue, 09 Oct 2018 17:10:56 -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=89x/kON88z0SWLBhLOQF02OXzgiCMuZXQJYo9kVK6z4=; b=HLKM5wDlmKaElmYZrK1+kqv2ConlgaDgSHPVe6JQ/7fy272/jAwR9YywkY5ONyGn+Y B1sUWRq2mHYulP5ikKJxK+6kWtkVKfbEoRHG5j2UDNB6oSJNoVNQp535mujyFeHGCy/b 9opGLNu51f4262WZacVnIT1zdrPb2yS8kIDK1gkVTaZ4p0lNodjUs1R3J8xUZpcTZbok p424aRg3YvNg4XhFrCAY3yWX1Y4ZK2JvQtw9+Fgd+eiMBOhSysKNnuVPpLiKHDncXRvo 1ea+d8GDAhdAJtDDPm+RpiLRreonK5Weu2sw+FsX/msnhVVCDncCEVdDoLpsoxG5xHw8 aD5A== X-Gm-Message-State: ABuFfoiXQUUh4S7tmDnUEEoyjZpgD8SS6JvmUZYH7c5YromYR78uLo5t VWylDy4JLj0Rj9V8ITw2KKlsAvvTQUG4gAq1mybi8dslUjFzDrngnmaNrF3G5lcE2s7gFNO1nY6 pSRS5U1uwsWyD4KN56MmBRDuV/WHwVo3d6AtzARVqfaRdqrNjreumxx8ggzHu9ebTxg== X-Received: by 2002:a62:6b0a:: with SMTP id g10-v6mr7653168pfc.174.1539130256070; Tue, 09 Oct 2018 17:10:56 -0700 (PDT) X-Google-Smtp-Source: ACcGV61kb+RhiKgcsAqSpKDLJFwI6fcGwdyW7Jj9w/iXfOE0AoE31Q6oYxKKxRBVPubKnejfYP06 X-Received: by 2002:a62:6b0a:: with SMTP id g10-v6mr7653115pfc.174.1539130255404; Tue, 09 Oct 2018 17:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539130255; cv=none; d=google.com; s=arc-20160816; b=mFY4VgufNizv2TKv/i8uZHBEeT3RG7xuljE7I7gYFk4qhb99RuDDXBOd2u42Aoa5GG Lr8/RH5KayDanepspRVKQbJcHeG0jxfkf209G2GXGyi+6IxlTu/MnYuX1T3WWRJoh943 9tBrOHrJqPxi1zx+L7wMNP04FO9MknWjJPFtJleSENdoTgG9TiwjW5iMQn4tEWnDClOG VfsWCrn6NtWzl1pHMl1BPEDHsmxpE0TuKbiMhki/iBlrF+iBHX9IQx8OG8iFxWVDkMq5 dYCrXmxkBJLgMWBMLWTmnjiUDavENw+tvtRaArQG/+9jthtkAUR8Pn52vbs3atygX0vl /LZw== 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=89x/kON88z0SWLBhLOQF02OXzgiCMuZXQJYo9kVK6z4=; b=d80VXMiuDBQ8vNDSkcPYMc5oCSif0F0hHCNlVkt4tHKT75cmtrpl+c+y43y+NEY1QL qunXS76HGZFgaZ9BhcsTKMrI88q3/DdVRPTQbuNZXMjjyzQzaMtxkXre/7hnpf2mBlpS o0TCklWnSFHZ/SzQeycOkX9BUiFLnUDiDaxdAk+jDDCqvU2yI7+d4VRf+0byq01/0AUV MojjUp7/1jmkUNN144w9h5ox+kuPbFHtFmp4OAWu+RGdeV10OYO7ZEXhkPs1IIIzTLQu HOeTnTcWSDhYmnvfbZWpMBd8VCFdKeR1FhEOqaNeHwYpkqp/r5K1LtO1XiKqzyGwLOoy B5tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b=nfOS5n41; 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 97-v6si22987597plm.290.2018.10.09.17.10.55 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Oct 2018 17:10:55 -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=nfOS5n41; 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 w9A08wZ1138901; Wed, 10 Oct 2018 00:10:54 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=89x/kON88z0SWLBhLOQF02OXzgiCMuZXQJYo9kVK6z4=; b=nfOS5n41uY8VFNV1Dqq86DJ6FjJJDSrNYuZdCYjzRZHTIi1CmUcQsjEtk3TVrh1klc75 In8sMLziz4DbzwtZtLgCpr8JNn+GgXPgwJN7Fy8Ho95jFZN3JfaksPWf170UB50qVbYl 3pjL3W6JIh3S5WuuHOSllQ2l1WBT7ST0qoWGzAnMxMA6H5mGf0VTOV5V49dYJIKHQI/g SB/fEYBMLvxduLDTqa2YExii0U+p26uOYXqtlaM6jGfIdKEEWl0O8EZJX5eFWXtfefFu mLHlG0Gef8Dosk4QDuYXmtDpwqsrIZUyhOdwuGaRm+l8OJ0ragrShZF0YQ+rjgF4pq5d hQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2mxn0q0tfq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Oct 2018 00:10:54 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w9A0AlUT030521 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Oct 2018 00:10:47 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9A0Al7g002699; Wed, 10 Oct 2018 00:10:47 GMT Received: from localhost (/10.159.249.114) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 10 Oct 2018 00:10:47 +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: Tue, 09 Oct 2018 17:10:45 -0700 Message-ID: <153913024554.32295.8692450593333636905.stgit@magnolia> In-Reply-To: <153913023835.32295.13962696655740190941.stgit@magnolia> References: <153913023835.32295.13962696655740190941.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9041 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=942 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810100000 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/xfs/xfs_error.h b/fs/xfs/xfs_error.h index 246d3e989c6c..c3d9546b138c 100644 --- a/fs/xfs/xfs_error.h +++ b/fs/xfs/xfs_error.h @@ -99,4 +99,9 @@ extern int xfs_errortag_clearall(struct xfs_mount *mp); #define XFS_PTAG_SHUTDOWN_LOGERROR 0x00000040 #define XFS_PTAG_FSBLOCK_ZERO 0x00000080 +/* 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) + #endif /* __XFS_ERROR_H__ */