From patchwork Wed Nov 13 09:47:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Chamberlain X-Patchwork-Id: 13895554 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id EF555E7716D for ; Thu, 5 Dec 2024 15:23:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 05DF46B0130; Thu, 5 Dec 2024 10:19:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5A8726B0134; Thu, 5 Dec 2024 10:19:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2731D6B00F1; Thu, 5 Dec 2024 10:19:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id DC5076B00C9 for ; Wed, 13 Nov 2024 04:47:36 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 86B1940948 for ; Wed, 13 Nov 2024 09:47:36 +0000 (UTC) X-FDA: 82780593168.10.0ECE5F1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf06.hostedemail.com (Postfix) with ESMTP id 73F2E18000E for ; Wed, 13 Nov 2024 09:47:04 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=YSX0EDzr; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=quarantine); spf=none (imf06.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731491167; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=v1hn7jTllJt027wi2EuYKy1M6kMpA7RumaYFxoUC1HI=; b=a0jCqGehBpDbvNl9I8RoiqiF2zRB3q8dd6E0szzl5thmM8rvNWb9CwsRJxMnw4KrqnShor RndPuN5i/ZOnG42bTrTJLujd6bBFw+XzO7NljRZOSVJVcfSfTAtYqsEKWNQhm488koTwKB O6D7gWMUKtfJ+6/G87WVHjG1ZY7T/LM= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=YSX0EDzr; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=quarantine); spf=none (imf06.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731491167; a=rsa-sha256; cv=none; b=srEB87xYNuiasONImGmeyfaA/YmZTDn14hQtQFmrwJ0k0MkQvLC8syC6+KeBjF79fXKF5/ oR2Rr70XTm3SLFSM5xBWDJTAIAEMVQPSuxWyAh6wNDqwPSIK1FYW0+x6viucrxU9NIQznH zL+JVMZzURDIApNQgs12nGZjKqbfwNc= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description; bh=v1hn7jTllJt027wi2EuYKy1M6kMpA7RumaYFxoUC1HI=; b=YSX0EDzrzBi3K2/pJrtGXF24rp j5lTJasVr/P+LgtwWwKhkLU3mFJWGb5hV/WXVdYOUwsLgkXNwyLSdVgvVO4wqyBeloxb+0bvEsNCb Eu77MWXLhodY7x6GMPFW/SWXeg7lLivHqER9vaEW3oxTzjyTCp6H+QjoFBttZ2DQQkRARJAc3YN4s 5HCgwoq3AzrQSx3auSaBCAY87O/ctCESb9Cyc3bpqH5LFKPlJ9qVhk4ct8rPZ2+w+YYoknajjiQLW 5zroffNYSZLnWg5waH9jvnppvowXI7VxdoQPuEHaRLHJKDdKNtJUXvgQ3OjTm3owb639om+aPIJCv Zg+yBSZw==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1tB9yD-00000006Hd9-0Sue; Wed, 13 Nov 2024 09:47:29 +0000 From: Luis Chamberlain To: willy@infradead.org, hch@lst.de, hare@suse.de, david@fromorbit.com, djwong@kernel.org Cc: john.g.garry@oracle.com, ritesh.list@gmail.com, kbusch@kernel.org, linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, linux-block@vger.kernel.org, gost.dev@samsung.com, p.raghav@samsung.com, da.gomez@samsung.com, kernel@pankajraghav.com, mcgrof@kernel.org Subject: [RFC 4/8] fs/buffer fs/mpage: remove large folio restriction Date: Wed, 13 Nov 2024 01:47:23 -0800 Message-ID: <20241113094727.1497722-5-mcgrof@kernel.org> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241113094727.1497722-1-mcgrof@kernel.org> References: <20241113094727.1497722-1-mcgrof@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 73F2E18000E X-Rspamd-Pre-Result: action=add header; module=dmarc; Action set by DMARC X-Stat-Signature: wj9qwe4o39ux4jaxu7izj7u94dezjcjw X-Rspam: Yes X-HE-Tag: 1731491224-595463 X-HE-Meta: U2FsdGVkX19GGkQ2p+LJMZEivfcE9neA4jMxl1V/xbu35pomWHwz3bFbE9YTUY2RJcsYbj9XaUddawdwVXB2hMNmzZHdATVCsO3ykDJxPITHIk/W2Cdm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j7AgexcdToHgztZRY+3hqtu8xaEQW1CO0z0CfPP67dstUvFOGYcsHkaigWNAroUP19Xej4y9Ip9m5VNCTJpQxrFKXHP5jIJsj+v6n6FWwkVZjr1l2TxZ5FHTEsrnchqfrGKPU/8hoFN4ypMYnANKLIQv2V7/wQ8aEYxPY7Eijcsz7kAJw5sLBNBboTJ/Ztpf37EpSbVRdvvyTnxjFivTqNdXEr7EyyN6dj/4MYIP8JeKPJ4fXWd3UyoyCXLWGsUO9MmFnnoIDM4a3WTIcb526XbC4Hu4YA8WD1K1D9w== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000002, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Now that buffer-heads has been converted over to support large folios we can remove the built-in VM_BUG_ON_FOLIO() checks which prevents their use. Signed-off-by: Luis Chamberlain --- fs/buffer.c | 2 -- fs/mpage.c | 3 --- 2 files changed, 5 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 818c9c5840fe..85471d2c0df9 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2377,8 +2377,6 @@ int block_read_full_folio(struct folio *folio, get_block_t *get_block) if (IS_ENABLED(CONFIG_FS_VERITY) && IS_VERITY(inode)) limit = inode->i_sb->s_maxbytes; - VM_BUG_ON_FOLIO(folio_test_large(folio), folio); - head = folio_create_buffers(folio, inode, 0); blocksize = head->b_size; diff --git a/fs/mpage.c b/fs/mpage.c index ff76600380ca..a71a4a0b34f4 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -170,9 +170,6 @@ static struct bio *do_mpage_readpage(struct mpage_readpage_args *args) unsigned relative_block; gfp_t gfp = mapping_gfp_constraint(folio->mapping, GFP_KERNEL); - /* MAX_BUF_PER_PAGE, for example */ - VM_BUG_ON_FOLIO(folio_test_large(folio), folio); - if (args->is_readahead) { opf |= REQ_RAHEAD; gfp |= __GFP_NORETRY | __GFP_NOWARN;