Message ID | 20241113094727.1497722-6-mcgrof@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 3974DE7716C for <linux-mm@archiver.kernel.org>; Thu, 5 Dec 2024 15:23:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 22CBF6B0134; Thu, 5 Dec 2024 10:19:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6C0786B0126; Thu, 5 Dec 2024 10:19:20 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E33BB6B00C6; Thu, 5 Dec 2024 10:19:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id E44D36B00CA for <linux-mm@kvack.org>; Wed, 13 Nov 2024 04:47:36 -0500 (EST) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 83C7B8095C for <linux-mm@kvack.org>; Wed, 13 Nov 2024 09:47:36 +0000 (UTC) X-FDA: 82780593294.12.35A184F Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) by imf08.hostedemail.com (Postfix) with ESMTP id F0E44160018 for <linux-mm@kvack.org>; Wed, 13 Nov 2024 09:47:05 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=LfjqClc8; spf=none (imf08.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=quarantine) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1731491199; 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=rV5AoYJPlny/7wnGoBOtLs3pAmaEJ9e3y3MRINCsK0A=; b=r4o/ER58UnXxBPanGIAFJAudGHMZcltAouBykZy81OnHfG9TUdi7F4gW5fmj6YMF3hKVgK CM5wqc4GhTCl1s3fGpw1zm5sr1I66Rou6kArb2HJMxF7KuhmiKDoS4TBknZn98evlbFZ9s CX8xLjmAVZR5MXPD8ydKdiOwQo5PpVc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1731491199; a=rsa-sha256; cv=none; b=lrTsZEGS1GA3RUmXKSw2AIhyu5tSAJAyMlRyUgUA5pr7OdbvdcA2ufv7aG4evv00YE3O5m DA+t8qxYLRPPyYoEMzk+KazWW0FQJJ88AfHkXXU2nIPWlMj5jlv+nsEqllBwv4m4D68NFv D04VvaQhmwdJHlMRWDtfevcFIQK1HSw= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=infradead.org header.s=bombadil.20210309 header.b=LfjqClc8; spf=none (imf08.hostedemail.com: domain of mcgrof@infradead.org has no SPF policy when checking 198.137.202.133) smtp.mailfrom=mcgrof@infradead.org; dmarc=fail reason="No valid SPF, DKIM not aligned (relaxed)" header.from=kernel.org (policy=quarantine) 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=rV5AoYJPlny/7wnGoBOtLs3pAmaEJ9e3y3MRINCsK0A=; b=LfjqClc8gfoI1goRIcRzOCl8nx xMnODzqL5tTVLpi+FvD7+C5W+4VSWGyWxc3O+VSWQZQAFTpyXCMMObOBJng3DiVAWzZqWif6ybCFj 1O1EBmG6ZyQqRd7CWreGNvgE2bM6bDPeON3eWYpp/4tFR3VOGoX0DFrJqQzJ7C6ny88TS5jTT7n1X yTUGmwZ3qBkBY2FU9WcxTHWk0AbZ9o2XGr7dAUgRXdjhPETrSapitHz1jEMeQiNIgVshgBIZn2Sgx Qr15Lt8fMF2tYztfz6bjVjeNmc1SCe1W0+wSBLZl6BK/QX4jkKp9xyyHWp6S4SE3bG7wcsx39c4Cy /3lmBZRg==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.98 #2 (Red Hat Linux)) id 1tB9yD-00000006HdB-1F85; Wed, 13 Nov 2024 09:47:29 +0000 From: Luis Chamberlain <mcgrof@kernel.org> 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 5/8] block/bdev: enable large folio support for large logical block sizes Date: Wed, 13 Nov 2024 01:47:24 -0800 Message-ID: <20241113094727.1497722-6-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 Content-Transfer-Encoding: 8bit X-Rspamd-Pre-Result: action=add header; module=dmarc; Action set by DMARC X-Stat-Signature: r8ypun3xozk5zsyktp5m4swyjizc8uzi X-Rspam-User: X-Rspamd-Queue-Id: F0E44160018 X-Rspamd-Server: rspam02 X-Rspam: Yes X-HE-Tag: 1731491225-827898 X-HE-Meta: U2FsdGVkX18YEBKAo4WbHJnj8KD/fGyAuTxW2PNx0VcZsYvEWxdkO1NH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rgg8PG9excFoK7LJABeiSR22JJcSh983gkmw3rlcBcXCCk8aXMzmc0cz+UuFxtrCpDzXIx/9YAxe0s+34wxxvgDKdNajHTmcKPo4XNZrfgK3/w1oHd+CeS3IpB6eBpqVOtFUPdj3EFZ2uhJSYbkaqgv9DMxj747ZjnGi84DZmfYcZVHDYIRQt57gS/jgqwUObhVdDmi9tLz0NsvZ9pe4Q/cBm6Wo/0BsS1D44nmisghLJnRZL9lyfYj9XfUsO6M3m+PPeqqtvlTgazrHsp4A5eCZPlrEw1uorcj0bBmHi8Bim6tdt8veYouJh/Wx7bBWRWSPbDCAJi5VY82tviu3xYfb X-Bogosity: Ham, tests=bogofilter, spamicity=0.000034, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
enable bs > ps for block devices
|
expand
|
diff --git a/block/bdev.c b/block/bdev.c index 738e3c8457e7..167d82b46781 100644 --- a/block/bdev.c +++ b/block/bdev.c @@ -148,6 +148,8 @@ static void set_init_blocksize(struct block_device *bdev) bsize <<= 1; } BD_INODE(bdev)->i_blkbits = blksize_bits(bsize); + mapping_set_folio_min_order(BD_INODE(bdev)->i_mapping, + get_order(bsize)); } int set_blocksize(struct file *file, int size) @@ -170,6 +172,7 @@ int set_blocksize(struct file *file, int size) if (inode->i_blkbits != blksize_bits(size)) { sync_blockdev(bdev); inode->i_blkbits = blksize_bits(size); + mapping_set_folio_min_order(inode->i_mapping, get_order(size)); kill_bdev(bdev); } return 0;