Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp304450rwb; Wed, 16 Nov 2022 00:24:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf4dYmXRPU+KxM0T4qoEnejlA28GpWTTHf2E18TkR9fPUB53jTFpapbVsPV1LjlCKwMboP61 X-Received: by 2002:a17:906:a2d4:b0:7ac:db70:2f90 with SMTP id by20-20020a170906a2d400b007acdb702f90mr16591485ejb.297.1668587065075; Wed, 16 Nov 2022 00:24:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668587065; cv=none; d=google.com; s=arc-20160816; b=e1RUdnJKPYHulVufRx6+Jw6RGLwm2EHrtgjK80uAKNSW6NyKKaXTlamhQ2aUJkNOv/ QnOm/9yBHfuO7ecSi+99y+tV9BDkAEQ2qX4+Sy+lZduELYkuEAmZqKsrcIhYMrqYmQlf qp2wqu2BB9crwRIJk2CT4Gq1rdR6VAruoSdMtNr91DIEr0qidvlSix/jhDwoYQwVoyWo +Tk37OD2R56amouiifxsQX5FnYlASeVkd9WW/OSKx8khm2ItU85vM7OencZ/C8Xs+AtM eT4tWo+flaRd9RsJuV4c3Vm5woR4pGcdNo0be14y47sczIgkjYxNRTXFPQTiyi3I68qx lZqg== 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=fC4LrdUtHicDNTrM6ZQCgkHgfF5J9bOlSVqabw6qkVo=; b=N58HoNWNpOH7LuhKUHN23SSwFSQZno7PyMr+feJcnFikio7D1apwLIlmBj8f4H6hrB nFDBwNxYC8G8+lhq9C3Yqg1nKtdByS4JOlWxObcodJl395q+v1gYI6uZRnvNHsW+v0uN oPO7Ra5JOUSLhBr/NHGPT1Kzd07e4RpZOO+mK8Kh3hkJprC5TfcU1w+WnHimDAtmCwzN sOyWNrX57gFLrTQlhBmK1l0c5DFeghJxIY4IQNH3Ysz0vOR8h5Acf1tAhSdDGO5j5A9h ewktHtwUFAG32/0TfrRpJ3aDftjfP+6ZtioAMJah+ba9hYwoVTrbVEKBkZPLfp8mn2M1 Yv7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=rgHGM2Wt; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cz6-20020a0564021ca600b004631c0f4612si13051121edb.555.2022.11.16.00.23.47; Wed, 16 Nov 2022 00:24:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=rgHGM2Wt; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233144AbiKPIMS (ORCPT + 99 others); Wed, 16 Nov 2022 03:12:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42288 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238794AbiKPIL6 (ORCPT ); Wed, 16 Nov 2022 03:11:58 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFF3A2CDCC; Wed, 16 Nov 2022 00:09:28 -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=fC4LrdUtHicDNTrM6ZQCgkHgfF5J9bOlSVqabw6qkVo=; b=rgHGM2WtyE9J9xNTJOoLkyh0HU KA0SbPvfBG3eMMfXlW7Pn5OClY9qOSWpjp3XgCGpGFTzd1pb8NP7LHQqwqlK8wie7laXLNh22RNd6 nWn9l5R1/1ZefPg8tiyaHKH6KtapubFM/WqW0FkRgUFyktm9TaFzwrExteT7suQ9y6WXYOWYzaqsB UHYLXV2irc3lUSgo04fxpZwR5cImwR5O8tfeuhA2yZDzxIGF5VfavMSfAClxNQS+pyuk9B2DGRYcP 6e07LZ8Yule1wh4d/kvm3udoOWts/etIGcfSfowQFztBMQB1z1LiAVs5UhfDKUN/KJy3oqaMEQ+OQ NN3JvG/w==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovDU2-00HAeo-2Q; Wed, 16 Nov 2022 08:09:22 +0000 Date: Wed, 16 Nov 2022 08:09:22 +0000 From: Matthew Wilcox To: "Vishal Moola (Oracle)" Cc: linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org, akpm@linux-foundation.org, naoya.horiguchi@nec.com, tytso@mit.edu Subject: Re: [PATCH 1/4] ext4: Convert move_extent_per_page() to use folios Message-ID: References: <20221116021011.54164-1-vishal.moola@gmail.com> <20221116021011.54164-2-vishal.moola@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221116021011.54164-2-vishal.moola@gmail.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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-ext4@vger.kernel.org On Tue, Nov 15, 2022 at 06:10:08PM -0800, Vishal Moola (Oracle) wrote: > { > struct inode *orig_inode = file_inode(o_filp); > struct page *pagep[2] = {NULL, NULL}; > + struct folio *folio[2] = {NULL, NULL}; I have a feeling that mext_page_double_lock() should also be converted to use folios. But this makes me nervous: int blocks_per_page = PAGE_SIZE >> orig_inode->i_blkbits; and I'm not sure what will happen if one or both of the orig_page and donor_page is large -- possibly different sizes of large. Obviously ext4 doesn't allow large folios today, but it would be good to get some reasoning about why this isn't laying a trap for later (or at least assertions that neither folio is large so that there's an obvious scream instead of silent data corruption).