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 DEA7BCD13D2 for ; Mon, 18 Sep 2023 15:42:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229700AbjIRPmI (ORCPT ); Mon, 18 Sep 2023 11:42:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229472AbjIRPmH (ORCPT ); Mon, 18 Sep 2023 11:42:07 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A20A188; Mon, 18 Sep 2023 08:40:40 -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=fouKrDKKt6aBJ1Dc7SZubYvnayge8ritkFh73nhsd4Q=; b=UZIQNYhRDQTdkBDYOcz0+SM+gy PhbgdFp3PR3FZmJkJRm8QhxP+lhCo7mj5i3ONdaDEiJvZdlSZ65qos6zjkF3whhbuQDtydXheCbMj vac5GX7N7rNPLLBPb1uQAe4xEnEo73pCNJaeW998jYdNxWgG1aQMvsDzYSSosgmRD16wa6CQA8mIo djZq2mb+j1ArpIUxl59UjXY5pf09nJnH+uuGm5Ijk85WToAZetMfFNKb98Ego2nh+HdWmYX9AxEaH fxqoKqY+l5j/I5kKigBh+pUrixJ9g1WH+/KSDxoNXnViVqzjxirqs8Ex7APTmlfwhvOHv5UE6WeL1 QxweI1+A==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qiEnK-00BN1a-1b; Mon, 18 Sep 2023 14:00:10 +0000 Date: Mon, 18 Sep 2023 15:00:09 +0100 From: Matthew Wilcox To: Hannes Reinecke Cc: Luis Chamberlain , Christoph Hellwig , Jens Axboe , Pankaj Raghav , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 09/18] fs/buffer: use mapping order in grow_dev_page() Message-ID: References: <20230918110510.66470-1-hare@suse.de> <20230918110510.66470-10-hare@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230918110510.66470-10-hare@suse.de> Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, Sep 18, 2023 at 01:05:01PM +0200, Hannes Reinecke wrote: > Use the correct mapping order in grow_dev_page() to ensure folios > are created with the correct order. I see why you did this, but I think it's fragile. __filemap_get_folio() will happily decrease 'order' if memory allocation fails. I think __filemap_get_folio() needs to become aware of the minimum folio order for this mapping, and then we don't need this patch. Overall, I like bits of this patchset and I like bits of Pankaj's ;-)