[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251107144249.435029-23-libaokun@huaweicloud.com>
Date: Fri, 7 Nov 2025 22:42:47 +0800
From: libaokun@...weicloud.com
To: linux-ext4@...r.kernel.org
Cc: tytso@....edu,
adilger.kernel@...ger.ca,
jack@...e.cz,
linux-kernel@...r.kernel.org,
kernel@...kajraghav.com,
mcgrof@...nel.org,
ebiggers@...nel.org,
willy@...radead.org,
yi.zhang@...wei.com,
yangerkun@...wei.com,
chengzhihao1@...wei.com,
libaokun1@...wei.com,
libaokun@...weicloud.com
Subject: [PATCH v2 22/24] ext4: support verifying data from large folios with fs-verity
From: Baokun Li <libaokun1@...wei.com>
Eric Biggers already added support for verifying data from large folios
several years ago in commit 5d0f0e57ed90 ("fsverity: support verifying
data from large folios").
With ext4 now supporting large block sizes, the fs-verity tests
`kvm-xfstests -c ext4/64k -g verity -x encrypt` pass without issues.
Therefore, remove the restriction and allow LBS to be enabled together
with fs-verity.
Cc: Eric Biggers <ebiggers@...nel.org>
Signed-off-by: Baokun Li <libaokun1@...wei.com>
---
fs/ext4/inode.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 517701024d18..b95826e4a419 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -5152,8 +5152,6 @@ static bool ext4_should_enable_large_folio(struct inode *inode)
if (!S_ISREG(inode->i_mode))
return false;
- if (ext4_has_feature_verity(sb))
- return false;
if (ext4_has_feature_encrypt(sb))
return false;
@@ -5175,7 +5173,8 @@ void ext4_set_inode_mapping_order(struct inode *inode)
return;
if (test_opt(inode->i_sb, DATA_FLAGS) == EXT4_MOUNT_JOURNAL_DATA ||
- ext4_test_inode_flag(inode, EXT4_INODE_JOURNAL_DATA))
+ ext4_test_inode_flag(inode, EXT4_INODE_JOURNAL_DATA) ||
+ ext4_has_feature_verity(inode->i_sb))
max_order = EXT4_SB(inode->i_sb)->s_min_folio_order;
else
max_order = EXT4_MAX_PAGECACHE_ORDER(inode);
--
2.46.1
Powered by blists - more mailing lists