Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1075413pxp; Sat, 12 Mar 2022 00:52:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqeuFYupe/oXjdAlfceCIKmOmblCp/XnpG5pfwryYDL9xsuyflnnSS4jPMTMMa969YvAkb X-Received: by 2002:a17:906:4408:b0:6da:bec1:2808 with SMTP id x8-20020a170906440800b006dabec12808mr11505469ejo.543.1647075148092; Sat, 12 Mar 2022 00:52:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647075148; cv=none; d=google.com; s=arc-20160816; b=a75Wxo3bbKp71ItYFiZBnQUlDVFU+TZwitIforTgGB+pUkg4Mk3VQl8qrTswicKfqR LFmvz6j2GMM8YursqUdSKBsvLEJJ+XtAmhKDEkHuDTtv4n9EmF1zXO4LFIPLEYQB1sDH KKswRJoZwRtWg8V3y7N05jYFhbk2JwybcIpct/+BOWvWKAw69wpS5WcbT83/UXIX9GvE q7mrVspTcLLSka3K/hSnPpzNLMLUKN2WyHdSOVeRu619P5bKmBbodyxHPJbLvFqhc877 5k8pGglYVdSeu+O0vwl0iiWlgVx+1Q0njBPIMvdYCcyuyaf5ygj1A67tfFdEsNnOGBCW cjLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=DFOgjjRVfh9RqkGCCnhMtsstlvujXFyUiF2Loke7u60=; b=YT81KhwbfCe1ofBibK7GYE/tntVFJX9yKUNKVrI6Ky5DxgcxO4zMTxmy1dPr2zb4MG e614UXq3k2NCCQCMj/WRc4Vx0f6yH3S4jzHOeNzEs7XFyzeoM7G8a4+kqX5KVNPP02yk vg2UxqQ8jWfo/uVn7bkZPTwiZbVmzEiPyPPep6ArjAwjkxtpy7j4WY5YQdK7+tfMNLAY seecsk0IIwOCLQgyuFXMcwYSMHuCU20EltmyALzY4gpcYFgd/0uRq0jk7MF8CrrYgHjo xNDLUPh6xOfo+2ZE942nGxArFiWbTtUSCD4Yjm13ND4um2ph4hZedGpHMKGSgyuS295+ kw6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=Y90qyR6l; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l25-20020aa7d959000000b0041625021d1asi6664489eds.8.2022.03.12.00.52.00; Sat, 12 Mar 2022 00:52:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-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=@ibm.com header.s=pp1 header.b=Y90qyR6l; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230462AbiCLFlh (ORCPT + 99 others); Sat, 12 Mar 2022 00:41:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230429AbiCLFl1 (ORCPT ); Sat, 12 Mar 2022 00:41:27 -0500 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1DB758828; Fri, 11 Mar 2022 21:40:22 -0800 (PST) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 22C4Usth016333; Sat, 12 Mar 2022 05:40:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=DFOgjjRVfh9RqkGCCnhMtsstlvujXFyUiF2Loke7u60=; b=Y90qyR6lOLjQ2r5eOn8uncHzxxqn5gaG+uRGUocbTF9XA6ug63a0Qy0vJmRhkWHZ3e41 Wz4e5AEzx7cku3RLLxrwHzT2HnRj8Jz33Ux7MBkMf9YHqHNz61hQ4DbJc2/odTN0zzEs mHqLqdpMq6lxDOiyyC6h2IWqecqQpufoXyz8wLrdrr4VUE0af4kuz5Go2G5N42AKufHG /RKABJvC0uHv9srVbZ4Fej3OQWrNYhraM/V9SeFSM8bFkUGsAoHn0Ia1//r+QVfBkrLD 9LPSE97eskMFgdc0gEsyuchvLRnerePzzHX5k0CRmFhy+d+D/7iycIA0RYVFrzW/t7gj gQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ermgn0s7h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 12 Mar 2022 05:40:18 +0000 Received: from m0098394.ppops.net (m0098394.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 22C5eIlJ031876; Sat, 12 Mar 2022 05:40:18 GMT Received: from ppma03fra.de.ibm.com (6b.4a.5195.ip4.static.sl-reverse.com [149.81.74.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ermgn0s71-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 12 Mar 2022 05:40:18 +0000 Received: from pps.filterd (ppma03fra.de.ibm.com [127.0.0.1]) by ppma03fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 22C5U3ar016917; Sat, 12 Mar 2022 05:40:15 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma03fra.de.ibm.com with ESMTP id 3erk58g60s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 12 Mar 2022 05:40:15 +0000 Received: from b06wcsmtp001.portsmouth.uk.ibm.com (b06wcsmtp001.portsmouth.uk.ibm.com [9.149.105.160]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 22C5eDCv52167036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 12 Mar 2022 05:40:13 GMT Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 73457A4054; Sat, 12 Mar 2022 05:40:13 +0000 (GMT) Received: from b06wcsmtp001.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F3C72A405F; Sat, 12 Mar 2022 05:40:12 +0000 (GMT) Received: from localhost (unknown [9.43.36.239]) by b06wcsmtp001.portsmouth.uk.ibm.com (Postfix) with ESMTP; Sat, 12 Mar 2022 05:40:12 +0000 (GMT) From: Ritesh Harjani To: linux-ext4@vger.kernel.org Cc: Jan Kara , "Theodore Ts'o" , Harshad Shirwadkar , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Ritesh Harjani Subject: [PATCHv3 04/10] ext4: Do not call FC trace event in ext4_fc_commit() if FS does not support FC Date: Sat, 12 Mar 2022 11:09:49 +0530 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: RrGVkW1Syj-o-jB__W-frCcJAShPpACg X-Proofpoint-ORIG-GUID: vVOCs-bXNeWDNuwyeP_EbidbK9U8hQkv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-12_02,2022-03-11_02,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 clxscore=1015 impostorscore=0 mlxscore=0 adultscore=0 mlxlogscore=860 bulkscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2203120030 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-ext4@vger.kernel.org This just puts trace_ext4_fc_commit_start(sb) & ktime_get() for measuring FC commit time, after the check of whether sb supports JOURNAL_FAST_COMMIT or not. Signed-off-by: Ritesh Harjani Reviewed-by: Harshad Shirwadkar Reviewed-by: Jan Kara --- fs/ext4/fast_commit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c index 5ac594e03402..55d33f296cae 100644 --- a/fs/ext4/fast_commit.c +++ b/fs/ext4/fast_commit.c @@ -1165,13 +1165,13 @@ int ext4_fc_commit(journal_t *journal, tid_t commit_tid) int status = EXT4_FC_STATUS_OK, fc_bufs_before = 0; ktime_t start_time, commit_time; + if (!test_opt2(sb, JOURNAL_FAST_COMMIT)) + return jbd2_complete_transaction(journal, commit_tid); + trace_ext4_fc_commit_start(sb); start_time = ktime_get(); - if (!test_opt2(sb, JOURNAL_FAST_COMMIT)) - return jbd2_complete_transaction(journal, commit_tid); - restart_fc: ret = jbd2_fc_begin_commit(journal, commit_tid); if (ret == -EALREADY) { -- 2.31.1