From patchwork Wed Jan 4 11:21:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5p2O5oms6Z+s?= X-Patchwork-Id: 38873 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp5090549wrt; Wed, 4 Jan 2023 03:24:16 -0800 (PST) X-Google-Smtp-Source: AMrXdXvxjV1ko+he/ya7F+DPPma0LSuhjSf3vodq4ndtg0EOVTnIKMrsisZdl0P00sHlrx9hF96W X-Received: by 2002:a17:902:e411:b0:18c:cde:fdda with SMTP id m17-20020a170902e41100b0018c0cdefddamr49490056ple.37.1672831456205; Wed, 04 Jan 2023 03:24:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1672831456; cv=pass; d=google.com; s=arc-20160816; b=JCkIaneJb4njGF+o9eqMiiYm5A99buQblldrfi6v8Lu86Tp4OLob9L5PkC8I3jsPwY NhSaVCyTBH5B2niC9miyL83T5o15EbNT84K8CGAXbo0BuegTx13qh2RkDdUikMUEi7R1 46hMCy4LjOsRZtTOa5/5m4F03BFrJ/IvWouYHbA/KdHc6JPUMdhmCwBwoEsL5IeVh/dQ nryZOnykHstTPUNeYKjNU84KJvqjAwKL+CmfnlVnqzdD7XIHPzKGLqw7qBGtCk5hti2r DHJHemWc3ruI7IhyWtWO/d5ATEZ0Qu2iuI3tIkhyr7FdNynpisgw8UbTTD1fyr8np5fS 0+og== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ai+JopXKJvC1B6nBPtp1iRnXscgXjQpp2sOPErGoMD4=; b=IaAm+IHE7pB74viDperqP1+pRy+2EFZ9awfl8x+bkeEmxZDkVQJOxpcMjTHocsk/SK fhsl1qcHJ84bxCjdpZoDJFE2tvMCW8YPFEDrNJWachaxUeq84/C8HLi3RfvhzH2kCuxC hEMmquU8rHrDizhmAo7kl78EXvzviSUEOYZho229BtEJEh+l7hLhnwPf93kEwrmRlzeO 9igr1hohMYXsKm5S7RsoXQf9lG5ZWGV4nhdOg4yyF9R7JNiTFGyY7bvB9EYPH0dxPMNw bZoSWmw8jMtx1c3X7fgGA7WROuDkvLyp1/sAGcm50P7G7A5lPYKgH6GMtn7JzbwMFgNl xU8g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="ZHLgbS/5"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j7-20020a170903024700b00182c510591asi39311971plh.246.2023.01.04.03.24.04; Wed, 04 Jan 2023 03:24:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@vivo.com header.s=selector2 header.b="ZHLgbS/5"; arc=pass (i=1 spf=pass spfdomain=vivo.com dkim=pass dkdomain=vivo.com dmarc=pass fromdomain=vivo.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239095AbjADLWc (ORCPT + 99 others); Wed, 4 Jan 2023 06:22:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233067AbjADLWW (ORCPT ); Wed, 4 Jan 2023 06:22:22 -0500 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2112.outbound.protection.outlook.com [40.107.255.112]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ED4D1AA2C for ; Wed, 4 Jan 2023 03:22:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RhhwM1WabHbZ2fsq8iKNpD1LyWAr5PQ+VEJlaOBmzCtyg3fhmS/hLrVTkI98bMYdPHOE9NkEHT2Pz6WRJI3HJ5HGlGdHsQdmdE+1pg/NSBoy93+i31lgyZj/u5nKdJ7UbT39vCX5J5boC9oejRV6lcFgJHxvCf4lvH/5pfUOKdIUbNIcLBBGdcpf2udd5/KWHIHgMhGCSC4HZOko+NCbs9ez5Dumn2TuM7RmMZtjH6bR89z1qnJsAtR+4w7mJpRF9Nsm2eAYqsicpvBCcXJy8F2S206zjYTc+KbAcUDSkxbwdKDxt83SImQzUZRk5fJrBdFlmC4TpgSZOV5zvDqT/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ai+JopXKJvC1B6nBPtp1iRnXscgXjQpp2sOPErGoMD4=; b=LzDRiewMOfu2zrT6KBQuXCceyjxCLVqHmz/Xd1aJnQpUpQ0Ck49J6ihZ63MOUjVAENc95TlPBuhDp820ppcYd1LKux4Emtav0iYaL3t/xXI2fF2XWOsh5fZaNL3+2Xqt3JF+hxyhLRwEpIk/SmDaGeO/XAi8/UefpgEdvhkpPRsF2rMsQEPhJpP3yirerCUl6OUWhnsf5n03OZdiYKNC899TOw1duFJxoIuU51Kgku8FkN3LTMR0UkuL5ERiGH3zL74WWPI15LXEmUaJX7YhHCdNqd8wVZcDuKtf+wzAlT34pxQns20kYS3Y52bfsV9cqM8Hg4vQRSVkNiJAbL/LKg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ai+JopXKJvC1B6nBPtp1iRnXscgXjQpp2sOPErGoMD4=; b=ZHLgbS/5djIg5/1heBGIHv6ncWGJcHEJCjOwrwLWCXsTHrUAY93vL4yFAYTtlVVKWQGDAKZUkwKKc3MFxaEhFmxNQvxkHlNQTXOUvJYF55EUaUvUsYMjFLI9MXhK37sH4UXUES+A10wsb+DKxN3qxpUahKlxeRmLfadrFedrQ7jeS0LENQTYoQKh11E/LftsA42j6KfBQtoeQ7IVvLCGlx1r9SEGtwH63EV0dR2QUspHO20fNzsCm9qOxEOlHulUSon5kTNyHe07djTxe4qqAzeIA6xrRzs539sESHxBOokZuRvBC5uGbgmwS1kAmC1YOtYy9oaE7pzWWJ8utWJLGg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) by TYZPR06MB5844.apcprd06.prod.outlook.com (2603:1096:400:284::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5944.19; Wed, 4 Jan 2023 11:22:18 +0000 Received: from SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::7969:5a45:8509:7d80]) by SEZPR06MB5269.apcprd06.prod.outlook.com ([fe80::7969:5a45:8509:7d80%4]) with mapi id 15.20.5944.019; Wed, 4 Jan 2023 11:22:18 +0000 From: Yangtao Li To: jaegeuk@kernel.org, chao@kernel.org Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Yangtao Li Subject: [PATCH 2/4] f2fs: no need to call ktime_get_real_seconds() if iostat is not enabled Date: Wed, 4 Jan 2023 19:21:56 +0800 Message-Id: <20230104112158.15844-2-frank.li@vivo.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230104112158.15844-1-frank.li@vivo.com> References: <20230104112158.15844-1-frank.li@vivo.com> X-ClientProxiedBy: SI1PR02CA0002.apcprd02.prod.outlook.com (2603:1096:4:1f7::16) To SEZPR06MB5269.apcprd06.prod.outlook.com (2603:1096:101:78::6) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR06MB5269:EE_|TYZPR06MB5844:EE_ X-MS-Office365-Filtering-Correlation-Id: dbdb3fc4-e1ae-45c1-3231-08daee45f0aa X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Kca0+7/glkjNtOiJoauv85PRAIXvI6mMDIYIbq0YkDxd1hwpaFdG/DbImubhDGjT4ta6RScL9VOMFyGtOp92ElII6mdB24KWkN2d77kEyvUJAdrseAnlIkNA9C+kiaGAzBt6PVRtJz5d73v9tS7Bhj2ZMzXiM7UK5KZvQm3+NVU+iphRepoccif5HK7gxKIwZz7g7baB6b3sh219X1F6LG19uHw973BTaIuWaeRhVgJg6As/AgQJeJlqPsLWp4KfUvr85nYgs8hLrjdUurzSGm1w0MqkXii3e0KRptEL+LA1iBoZVd7tS0P2oUsoTcZjxlSuBlVWK5wJRWcbRdqYUPiJsl96WbcAlshEojM7A1O3N7ePfgXX0e009k0h+ynceK/0wexXIBqfV3FZlV/VACoS/3f2g3s+KAVzuTclVzgKBuTq+5eGZ51n1NCxTgnD9GGDicd5dqkFxBCR1ASC9M7U+XmpqlWBEkV2WyJEfNk6rBMPQXNmCqC+KnQlxFXY9sn/aFusogF70+Gv+yZnbvLLvW/hG+8RuJpFKkGUjbi8/Wmgyz8fhC7sCsu96wlhnrOAOFydAcgb6D+LP271AC3YBnGMv7U/l2s9uXo5vY6hAkRfNwDAuka969MslAI9LvprgIrwB6FGv0aJMCsqcL8l7JGQGDn5wgSZ/JzuJFgBth4m+XlDMA04/9K6U2W0 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SEZPR06MB5269.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(346002)(366004)(39860400002)(396003)(136003)(451199015)(2616005)(1076003)(83380400001)(186003)(26005)(6512007)(86362001)(36756003)(38100700002)(38350700002)(2906002)(5660300002)(316002)(8676002)(66556008)(66476007)(66946007)(4326008)(4744005)(8936002)(107886003)(6666004)(41300700001)(6506007)(478600001)(52116002)(6486002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3NpFpwLocz68LR/PWqTmKLHQmrmAx1HRzN9nNIW5QewrU4k+pkz17u017vX8IEh+Ui0tTLhymOf+GYjttCnWOpQe87sjB0lSnaFlskxkby8vdfj+svBJK2VPtXJX/9qEHfHtVQ+OMvng4cmZ6ZSeTrlI1tIkKInN+3zDJD+CpDz8UGzA04Q8dkD6ZJFhe9loLf9Ul54lhhRjTinksAbqTlDdp4vh6JwFkCdirDnJKPMI+DFo2vk91q1DfQAL7AQy88vJPFS+DldACZU1icPGGRkqgu2t+4tCuhVhLuq8Nwy4PhL/g2WIh8xWMEqv9dgSy8JaASAZbzUTAbHO/zPeNAScujkr6D0JuhJPCTnMt3lBtdhYt6Ot0DIrLCTmYpbr3ggwzX5wgEDy9QSiay/TQsO4cfe9GKSS+4k0fxLJlXjgz9dAwCAhLEJnsG92u9ZsJ+6JZp8ZarA2ER65CsHlhv9oAkW4+m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rx9QKbZj6wL5gUhaxum3Zi4EEZzD45PKjIgVv6/aJ/nNAWC50lo27wRGYB X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: dbdb3fc4-e1ae-45c1-3231-08daee45f0aa X-MS-Exchange-CrossTenant-AuthSource: SEZPR06MB5269.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jan 2023 11:22:18.6529 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: hO+6pAc/DeTQcLTZHX/WX0t/u/CUE5Oqe0LieDKqhGUh91lJy/dcBWCW0ntE78zh9HzgmtqfD5v6xh967eWCWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYZPR06MB5844 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754090916800969665?= X-GMAIL-MSGID: =?utf-8?q?1754090916800969665?= When the iostat is not enabled, it is meaningless to call ktime_get_real_seconds() to assign values to variables. Let's put the call to the ktime_get_real_seconds() after iostat is enabled. Signed-off-by: Yangtao Li --- fs/f2fs/iostat.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/f2fs/iostat.c b/fs/f2fs/iostat.c index 8460989e9bab..e7d03c446994 100644 --- a/fs/f2fs/iostat.c +++ b/fs/f2fs/iostat.c @@ -29,12 +29,11 @@ int __maybe_unused iostat_info_seq_show(struct seq_file *seq, void *offset) { struct super_block *sb = seq->private; struct f2fs_sb_info *sbi = F2FS_SB(sb); - time64_t now = ktime_get_real_seconds(); if (!sbi->iostat_enable) return 0; - seq_printf(seq, "time: %-16llu\n", now); + seq_printf(seq, "time: %-16llu\n", ktime_get_real_seconds()); seq_printf(seq, "\t\t\t%-16s %-16s %-16s\n", "io_bytes", "count", "avg_bytes");