Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp394060pxm; Wed, 23 Feb 2022 02:48:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwdhXWcX7WRzmW+FLV1989l/ZmgIwbVB7JeE9JdIO0cHTQDbnqQZgCgMgyPfx66cx5iwSNh X-Received: by 2002:a63:a1a:0:b0:34d:a4a9:a8b9 with SMTP id 26-20020a630a1a000000b0034da4a9a8b9mr23261380pgk.176.1645613299920; Wed, 23 Feb 2022 02:48:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645613299; cv=none; d=google.com; s=arc-20160816; b=nU1zqq8Sliz5V5DzSltTtJtXlqGL76pZr28TbqpPgwfNTOdQt3d3+vJo3f4aQXX3mw uK/2zBYLuAiPJ1LP9n/7rNL4et3UKOsbYCzR+c00W39lu2tjc2hzkGyKqe42YUpz1gWa yYXXBkv/0xDxfRRXBg/Ko0Z8oUHT7/UTp7vMgJmWCT0pGbpJ28+nTwZ8a75ILVcIkyBw sr+lCMtnx/6KO17qj9qqd9I39jdAN9aPBy0JE1ImphozW/s4p6zXMBwmdofS69TcM9OA xllbuNGeaC33NDwuTKIEGkeD6RiiST7ALQ/Xz1WdGyCjUgjxjkk7WXJ8zzq9hkanvb8Z wZlg== 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=56pA+CGuLQdgLd1qYOFFRNIzWIldSybof2H4l1KI8t4=; b=qHybDk14b6Ck2pUZEPceYcr8VDIc0S6E4jShm3qJTpOPV35KtIfMjOtF+fbtk+uOZ5 ZWoE0CZS9i1BZAJgFuOXhxnZzZMqe4TZRAjL46SlpMk6OctWvp14rp2+OMqgH54IbelN O8jKZ3xJFQqqIF3iqkXr2P6oG5bL91JsNoLehjIB++YOQS3C1V70ZqvLKDRoNR8tTbN9 4nIPXm7jBVuAMCK088UkKL+8i8AwCE2k1aJjaVSnbIKuoVKYLYkvL40BnWXAsvIp8Ps8 JSMmzLEpeb7SebfAeJ2Feld9puQwxRL6Ni65c5ob99ojQXxZFktn/3mXyZS3Qk/IcthF zWFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=0gNDoIao; dkim=neutral (no key) header.i=@suse.cz header.b="OcFi/ubL"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s80si22200302pgs.657.2022.02.23.02.47.57; Wed, 23 Feb 2022 02:48:19 -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=@suse.cz header.s=susede2_rsa header.b=0gNDoIao; dkim=neutral (no key) header.i=@suse.cz header.b="OcFi/ubL"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233856AbiBWJn1 (ORCPT + 99 others); Wed, 23 Feb 2022 04:43:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231618AbiBWJnY (ORCPT ); Wed, 23 Feb 2022 04:43:24 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DEDB5B8BA; Wed, 23 Feb 2022 01:42:56 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 3D2A221136; Wed, 23 Feb 2022 09:42:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1645609375; 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=56pA+CGuLQdgLd1qYOFFRNIzWIldSybof2H4l1KI8t4=; b=0gNDoIaoLdEU2IMCVzAidRu5UH2wcGsj0GzEaCOft0i/o29VhqfuIn4GuXAmVBs8zEt1uF 4tJRDE0ohUrnUbTmkP4pfkvXCQiX+4rHql1as9hY/4dCiGZvnS7AyYqhvBNKPycRNxnBR5 FCqaRJf0pCFhsDE2Ex7k1XfUBdi/lJs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1645609375; 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=56pA+CGuLQdgLd1qYOFFRNIzWIldSybof2H4l1KI8t4=; b=OcFi/ubLrrHGvOI5ACYacYG2EUj/BoRvkQeFxGQcNy5/87ltEnGBxHgT7DizcKpVqNw+tl M5rLo33EGBCJULCQ== 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 3059CA3B81; Wed, 23 Feb 2022 09:42:55 +0000 (UTC) Received: by quack3.suse.cz (Postfix, from userid 1000) id E3D7DA0605; Wed, 23 Feb 2022 10:42:54 +0100 (CET) Date: Wed, 23 Feb 2022 10:42:54 +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 5/9] ext4: Add commit_tid info in jbd debug log Message-ID: <20220223094254.fmowjdq4dbig5elz@quack3.lan> References: <60daf324eec64f2be0b9ce0e240294d36411037c.1645558375.git.riteshh@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <60daf324eec64f2be0b9ce0e240294d36411037c.1645558375.git.riteshh@linux.ibm.com> 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-ext4@vger.kernel.org On Wed 23-02-22 02:04:13, Ritesh Harjani wrote: > This adds commit_tid argument in ext4_fc_update_stats() > so that we can add this information too in jbd_debug logs. > This is also required in a later patch to pass the commit_tid info in > ext4_fc_commit_start/stop() trace events. > > Signed-off-by: Ritesh Harjani Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/ext4/fast_commit.c | 15 +++++++++------ > 1 file changed, 9 insertions(+), 6 deletions(-) > > diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c > index 7fb1eceef30c..ee32aac0cbbf 100644 > --- a/fs/ext4/fast_commit.c > +++ b/fs/ext4/fast_commit.c > @@ -1127,11 +1127,12 @@ static int ext4_fc_perform_commit(journal_t *journal) > } > > static void ext4_fc_update_stats(struct super_block *sb, int status, > - u64 commit_time, int nblks) > + u64 commit_time, int nblks, tid_t commit_tid) > { > struct ext4_fc_stats *stats = &EXT4_SB(sb)->s_fc_stats; > > - jbd_debug(1, "Fast commit ended with status = %d", status); > + jbd_debug(1, "Fast commit ended with status = %d for tid %u", > + status, commit_tid); > if (status == EXT4_FC_STATUS_OK) { > stats->fc_num_commits++; > stats->fc_numblks += nblks; > @@ -1181,14 +1182,16 @@ int ext4_fc_commit(journal_t *journal, tid_t commit_tid) > if (atomic_read(&sbi->s_fc_subtid) <= subtid && > commit_tid > journal->j_commit_sequence) > goto restart_fc; > - ext4_fc_update_stats(sb, EXT4_FC_STATUS_SKIPPED, 0, 0); > + ext4_fc_update_stats(sb, EXT4_FC_STATUS_SKIPPED, 0, 0, > + commit_tid); > return 0; > } else if (ret) { > /* > * Commit couldn't start. Just update stats and perform a > * full commit. > */ > - ext4_fc_update_stats(sb, EXT4_FC_STATUS_FAILED, 0, 0); > + ext4_fc_update_stats(sb, EXT4_FC_STATUS_FAILED, 0, 0, > + commit_tid); > return jbd2_complete_transaction(journal, commit_tid); > } > > @@ -1220,12 +1223,12 @@ int ext4_fc_commit(journal_t *journal, tid_t commit_tid) > * don't react too strongly to vast changes in the commit time > */ > commit_time = ktime_to_ns(ktime_sub(ktime_get(), start_time)); > - ext4_fc_update_stats(sb, status, commit_time, nblks); > + ext4_fc_update_stats(sb, status, commit_time, nblks, commit_tid); > return ret; > > fallback: > ret = jbd2_fc_end_commit_fallback(journal); > - ext4_fc_update_stats(sb, status, 0, 0); > + ext4_fc_update_stats(sb, status, 0, 0, commit_tid); > return ret; > } > > -- > 2.31.1 > -- Jan Kara SUSE Labs, CR