Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1871036rdb; Tue, 3 Oct 2023 03:52:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHVQywbIU37YH0z2BA25yai/VVhUsjs1O83DFusD/g5NZ+K5E06gzB20+UExe124Y/TVkp3 X-Received: by 2002:a9d:7ad6:0:b0:6b7:4af2:492d with SMTP id m22-20020a9d7ad6000000b006b74af2492dmr13146166otn.38.1696330361968; Tue, 03 Oct 2023 03:52:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696330361; cv=none; d=google.com; s=arc-20160816; b=U1yquXbiqSfyQR/gfWOOU3NLWH/ByddOJp7mqofOrLncvT9pkfqQ7Z6uUn2wYLyvkB 8GJ7+a5Mg6RGW1OCr/zDoAz03REwUwT3ODVwqJ2ZcTzlJ9OaKv57cJeaLaEhV3Gus5Ci qHJ2oEqk7QHU2kldTm4tUDFxmI5KraOK9yi4flFRgaEDFkMtBb1DERv3nIlPptGL/CR/ 4XePrs2j1b1f5L76Z9535smSixNPCHNHk2IoeZDSlDDx6WzM6HV2xfmxKdEJj6lfFVEl LZ1iwXe7KGL+S9D62IMQVZyQpbEkpjoK/C38pX1gnXj7r2X5mKIQ/jVNfLGm8STPB1xa bOrw== 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 :dkim-signature; bh=FvRPHEd3+RwLBxpUpbPjM9nB8yg4wsbQfmswgFYItTQ=; fh=1HYLgYaylU3/z29Tc/uVuG9sQVCD6+yYW4fbevTtXUk=; b=agyTennSKrFu2Ynm2w3+jxzhvkShLTklKbtT6ACIr6HCcM0FR0JGczwjlgOEM1oJCM K1fh4zWHmpBqdyBwUXAvOutNcexyRUlk6AfO/5eTBeKPoLRC72V9D5ilJinOq8bdyv+O 2tGldk6b5u1RD17sBVbRzdAyACauTw93vXLMJzJLTLzTmz96wOeUw1SgDcjQW2l8AgEH vLZcy3Sy6BGIcLL3cnXj5goepCsAKejLkLMrWyC2Y4By9Ztaw+qowLdmPUN0FJfpatdY qQDNexqmY81CqFygz9PhbDzcMaE2Dt1AxJ5T1h18ZHS/dAulmJtfNLtQ11cL5cTaqZaN cPqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=0Oqf63is; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id i65-20020a636d44000000b0056a8dc222f1si1241928pgc.259.2023.10.03.03.52.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 03:52:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=0Oqf63is; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id BD05C80C7716; Tue, 3 Oct 2023 03:52:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230303AbjJCKwa (ORCPT + 99 others); Tue, 3 Oct 2023 06:52:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230424AbjJCKw3 (ORCPT ); Tue, 3 Oct 2023 06:52:29 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D082DAF; Tue, 3 Oct 2023 03:52:26 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 87B2521889; Tue, 3 Oct 2023 10:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1696330345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FvRPHEd3+RwLBxpUpbPjM9nB8yg4wsbQfmswgFYItTQ=; b=0Oqf63isizj991VeQ+EPJaINoJIWd2do03XUb0nKDdBXYxIGUENHHJ56fsU7vTaF5lYi29 sd3HFUCuSXZI4hdBc0cLuyTwAiRwDLB0IitUZ0VQx8flav21P/0+ImQf/kmO2iaf2k/HuP L2tTc6gCyBpz9nwatgOm1GNZpMrDrss= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1696330345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=FvRPHEd3+RwLBxpUpbPjM9nB8yg4wsbQfmswgFYItTQ=; b=oxSU8zroBYS9gYEUBk2fHh4HH1NGS0mesqZ66WTK56I8r4aU4iLlHoDcdyAOsruVaBJIOn f0fqjLxNTLS4z6Bw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 787A2132D4; Tue, 3 Oct 2023 10:52:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qX5rHWnyG2XJbwAAMHmgww (envelope-from ); Tue, 03 Oct 2023 10:52:25 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 020FAA07CB; Tue, 3 Oct 2023 12:52:24 +0200 (CEST) Date: Tue, 3 Oct 2023 12:52:24 +0200 From: Jan Kara To: "Matthew Wilcox (Oracle)" Cc: Jan Kara , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Fabio M . De Francesco" Subject: Re: [PATCH 02/10] ext2: Convert ext2_check_page to ext2_check_folio Message-ID: <20231003105224.3j47fjxpiudwvupn@quack3> References: <20230921200746.3303942-1-willy@infradead.org> <20230921200746.3303942-2-willy@infradead.org> <20231003104017.ohuyl3fv2mobif5u@quack3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231003104017.ohuyl3fv2mobif5u@quack3> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 03 Oct 2023 03:52:39 -0700 (PDT) On Tue 03-10-23 12:40:17, Jan Kara wrote: > On Thu 21-09-23 21:07:39, Matthew Wilcox (Oracle) wrote: > > Support in this function for large folios is limited to supporting > > filesystems with block size > PAGE_SIZE. This new functionality will only > > be supported on machines without HIGHMEM, so the problem of kmap_local > > only being able to map a single page in the folio can be ignored. > > We will not use large folios for ext2 directories on HIGHMEM machines. > > OK, but can we perhaps enforce this with some checks & error messages > instead of a silent failure? Like: > > #ifdef CONFIG_HIGHMEM > if (sb->s_blocksize > PAGE_SIZE) > bail with error > #endif > > somewhere in ext2_fill_super()? Or maybe force allocation of lowmem pages > when blocksize > PAGE_SIZE? > > > @@ -195,9 +195,9 @@ static void *ext2_get_page(struct inode *dir, unsigned long n, > > > > if (IS_ERR(folio)) > > return ERR_CAST(folio); > > - page_addr = kmap_local_folio(folio, n & (folio_nr_pages(folio) - 1)); > > + page_addr = kmap_local_folio(folio, 0); Oh, and I think this change breaks the code whenever we get back higher order folio because the page_addr we get back is not for the page index 'n'. Honza -- Jan Kara SUSE Labs, CR