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 A123CC433F5 for ; Fri, 4 Mar 2022 04:38:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237070AbiCDEjm (ORCPT ); Thu, 3 Mar 2022 23:39:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233158AbiCDEjl (ORCPT ); Thu, 3 Mar 2022 23:39:41 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 850D95DE4F; Thu, 3 Mar 2022 20:38:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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; bh=czx5ybB1xeuMipycQ6XWyQQmkQUgRPLvyVJhMpxXE4E=; b=loLarWJ4WtSnJ57hlqBMBpXGsu 8tNCU9LveNsYNvRsA4XQ5gxSfVXEPgvLLnKS6zcq2KB4HB7Tr3OvpU/KEoxOieOWs72IDV/5BJMGZ 6igzmrH8i/YDHa0I6JZMSVnLSJpwQkG8PKiiGCtNxaohx7CJsDP9bHWYzYPNsGGG41ki9XWnxotPx IxNcIqSz4UoKGO2G80xn9VgZ+wcegYC2AYauAtItwc2/qQhWKqpvh7B95R3FezT9hZVyp6+oWjTQ5 WdkyZcbc2VbPAfYGPXq3UCBsTeadCio+69T874A6M8ra25JPEqTceVRQtUepQFomkg1lASSOFOlgH 1LXiMO9w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nPziN-00CIGg-0l; Fri, 04 Mar 2022 04:38:51 +0000 Date: Fri, 4 Mar 2022 04:38:50 +0000 From: Matthew Wilcox To: Hugh Dickins Cc: Andrew Morton , Jan Kara , Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH mmotm] mm: warn on deleting redirtied only if accounted Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Mar 03, 2022 at 08:25:50PM -0800, Hugh Dickins wrote: > filemap_unaccount_folio() has a WARN_ON_ONCE(folio_test_dirty(folio)). > It is good to warn of late dirtying on a persistent filesystem, but late > dirtying on tmpfs can only lose data which is expected to be thrown away; > and it's a pity if that warning comes ONCE on tmpfs, then hides others > which really matter. Make it conditional on mapping_cap_writeback(). > > Cleanup: then folio_account_cleaned() no longer needs to check that > for itself, and so no longer needs to know the mapping. At first blush, I like this a lot. Will look more in the morning.