From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21071C6FA89 for ; Thu, 15 Sep 2022 14:30:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229824AbiIOOaP (ORCPT ); Thu, 15 Sep 2022 10:30:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229768AbiIOOaM (ORCPT ); Thu, 15 Sep 2022 10:30:12 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90DC23846C; Thu, 15 Sep 2022 07:30:10 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id F05AB33786; Thu, 15 Sep 2022 14:30:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1663252208; 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=LbhmGjCvkeNneLmFaHzzNfVQsclXD7BkZKZeexJiJmU=; b=xBgP5PVYdcnLnEoanc50FexGxJrd3qbDY5gHzD88WBqaPjmXPiOHlxe5/1RpVqlxVboHhT qgL3ucsDo/MIAnsT1QMRbc1+ch0LX//we+NFv5MN4YdtA9WEbxHqxtwcSqcrSzdBRvSvJx 9b6fr+m7h5QMpTqmrad5wPzshU+EWUo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1663252208; 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=LbhmGjCvkeNneLmFaHzzNfVQsclXD7BkZKZeexJiJmU=; b=//wYkh1FkCgxufxrFp8RaivcCzo0DUarv4uJXO/SndD6ftqv6i9uMR3fwAoGTnkbrxeOq+ sMEcj+ExoCSk2CCg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E3912133B6; Thu, 15 Sep 2022 14:30:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id so6LN/A2I2MAegAAMHmgww (envelope-from ); Thu, 15 Sep 2022 14:30:08 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 886ACA0682; Thu, 15 Sep 2022 16:30:08 +0200 (CEST) Date: Thu, 15 Sep 2022 16:30:08 +0200 From: Jan Kara To: Ye Bin Cc: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, jack@suse.cz Subject: Re: [PATCH -next 2/2] ext4: adjust fast commit disable judgement order in ext4_fc_track_inode Message-ID: <20220915143008.27woacjur6sg32t2@quack3> References: <20220915135611.3040776-1-yebin10@huawei.com> <20220915135611.3040776-3-yebin10@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220915135611.3040776-3-yebin10@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu 15-09-22 21:56:11, Ye Bin wrote: > Judge filesystem if fast commit disabled before test inode's journal mode. > > Signed-off-by: Ye Bin Probably makes sense but is there any particular reason why you do this? 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 eadab945b856..9217a588afd1 100644 > --- a/fs/ext4/fast_commit.c > +++ b/fs/ext4/fast_commit.c > @@ -577,15 +577,15 @@ void ext4_fc_track_inode(handle_t *handle, struct inode *inode) > if (S_ISDIR(inode->i_mode)) > return; > > + if (ext4_fc_disabled(inode->i_sb)) > + return; > + > if (ext4_should_journal_data(inode)) { > ext4_fc_mark_ineligible(inode->i_sb, > EXT4_FC_REASON_INODE_JOURNAL_DATA, handle); > return; > } > > - if (ext4_fc_disabled(inode->i_sb)) > - return; > - > if (ext4_test_mount_flag(inode->i_sb, EXT4_MF_FC_INELIGIBLE)) > return; > > -- > 2.31.1 > -- Jan Kara SUSE Labs, CR