Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2555905lqb; Tue, 28 May 2024 03:52:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0LlMt0d8h4Xe0q9KM7ThBkHAqRa4uCgebxzObFE7qJ8/ryccsur48u8/n36gwokqRR4X8rvLkGExqU1zhbfKVcO0SN248ngP6vfKnxA== X-Google-Smtp-Source: AGHT+IFCNFakkcerXxaCtT091+l2CCVIqbjLRC19/Ffhb4gITYMlZ408z8pTpS2VFhB4tCBGMwrL X-Received: by 2002:a05:6358:885:b0:17f:87fb:5326 with SMTP id e5c5f4694b2df-197e565d81bmr1357907555d.24.1716893557051; Tue, 28 May 2024 03:52:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716893557; cv=pass; d=google.com; s=arc-20160816; b=uh4DVjUqa9Pvjs0T1Kxnw4DamC+qeUnjZ2irW6Ya7u5AmOs6C/6xkLo5NAJrsRgyTG 9nYLQ0ixLzUgmHkZsnuxuWdhE0xCD9MkbZxU8xlxtJ4mB0tZR6kdXA6Bq6EJ6OYRqCj8 ZzgV+iqs5xaDmcgQaKy0eyCMrj3RDi0W1qB244b6KDPEC4yM1529GSngZkZ8hvicjR2d x/U6G1rOb7q9e5KBN47SKYprkiADuOecMjF7urMWUlVc3jP7oDwMBLaU8/MkzT7iY26A OkBsf8t6MJb/8B1XWDDtPeQV9owvPy9Z1UVwc91PEvxDCRYt+Nz5YAAK9OdzozX26cZc whkg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=8UZJ6L83nj0T/Wo+eOPE7UGraMjyVb6szL/rEvL/rD8=; fh=aqNwIBGo4iGZLgHmpO86grjELCfCRwXoK+sew07I+U4=; b=FKQFfAandY47ifl+jLNS03/s3rbzeMzmthoECCQTvEGOV+evsxJEa70NG43sMPSZGt enwRgAahVqhTklKlt6ngXzUP0mc4Xgi/qART7v5i2BFx/WyzmcqfpDrp+/FDpPVuKfBx 8JlHt7HXdiVXbGzzdCHAbb22ehEgjTSeVs7OWoNYAurHkv9+AsZaKtMhQzfvur+JXFjj RCcPUJABWWu9BNAcQZB1LjcFpOGrDbkd1VmtySwdWbIjN8jD35xpwwLhj9G/gXEVYugb E9BUhHY2uurDOQiTghoB5hTWR97x3WSN4atFUkhOOPyB8FlyxR9D+jTNb/POdcipVLBb VbAA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.cz); spf=pass (google.com: domain of linux-ext4+bounces-2665-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2665-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-68221b7591dsi8392881a12.98.2024.05.28.03.52.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 03:52:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-2665-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=suse.cz); spf=pass (google.com: domain of linux-ext4+bounces-2665-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-2665-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A4C9C288346 for ; Tue, 28 May 2024 10:52:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A14216C697; Tue, 28 May 2024 10:52:07 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ABA6D16B737; Tue, 28 May 2024 10:52:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716893527; cv=none; b=SXbhkeWxShM1XozDeIdVQCwTWhv9TGVOhnkKysUh7ByRhENLhUy98JMM7BRLAxf3fM3iIz0u2I/6oxIbYcAW7tsqonjqbxLUeINAB1U8LPhUHHhnrNaVekYo79oWUnNj3kYxkj3ZixYgTNEA9x+1/tiWIwJrIvm27fVEziDPJGs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716893527; c=relaxed/simple; bh=08vd2eLerUdZhiSa/ZoUOZwTuS+LDw+HGnQiO9EVyh4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iFKp0pOARVntqXxfWfdc0OaCxtSfpmVgHPTrOl0V2pgGsByrtVa+MtdjFHR8+JVpbh8AF4JJ/f4RHZxERZuPAz9SGzefjlA5y0qnTvZjKOY0TU5vhgikaCU+Jy+hc/QccCGY1BrRrKNcTQ4a3ydi6r/eVUiP91ud4ipKtHfc0hg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E87BD22788; Tue, 28 May 2024 10:52:03 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DD2E613A6B; Tue, 28 May 2024 10:52:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id XUb2NVO3VWa2XgAAD6G6ig (envelope-from ); Tue, 28 May 2024 10:52:03 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 815E2A07D0; Tue, 28 May 2024 12:52:03 +0200 (CEST) Date: Tue, 28 May 2024 12:52:03 +0200 From: Jan Kara To: Luis Henriques Cc: Jan Kara , Theodore Ts'o , Andreas Dilger , Harshad Shirwadkar , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] ext4: fix fast commit inode enqueueing during a full journal commit Message-ID: <20240528105203.2q4gxqz6amgvud4l@quack3> References: <20240523111618.17012-1-luis.henriques@linux.dev> <20240524162231.l5r4niz7awjgfju6@quack3> <87h6ej64jv.fsf@brahms.olymp> <87msob45o7.fsf@brahms.olymp> <20240528103602.akx2gui5ownj25l3@quack3> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240528103602.akx2gui5ownj25l3@quack3> X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Level: X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Spam-Flag: NO X-Spam-Score: -4.00 X-Rspamd-Queue-Id: E87BD22788 On Tue 28-05-24 12:36:02, Jan Kara wrote: > On Mon 27-05-24 16:48:24, Luis Henriques wrote: > > On Mon 27 May 2024 09:29:40 AM +01, Luis Henriques wrote; > > >>> + /* > > >>> + * Used to flag an inode as part of the next fast commit; will be > > >>> + * reset during fast commit clean-up > > >>> + */ > > >>> + tid_t i_fc_next; > > >>> + > > >> > > >> Do we really need new tid in the inode? I'd be kind of hoping we could use > > >> EXT4_I(inode)->i_sync_tid for this - I can see we even already set it in > > >> ext4_fc_track_template() and used for similar comparisons in fast commit > > >> code. > > > > > > Ah, true. It looks like it could be used indeed. We'll still need a flag > > > here, but a simple bool should be enough for that. > > > > After looking again at the code, I'm not 100% sure that this is actually > > doable. For example, if I replace the above by > > > > bool i_fc_next; > > > > and set to to 'true' below: Forgot to comment on this one: I don't think you even need 'bool i_fc_next' - simply whenever i_sync_tid is greater than committing transaction's tid, you move the inode to FC_Q_STAGING list in ext4_fc_cleanup(). Honza -- Jan Kara SUSE Labs, CR