From patchwork Sun Jun 24 19:24:26 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: 10484811 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 705A36019D for ; Sun, 24 Jun 2018 19:24:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5391528643 for ; Sun, 24 Jun 2018 19:24:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 47361286F3; Sun, 24 Jun 2018 19:24:31 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B358528643 for ; Sun, 24 Jun 2018 19:24:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752030AbeFXTYa (ORCPT ); Sun, 24 Jun 2018 15:24:30 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:57764 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751593AbeFXTY3 (ORCPT ); Sun, 24 Jun 2018 15:24:29 -0400 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 w5OJOTVm119917 for ; Sun, 24 Jun 2018 19:24:29 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-2017-10-26; bh=RqVE3XTWjAAm7bdAFs+IeL8vIPBKQqw83LRLggdpLRA=; b=Q3z9NrkR1XmboMJBVU4ueAfZW4+A/8/qF+tYjzUq2N4ddnnXv5JEUHfS57Gbg4tTCybS b5nLYIfxqrLfU3jyIvFefNg9CHIv0LuG1e44W0NbRiedBcS9tSOTJm1eJGhUncNdhi8h HzvN1eAoTrAc3IEKHEER+44JUypy9A+f+1dgWbVK5/nPLMPrZYAXG14bbFjYdue9eDzf So/EK26BBxBX5A4pf2dT31f1/KIRf3vWrfrKDMgy/LXJj8d5PQrilqyY1JX4fDvKHI4i 0j7vvdCVuDOgesa0hoNM2B4KwqWwkEjjyULyLYHzMYIS+lz7/L850UB4XuqWM0f7gMZg kQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2jt7mp8hp5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 24 Jun 2018 19:24:29 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w5OJORTW020122 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 24 Jun 2018 19:24:28 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w5OJOR0m031691 for ; Sun, 24 Jun 2018 19:24:27 GMT Received: from localhost (/67.169.218.210) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 24 Jun 2018 12:24:27 -0700 Subject: [PATCH 09/21] xfs: finish our set of inode get/put tracepoints for scrub From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Sun, 24 Jun 2018 12:24:26 -0700 Message-ID: <152986826640.3155.4987566125495724086.stgit@magnolia> In-Reply-To: <152986820984.3155.16417868536016544528.stgit@magnolia> References: <152986820984.3155.16417868536016544528.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8934 signatures=668703 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=868 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806240236 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Darrick J. Wong Finish setting up tracepoints to track inode get/put operations when running them through the scrub code. Signed-off-by: Darrick J. Wong --- fs/xfs/scrub/common.c | 2 ++ fs/xfs/scrub/dir.c | 1 + fs/xfs/scrub/parent.c | 1 + fs/xfs/scrub/scrub.c | 1 + fs/xfs/scrub/trace.h | 3 +++ 5 files changed, 8 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c index 9740c28384b6..6dcd83944ab6 100644 --- a/fs/xfs/scrub/common.c +++ b/fs/xfs/scrub/common.c @@ -717,7 +717,9 @@ xfs_scrub_get_inode( error, __return_address); return error; } + trace_xfs_scrub_iget_target(ip, __this_address); if (VFS_I(ip)->i_generation != sc->sm->sm_gen) { + trace_xfs_scrub_iput_target(ip, __this_address); iput(VFS_I(ip)); return -ENOENT; } diff --git a/fs/xfs/scrub/dir.c b/fs/xfs/scrub/dir.c index 5cb371576732..a11dde63535c 100644 --- a/fs/xfs/scrub/dir.c +++ b/fs/xfs/scrub/dir.c @@ -81,6 +81,7 @@ xfs_scrub_dir_check_ftype( if (!xfs_scrub_fblock_xref_process_error(sdc->sc, XFS_DATA_FORK, offset, &error)) goto out; + trace_xfs_scrub_iget(ip, __this_address); /* Convert mode to the DT_* values that dir_emit uses. */ ino_dtype = xfs_dir3_get_dtype(mp, diff --git a/fs/xfs/scrub/parent.c b/fs/xfs/scrub/parent.c index fd0b2bfb8f18..c5ce6622d4f9 100644 --- a/fs/xfs/scrub/parent.c +++ b/fs/xfs/scrub/parent.c @@ -170,6 +170,7 @@ xfs_scrub_parent_validate( } if (!xfs_scrub_fblock_xref_process_error(sc, XFS_DATA_FORK, 0, &error)) goto out; + trace_xfs_scrub_iget(dp, __this_address); if (dp == sc->ip || !S_ISDIR(VFS_I(dp)->i_mode)) { xfs_scrub_fblock_set_corrupt(sc, XFS_DATA_FORK, 0); goto out_rele; diff --git a/fs/xfs/scrub/scrub.c b/fs/xfs/scrub/scrub.c index b66cfbc56a34..b24b37b34d85 100644 --- a/fs/xfs/scrub/scrub.c +++ b/fs/xfs/scrub/scrub.c @@ -191,6 +191,7 @@ xfs_scrub_teardown( sc->tp = NULL; } if (sc->ip) { + trace_xfs_scrub_iput_target(sc->ip, __this_address); if (sc->ilock_flags) xfs_iunlock(sc->ip, sc->ilock_flags); if (sc->ip != ip_in && diff --git a/fs/xfs/scrub/trace.h b/fs/xfs/scrub/trace.h index a050a00fc258..2a561689cecb 100644 --- a/fs/xfs/scrub/trace.h +++ b/fs/xfs/scrub/trace.h @@ -509,6 +509,9 @@ DEFINE_EVENT(xfs_scrub_iref_class, name, \ DEFINE_SCRUB_IREF_EVENT(xfs_scrub_iput_deferred); DEFINE_SCRUB_IREF_EVENT(xfs_scrub_iput_defer); DEFINE_SCRUB_IREF_EVENT(xfs_scrub_iput_now); +DEFINE_SCRUB_IREF_EVENT(xfs_scrub_iget); +DEFINE_SCRUB_IREF_EVENT(xfs_scrub_iget_target); +DEFINE_SCRUB_IREF_EVENT(xfs_scrub_iput_target); /* repair tracepoints */ #if IS_ENABLED(CONFIG_XFS_ONLINE_REPAIR)