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 X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9731EC1975A for ; Wed, 25 Mar 2020 15:21:32 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5BEA82076A; Wed, 25 Mar 2020 15:21:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="jX2qMztv"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="Xf6UNg6d" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BEA82076A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=mit.edu Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1jH7qV-0005it-T6; Wed, 25 Mar 2020 15:21:31 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jH7qU-0005iY-HW for linux-f2fs-devel@lists.sourceforge.net; Wed, 25 Mar 2020 15:21:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jVx77pDPVETvoruFobaG2sAK3NbxhBdFGSL6pbLZHUs=; b=jX2qMztv4yGS2gURIH1HRpAPN/ Av6P7Zodqgx/3d6MH4JMhJ3oEuLzAAqOWxzen10519aDuE6N/sFqCxWMPFLVdb3L/kgHM6PH+3Wvp UR/7kb6D1Fl/qz/J0heyV29ODig/VUySUTHFuKmwnsJh5UI24dm6lTR5fswYpCW0t+5w=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=jVx77pDPVETvoruFobaG2sAK3NbxhBdFGSL6pbLZHUs=; b=Xf6UNg6dHg8A6C+xeIe+pgULR6 noiZmriSNP4iH4F5dGolbQCQWXqe/jiUMZ+g/uy9HWXpykpf5jda77iyFEngvG932ZI5TqSuBHDpN CXqW2Lm8yirtxd0eCsmDoel0jVP28djp040kH8SbdGINtIknp6101vJ2BACzReXNmE3E=; Received: from outgoing-auth-1.mit.edu ([18.9.28.11] helo=outgoing.mit.edu) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1jH7qS-00GXSR-Fp for linux-f2fs-devel@lists.sourceforge.net; Wed, 25 Mar 2020 15:21:30 +0000 Received: from callcc.thunk.org (pool-72-93-95-157.bstnma.fios.verizon.net [72.93.95.157]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 02PFLDxG006021 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Mar 2020 11:21:14 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id C131B420EBA; Wed, 25 Mar 2020 11:21:13 -0400 (EDT) Date: Wed, 25 Mar 2020 11:21:13 -0400 From: "Theodore Y. Ts'o" To: Christoph Hellwig Message-ID: <20200325152113.GK53396@mit.edu> References: <20200320024639.GH1067245@mit.edu> <20200320025255.1705972-1-tytso@mit.edu> <20200325092057.GA25483@infradead.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200325092057.GA25483@infradead.org> X-Headers-End: 1jH7qS-00GXSR-Fp Subject: Re: [f2fs-dev] [PATCH 1/2] writeback: avoid double-writing the inode on a lazytime expiration X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-xfs@vger.kernel.org, Eric Biggers , Ext4 Developers List , Richard Weinberger , linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Wed, Mar 25, 2020 at 02:20:57AM -0700, Christoph Hellwig wrote: > > spin_unlock(&inode->i_lock); > > > > - if (dirty & I_DIRTY_TIME) > > - mark_inode_dirty_sync(inode); > > + /* This was a lazytime expiration; we need to tell the file system */ > > + if (dirty & I_DIRTY_TIME_EXPIRED && inode->i_sb->s_op->dirty_inode) > > + inode->i_sb->s_op->dirty_inode(inode, I_DIRTY_SYNC); > > I think this needs a very clear comment explaining why we don't go > through __mark_inode_dirty. I can take the explanation which is in the git commit description and move it into the comment. > But as said before I'd rather have a new lazytime_expired operation that > makes it very clear what is happening. We currenly have 4 file systems > (ext4, f2fs, ubifs and xfs) that support lazytime, so this won't really > be a major churn. Again, I believe patch #2 does what you want; if it doesn't can you explain why passing I_DIRTY_TIME_EXPIRED to s_op->dirty_inode() isn't "a new lazytime expired operation that makes very clear what is happening"? I separated out patch #1 and patch #2 because patch #1 preserves current behavior, and patch #2 modifies XFS code, which I don't want to push Linus without an XFS reviewed-by. N.b. None of the other file systems required a change for patch #2, so if you want, we can have the XFS tree carry patch #2, and/or combine that with whatever other simplifying changes that you want. Or I can combine patch #1 and patch #2, with an XFS Reviewed-by, and send it through the ext4 tree. What's your pleasure? - Ted _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel