X-Received: by 2002:a17:906:d1c4:b0:6d5:83bb:f58a with SMTP id bs4-20020a170906d1c400b006d583bbf58amr863606ejb.672.1645643580481; Wed, 23 Feb 2022 11:13:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645643580; cv=none; d=google.com; s=arc-20160816; b=yKOejK8jnCzWJnlwIt92PiWNb0R6rxBWmLPSghT1humEJ83yuZEF9ePTSPtLyuWRoC VuT4D5WXqUo9ra5yQKiikjI/FP/ESXbA5PR5sf0Xnu5mBmv1tCt/xSgstMHXDn5SKqPd Ml+s17pqbPbyE+zoN/Jlyd6uFi9P08w7jURgP1FS7HHIZ9Yu0TEiUJB3TNrbQjIbr6X9 lZoozUUbxwhaHvqQmSj+hQP9p8yFr2LGzgnSrZNmfKTHMGHGixV2oEdBqIowD6PkHVWS VDI2567N6LBC3JmgpG+ErJDDWAH062gxdShHZeab4a6ergA4TfyETUGbx47XF6EfIRIR 1e/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=z4T8otD0XWKVmSpTAecWXeZLJR8A/nhbkHc94k0QMj8=; b=X9UGhnEMdXz9CjNW8ARF0qPGNZqG02UVRAhWebJrZ5EsPuEI18OfF4aSatsw/YUz0B g2eYcAyoekuR74Gg/EcVk6LKAG/qfThwf+Vzom+OV0EW6TRS69OTZnozLtqqUUvK7C/a xbvFTHm21fk3GxGQhCWnJfW/Gu2MkvI3e/WjZno5aF87PmLXlXBYDZp79U42baDFGEEa Mznp7jBIVyVsw+wANNtuM8ZI70BmnFiwcL4/ZtMFYUK+bUCEoHr6GR7+wCaBurX7IHmG oB6yPilcoLA43oCQ/G3/bmHdnLdb5fzOV98wNM3a646rtHLaY8N045dIw8xxsZ6Wr3jR gqsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=bn2YuvbJ; dkim=neutral (no key) header.i=@suse.cz; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d15si214491edu.197.2022.02.23.11.12.31; Wed, 23 Feb 2022 11:13:00 -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=@suse.cz header.s=susede2_rsa header.b=bn2YuvbJ; dkim=neutral (no key) header.i=@suse.cz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239360AbiBWJmV (ORCPT + 99 others); Wed, 23 Feb 2022 04:42:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239330AbiBWJmS (ORCPT ); Wed, 23 Feb 2022 04:42:18 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A9FE5F8C3; Wed, 23 Feb 2022 01:41:51 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id D034321119; Wed, 23 Feb 2022 09:41:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1645609309; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=z4T8otD0XWKVmSpTAecWXeZLJR8A/nhbkHc94k0QMj8=; b=bn2YuvbJT5YblJ3bub9dCD7O6mtXZaakOye8U/E0Tncj2q8HFjox6ojmWfz1zpIqRuSsM5 hMef9zM63OLJUuY5Wm3RFxhY5LQioRxwRxnYqf6eT9xX5KbMM5wRe0nBV96lMJFB2z/WRm j66CCEXUPUhtdgYSGVLu1rjW1c7d1no= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1645609309; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=z4T8otD0XWKVmSpTAecWXeZLJR8A/nhbkHc94k0QMj8=; b=ltOiU9x3rTUpgPgur63uy4wU/JgbP9AntyjzlHWNz7ltKqNKjCdkrQTQddGvzCZVNXsNIb X5Q9iv4FRbIVQpAA== Received: from quack3.suse.cz (unknown [10.163.28.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id C19C6A3B84; Wed, 23 Feb 2022 09:41:49 +0000 (UTC) Received: by quack3.suse.cz (Postfix, from userid 1000) id 805B4A0605; Wed, 23 Feb 2022 10:41:49 +0100 (CET) Date: Wed, 23 Feb 2022 10:41:49 +0100 From: Jan Kara To: Ritesh Harjani Cc: linux-ext4@vger.kernel.org, Harshad Shirwadkar , Theodore Ts'o , Jan Kara , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC 4/9] ext4: Do not call FC trace event if FS does not support FC Message-ID: <20220223094149.h5lj2dwq3sd5b3tp@quack3.lan> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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-kernel@vger.kernel.org On Wed 23-02-22 02:04:12, Ritesh Harjani wrote: > 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 Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > 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 bf70879bb4fe..7fb1eceef30c 100644 > --- a/fs/ext4/fast_commit.c > +++ b/fs/ext4/fast_commit.c > @@ -1167,13 +1167,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 > -- Jan Kara SUSE Labs, CR