From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4C992DC76F; Mon, 24 Nov 2025 14:09:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763993370; cv=none; b=FFqBg0dFiN0BuJ7QkLycdj0QwAJNkOgIKLOskt44kVTIDJn+6JO+CFOVhnaKMYxTroFu4X4dWzDN6HOnS5JSzvmUp/3W5NcWEkGtptwXG5Zv7UIqIwh7dkqCJmZgILpLFAM1D5ouw0rGeXEBdkWbyYavDvx+VgJD5/QTdtWByg4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763993370; c=relaxed/simple; bh=trXS4N9Vz9V+Viy49DUBsztBaiTbLynzCDwJ+zstgiE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=D6J1MbU1DCy5f1eESktofP09TiTcfNP2dh9aZG+KVt+yQ49rMmbAAlm6tofDvIqIu/WBnTuqtenMIepdrgG7e+AJo3RCyLprq5WbDqNXbpD9ouvmwl9ewk7GCkukoIfWGDpn4Vx6D2gXhlp0615da9N5Ux3HuYE7r/dDCsj3fU8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 6355668B05; Mon, 24 Nov 2025 15:09:25 +0100 (CET) Date: Mon, 24 Nov 2025 15:09:24 +0100 From: Christoph Hellwig To: Jan Kara Cc: Christoph Hellwig , Christian Brauner , Al Viro , David Sterba , Mike Marshall , Martin Brandenburg , Carlos Maiolino , Stefan Roesch , Jeff Layton , linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org, gfs2@lists.linux.dev, io-uring@vger.kernel.org, devel@lists.orangefs.org, linux-unionfs@vger.kernel.org, linux-mtd@lists.infradead.org, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org Subject: Re: [PATCH 10/14] fs: factor out a sync_lazytime helper Message-ID: <20251124140924.GB14417@lst.de> References: <20251114062642.1524837-1-hch@lst.de> <20251114062642.1524837-11-hch@lst.de> Precedence: bulk X-Mailing-List: io-uring@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: User-Agent: Mutt/1.5.17 (2007-11-01) On Mon, Nov 24, 2025 at 02:31:02PM +0100, Jan Kara wrote: > > + if (wbc->sync_mode == WB_SYNC_ALL || > > + time_after(jiffies, inode->dirtied_time_when + > > + dirtytime_expire_interval * HZ)) > > + sync_lazytime(inode); > > The checking of inode->dirtied_time_when for inode potentially without > I_DIRTY_TIME set (and thus with unclear value of dirtied_time_when) is kind > of odd. It is harmless but IMO still not a good practice. Can't we keep > this condition as is and just call sync_lazytime()? As in keeping the I_DIRTY_TIME in the caller? Sure, I could do that.