Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp19943pxh; Thu, 7 Apr 2022 12:41:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx4s3zVaMitXI9CshDghGqdgJJA+e3kF749hhlGMDp2qqOuawTwpwzl0QnLYaT0txPsR2dS X-Received: by 2002:a17:90b:1c87:b0:1ca:f4e:4fbe with SMTP id oo7-20020a17090b1c8700b001ca0f4e4fbemr17593311pjb.159.1649360516218; Thu, 07 Apr 2022 12:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649360516; cv=none; d=google.com; s=arc-20160816; b=XDeP+lO7B1Bx+zVKq0Wc6U6F5sV1AtoHa73jfb2HBiWPmscwoz1By8vHLFrF5Lr8yp keE1wO+YbzPvZdkpWerj0oQ43HMMGD6rMFiF5SclJcKz/60syNxXF8g4PTiHxbRWGF4v Q5TvANolzN5QY5Rn/vhFjK2VkCKjnhX4DEV3C0WyfWMprjPlRuSofb+bGJgbjjTcqbfE T3DImh26XdbchrZ3y2qODYPD+QPZx9FXh1qUb4MuERv+xgzkPyl0W6r52qbLlkI51nfj 2lZc7+ztvJKrglWo+VgSTSkLYFUUd0LrBReppMMDyY1c73bN+j/a+TtTvXjoxDF8dZIi KJxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=a+/6IHa8J2ibYiY7PsEo03ecQN3sZog+lPT2RUEfmQU=; b=WCVwgOHR73nJ72pvvxhtbVotenQL289YZp/RkQTinIqR5ufy1y/YvQlEL2HF2pYn70 HeQ7yk7LiN+B4pDS4BS5uGbjeFDVKxxWvQLpxmCUXv+KFRAF8v0zRAue4m8ClPRh0/JA u1pVqoZ7qtDhU147kYcyz+7RTMiVNvgvCvAmDro9kf/SvVpzb5rY0iElWRCfM3Uo3CCi v6d7WWaqsJRJ5dDXw3Ush/H6tDOIBBfXuAnRuncpEFStdHDFPys2GI47MvceH4/8yoNR GdeKQR340hNIuBgdjwZA5Ora3n1Qk2+047ayeW6hlFP+LHTChVBADLddWe24oUrHWDyp 0xSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XiY2rlMp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t74-20020a635f4d000000b00381cbf13898si19109739pgb.373.2022.04.07.12.41.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 12:41:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=XiY2rlMp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1EE611ED07F; Thu, 7 Apr 2022 12:17:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236505AbiDGDQD (ORCPT + 99 others); Wed, 6 Apr 2022 23:16:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35806 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232672AbiDGDP7 (ORCPT ); Wed, 6 Apr 2022 23:15:59 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C1B231923; Wed, 6 Apr 2022 20:14:00 -0700 (PDT) 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=a+/6IHa8J2ibYiY7PsEo03ecQN3sZog+lPT2RUEfmQU=; b=XiY2rlMpWwSz+W6TCaFdXuEU90 B3wVZ3teCDo6niE97uSEv6VN/Qn4+b6hZs4HHpREIo3Z1ADoaKyVeipKQhZGjheHUZqQuhGNUy02y 44vMr3KV6IqI7w08utLuSRafzs8CygGmbGyhCSRgdauKwspKoEO46Uo3X3ot3sD2csuGq6oaOD49j HPGRctd+JHA1gfUiqu8yAVIbmCaqThOUuVlph+TEtdjwe80lbFuJVm1LQ6wtJQbToNmjs4OUioz4F oHs093V9QAbVKXbJmR0qFp6K2ISohuumBm09EShIuplcqcyVGxf5wrk6Y8rZCasfhTsJLVc7dtDuc 7xIGki7g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ncIah-008Qzd-Fd; Thu, 07 Apr 2022 03:13:47 +0000 Date: Thu, 7 Apr 2022 04:13:47 +0100 From: Matthew Wilcox To: David Howells Cc: linux-cachefs@redhat.com, Rohith Surabattula , Steve French , Shyam Prasad N , linux-cifs@vger.kernel.org, Jeff Layton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 14/14] mm, netfs, fscache: Stop read optimisation when folio removed from pagecache Message-ID: References: <164928615045.457102.10607899252434268982.stgit@warthog.procyon.org.uk> <164928630577.457102.8519251179327601178.stgit@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <164928630577.457102.8519251179327601178.stgit@warthog.procyon.org.uk> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 07, 2022 at 12:05:05AM +0100, David Howells wrote: > Fix this by adding an extra address_space operation, ->removing folio(), > and flag, AS_NOTIFY_REMOVING_FOLIO. The operation is called if the flag is > set when a folio is removed from the pagecache. The flag should be set if > a non-NULL cookie is obtained from fscache and cleared in ->evict_inode() > before truncate_inode_pages_final() is called. What's wrong with ->freepage?