Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp4665407iob; Sun, 8 May 2022 21:10:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzs7WJa2H5iP3Ah78gjXavZm1yh2qpacqdt0ODbCvnNTE6VscdeXx+5zV7rwks4oJJzXikK X-Received: by 2002:a17:90b:1d83:b0:1dc:4362:61bd with SMTP id pf3-20020a17090b1d8300b001dc436261bdmr24372739pjb.126.1652069423267; Sun, 08 May 2022 21:10:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652069423; cv=none; d=google.com; s=arc-20160816; b=Kr8qjo+s2tStATUXITpgaN/03Gpwj3r3JVS4ay0naFr1gA6oZxckTqaoWRwAjXCor4 Ofc5G2oQn1P6/uO5nAc9r9y8ph8TkHiHj+lAzEz75SDjfN+QN6uUEZBxOOR334fs8vsk k+QaIvGQPEC333ll9JnlJ3/bIMFW9k6ncL/84H73MOTlo/SCl5pUGprqrklvkVjIZP6b 6pL/oLlzszt+lGiVRLzo/f3MFC9HoBpi34JbS29OXCKSwHIAPoYUEVTADSSUuIR/1N3I RFa9k7JpDxSgCmVhHwRgj8fLrH2hjnD4df14RepkedvsKJOe+yEUubmCrd4QlZKOiden 0W8g== 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=HPtZn1pXVcAa2BUPhG85sgXmXcmLsDiRYjOT7IzzrhM=; b=LopJWAxHOuTVufxKnJ4DIyCyEBSGrvI2pk9OS5IbABKHZf3aX5+k+lFj/m8zjxkss3 oUVKo689FaP5IX3ZimmIjmr0dVGTyE1Cisbpr6XlN+hQ31jGXzDrbM3Nr+RihX5kRGIQ X5s6p30S4zdXoGIqwFTOidBN7oMaMRzdr6Od3Vg1mA+h++6lkY47vF1/zIfnV4Ecgno1 HXEvusIE8g82LZ/F8cKhxh/Daw+mY8dz9WeuFIrAeBHpOVgrWo3MBHR36fMdgq5iTfdJ ZwYJBvSltxe4Zgy3wNGgb3KE4xyzk9uGDyOFm1m7Lv2lCsC4ExE/P+t6seI1VVdzKqga aUTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=juEwUtY+; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z10-20020a170902ccca00b00153b2d165c4si10603850ple.460.2022.05.08.21.10.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 May 2022 21:10:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=juEwUtY+; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 48FC210DA58; Sun, 8 May 2022 21:09:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229913AbiEHTVw (ORCPT + 99 others); Sun, 8 May 2022 15:21:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33942 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348280AbiEHTKw (ORCPT ); Sun, 8 May 2022 15:10:52 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43F792DCD; Sun, 8 May 2022 12:06:39 -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=HPtZn1pXVcAa2BUPhG85sgXmXcmLsDiRYjOT7IzzrhM=; b=juEwUtY+Pswar3mi9JCqMG0GB0 eDZZ9UH2uN8HFDyFlUDrZTXE2YJnQJ3j8xjADLm/8ozl2oFFxoJ/3UBpi+cv0JS8p9k50jwwdYWMG bmk1L+0tuu0X6IG8b5oiZmaRi4DThDX0pwC35eYJ46I5qO+kJTs50VM+tsRtqqkny2m36qFziDIiS Y9x+nmjbz0OjJnsZSJXJScraAShlBtty6se+Fj21xQly9hqNdBCBkMW0jiHleQgCXnAUO4HuuEy6X 71WDfR3YtiizfRmphYM5ZobpS7DEUGLZWl5ml+RPoyjFo63IwmpUryJxGIvk95gnj1FLLYHUf/HtE rb2k7tLg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nnmEn-002k8z-4S; Sun, 08 May 2022 19:06:37 +0000 Date: Sun, 8 May 2022 20:06:37 +0100 From: Matthew Wilcox To: Christoph Hellwig Cc: linux-fsdevel@vger.kernel.org, cluster-devel@redhat.com, linux-mtd@lists.infradead.org, linux-nfs@vger.kernel.org Subject: Re: [PATCH 3/3] fs: Change the type of filler_t Message-ID: References: <20220502054159.3471078-1-willy@infradead.org> <20220502054159.3471078-4-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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-nfs@vger.kernel.org On Tue, May 03, 2022 at 07:23:13AM -0700, Christoph Hellwig wrote: > > @@ -3504,9 +3504,9 @@ static struct folio *do_read_cache_folio(struct address_space *mapping, > > > > filler: > > if (filler) > > - err = filler(data, &folio->page); > > + err = filler(file, folio); > > else > > - err = mapping->a_ops->read_folio(data, folio); > > + err = mapping->a_ops->read_folio(file, folio); > > Wouldn't it just make sense to just pass mapping->a_ops->read_folio as > the filler here from the callers that currently pass NULL? Thanks for the review. We're heading in the same direction; my plan was to (in some subsequent merge window) convert all callers of read_cache_page() to use read_mapping_folio() (by setting ->read_folio) and then get rid of filler_t altogether. Maybe there are some filesystems that can't do that, eg they need a different ->read_folio() when called from read_cache_folio() to the one they need when called for filemap_read(), but I bet they can all be worked around.