From patchwork Fri Oct 28 07:55:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 9401469 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 6B28460588 for ; Fri, 28 Oct 2016 07:56:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 591DF286B8 for ; Fri, 28 Oct 2016 07:56:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 46E3D2869C; Fri, 28 Oct 2016 07:56: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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 C50DD2A5EF for ; Fri, 28 Oct 2016 07:56:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S942268AbcJ1H43 (ORCPT ); Fri, 28 Oct 2016 03:56:29 -0400 Received: from esa1.hgst.iphmx.com ([68.232.141.245]:13228 "EHLO esa1.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936373AbcJ1H4V (ORCPT ); Fri, 28 Oct 2016 03:56:21 -0400 X-IronPort-AV: E=Sophos;i="5.31,556,1473091200"; d="scan'";a="28345205" Received: from mail-by2nam03lp0049.outbound.protection.outlook.com (HELO NAM03-BY2-obe.outbound.protection.outlook.com) ([216.32.180.49]) by ob1.hgst.iphmx.com with ESMTP; 28 Oct 2016 15:56:21 +0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector1-wdc-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=4v70mXw5gGsqW5WRLu2UjadaL91WUdj/R5b3ALopTCs=; b=jqsfTYFNuyzz1msioyBD637kqoovUwARVm8+TZmcQw8yJDu1R5Yhgw/fXgz5ZGrPctsuhXDg5/hj08zYyvlKLAJ2hf9Khw5U9IBg0fBNRGVON1tve+Sq/d06QssclkGwBImA4dHXgHHgUrd/8W80+mvNJl35heGOK1jq5dbmOd8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Damien.LeMoal@wdc.com; Received: from washi.fujisawa.hgst.com (199.255.44.5) by BL2PR04MB1972.namprd04.prod.outlook.com (10.167.97.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Fri, 28 Oct 2016 07:56:17 +0000 From: Damien Le Moal To: , CC: , , Hannes Reinecke , Shaun Tancheff , Damien Le Moal Subject: [PATCH 9/9] f2fs: Trace reset zone events Date: Fri, 28 Oct 2016 16:55:37 +0900 Message-ID: <1477641337-12321-10-git-send-email-damien.lemoal@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477641337-12321-1-git-send-email-damien.lemoal@wdc.com> References: <1477641337-12321-1-git-send-email-damien.lemoal@wdc.com> MIME-Version: 1.0 X-Originating-IP: [199.255.44.5] X-ClientProxiedBy: CY4PR02CA0042.namprd02.prod.outlook.com (10.175.57.156) To BL2PR04MB1972.namprd04.prod.outlook.com (10.167.97.144) X-MS-Office365-Filtering-Correlation-Id: 6267ac1e-da13-4f90-d115-08d3ff07e6af X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB1972; 2:W+a9BaMQnq1G+aR6HbdGOw4hxBSEhOmtGJgVxwfjv+j3puYfXamJp1CXUvSNxGkvbub7N3ssnn9lUErqJB3jsvUz9VQcxUvhjw9ECu1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HrjLpNg== X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB1972; 31:+1al83Cbn0D9pbJbbHZAUKgiP40j5UAsrn3SV31h2YQcrCOewvK+N2sum/K1RW19+p7nEkUKaONEArul2JNXFeh5bXVtsmAfksTvWbyB/7oFg09DLTTZ0x4AyhURPRjTznjRSEq7/rJWN/jILd0myBX9nomLVnD/8/XA6iQHaZbRyRLMAPmO+7S3Yn+JJl6Q+pJUY9fTCQyvb7U1Z8PVftnKr6YvgM4T3as6sjhnAgBZ+nVigpue8ACvcDaZigj8ffgkS7VWdHjjEzkqhCMc4A==; 20:v4W3buNM8M06gFZahQEWmrT2iO3jNCCPQPvnDGd1XW26eQTFpXU7bLGxRKlcAy/Ymtb4hPNspE/NriadqUBKmKz/a43dixYQ+OceDlyVdpZdbxY42NVqomcdlrFNwQZTCMgBzPQqol+WBEaoL+uhvS+vAZPYYW6tmGzxnwF4agC6WeAdZsW7hPEk+r4uWbZgytoYZ7DCRPtU+1cnVmbTFUtR1DWjX15wpqKOXEAV6ITjiXE9AdqVLF1AdBPBIPuWMwyUbhrgFM86btowzvZiF+KJ6K39FJkHBS6iWBbShWgDDykOgbDlzi/i+1OGkPG2fcf99+4t7c8e2esSvKomMNdrZ/Q8MdQThnDBdCVSeeWRcwj7XT9oDBu9eoULvhw1oOxBQde+IQ8umsa2SRT06u1CdKeq/BeiJuqQterwfkINmg2xFIJ1NoWQuVGViz+fJTo/2FiwWYQvkGU64q/9zA3iM+wh3uTbw32i3ijDNjhClImYcv5VUcRQlQXP19AN X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026); SRVR:BL2PR04MB1972; BCL:0; PCL:0; RULEID:; SRVR:BL2PR04MB1972; X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB1972; 4:KzJgsrh4ISNT3CQuW6ZJoC/chv8Jlvychh+j2AWHWLkycy05bYHzmldOlY4gRLERK7M4SWrSyt4OASansr0m8P3lW7dz340cMIZvlJWX+5MSUq2mQt/CTUMTo9YvAFXWJnspfGc3l+aZI4WmBIdcaNhK5tHvyWtWbOyKOhjB/7kKWC2BMFBkY/KLF94kwO8jwUtz8BbbPesP4NT615Wp7kzoSbSi6F79F7baqYmZfQoReHWGatCdhwj20O0AzAAyk7jRMCOngr0XuXFd6Qijqs1dVaOAgoBSHpj1+t9DbaH8Lrf3Y/YSIF8Gz5gjGptg0xYTS0b8//aztdiAqqAPKtvbyf0bSetm1snfZAFMoaNn5qZ55FZdR6QXX3w6IQIWw5UGdPHtc3Vyh82HTx4eseUO3aiUPECRA0vwn4U8VoY= X-Forefront-PRVS: 0109D382B0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(189002)(199003)(7736002)(305945005)(7846002)(81166006)(77096005)(92566002)(4326007)(5003940100001)(6666003)(2950100002)(3846002)(76176999)(50986999)(68736007)(2906002)(50226002)(81156014)(8676002)(6116002)(47776003)(586003)(66066001)(19580395003)(5001770100001)(19580405001)(33646002)(106356001)(105586002)(229853001)(101416001)(189998001)(97736004)(36756003)(50466002)(48376002)(42186005)(86362001)(5660300001)(7099028)(5005270100013); DIR:OUT; SFP:1102; SCL:1; SRVR:BL2PR04MB1972; H:washi.fujisawa.hgst.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: wdc.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BL2PR04MB1972; 23:m2tPKXd8k9UYG415hN/bVsWVucNkjOocxrraMxCms?= =?us-ascii?Q?rlDf5hYoRGV/1eUDUIxU/5kF7WCQ7C7Ddh8nuZTMfZ9rRLXTyCG9Z1+61p9i?= =?us-ascii?Q?o0wlNStUlixdqQkz7VxV/Ma9zbXdgSKd1S/RQGIUdJMiPLpDnb1ZoK/3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YIQjDyKE//5tHR1TOIL74KhqTXpuHeQRo5HtRx6?= =?us-ascii?Q?qJM7Dj05riQoWWekWOZs9lvmSS5HJzQ3YFk1zxxYrUkJ2qXzS6puugYu3Z7i?= =?us-ascii?Q?jDysqXeRvg=3D?= X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB1972; 6:1bxc/fUKG5jxkpDGD4apXeXs+Wcy4PUw5IJRVniFspBVvxScB7eF4hzHPSl+Ano4tXXiaAybtB7Aux4qXTC+hIIYBg/PUyICt4DyqC/d0M27quSl5Mwpo2ooaROI6ZryyMgHO3iRnsRvxIScOZAokqykA6pzXZRvZhkw/UnngOGPL7Us9mK2Q8b47GXWH/DuHJXpwApUj44Md0Vhu4tDmvDJ6BGZXafeTzhxJFGdMSJeaEuyIpD6vWxvWctegAbFMvCkxwxHN8TaFsMMhi8NPDATmTO5tNJBnY3BG/z05W3u03UlDcOEE5EvsrcPcobLua+fKYchvMDwTsnxgRu3mA==; 5:38WEibsyPcp8htzacS2tInS1pUyTi7McP/A1ukXufHL9DwrgBAVJOm7/F9oAsaXtpz9lPQyVBo7Q4WibUA2O6RbRU5C4wY3WdoM2DhFDcTCzJwUPi+s3SAwQ0OqYXIbB4k2nWnW9P01sag9YytcXUA==; 24:fdPwcE/PPX2EWA98fHB7dX8430RR4WJZU5RGEFxtazQFbMA+nMPvf0kx1lPmqUxvsH9DtPwkU4dcyDM2ksvXG4flSHR7H4xaugSM3vejkwk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BL2PR04MB1972; 7:hQmm1OjHq/v7eKcZjb1nUWzl7vMVY6pipHZDS/3Aglh1hcm1GDL0c2PF4wHjD9UevX2VTCxFdGjHyHPTn+X+oDbLxniom4jvdg5Q/T4zv0U5eZJ8kgswwOeisWdM6kdGgHMnwfSo+X/xA3ZqQKHQ89xa7IT8Ut5nSS8uNBIWChn/5nyL5svIcdbrzhYKketT3rnerjQx4LZQ/koWvIHDpsjqJHlolxzKYVmP5L/aqcpVYJnMuFpihtrjvH9XG8zqrGTayQsyNca88ALjP3Y58W/tQHCPu7HgxfvZzcIndiiwV8iqq4Yp8a7J8hGeRZw2vkaRRufNnLbjFNGSBcM0Zo3pKrjH10d/gdynsHqXWJU=; 20:rnsgjSCMkkr4qlodXW2Ex+eg4Iw0KPTEBdK0NZxA2r4xyafCYXT2GyU7aJ/EdyKdMC2MQBwxoiFQq/XHhX2Hihlb82+qmJzhlWDvHlvWnnboRBz9F8MOeXFu8kAD4MtG8Ivwap7VuMykVeUGR0GxAzlmPrqdMJdqUjZSrFAgRmtuKywcprHFih2u079x3bDjQbfIx6c2rR+g2TZ/5bWHjbpTeR0gIj3NDhDs/1ecyyyLWjVh0aiY1sJaalnKVW34 X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Oct 2016 07:56:17.0342 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR04MB1972 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Similarly to the regular discard, trace zone reset events. Signed-off-by: Damien Le Moal --- fs/f2fs/segment.c | 1 + include/trace/events/f2fs.h | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index bce79e2..064a78b 100644 --- a/fs/f2fs/segment.c +++ b/fs/f2fs/segment.c @@ -688,6 +688,7 @@ static int f2fs_issue_discard_zone(struct f2fs_sb_info *sbi, case BLK_ZONE_TYPE_SEQWRITE_REQ: case BLK_ZONE_TYPE_SEQWRITE_PREF: + trace_f2fs_issue_reset_zone(sbi->sb, blkstart); return blkdev_reset_zones(bdev, sector, nr_sects, GFP_NOFS); diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 903a091..a2193e3 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -1113,6 +1113,27 @@ TRACE_EVENT(f2fs_issue_discard, (unsigned long long)__entry->blklen) ); +TRACE_EVENT(f2fs_issue_reset_zone, + + TP_PROTO(struct super_block *sb, block_t blkstart), + + TP_ARGS(sb, blkstart), + + TP_STRUCT__entry( + __field(dev_t, dev) + __field(block_t, blkstart) + ), + + TP_fast_assign( + __entry->dev = sb->s_dev; + __entry->blkstart = blkstart; + ), + + TP_printk("dev = (%d,%d), reset zone at block = 0x%llx", + show_dev(__entry), + (unsigned long long)__entry->blkstart) +); + TRACE_EVENT(f2fs_issue_flush, TP_PROTO(struct super_block *sb, unsigned int nobarrier,