]> Gentwo Git Trees - linux/.git/commit
ext4: support large block size in ext4_readdir()
authorBaokun Li <libaokun1@huawei.com>
Fri, 21 Nov 2025 09:06:38 +0000 (17:06 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 29 Nov 2025 03:35:26 +0000 (22:35 -0500)
commit609c5e0081b432caaa557ffcf1318aefe1187c4e
tree33a4cc92edf87df69e934083573a93a8f2dc5b20
parent6a28b5c9908d6e7ea13eae7a5872e8e081a397c4
ext4: support large block size in ext4_readdir()

In ext4_readdir(), page_cache_sync_readahead() is used to readahead mapped
physical blocks. With LBS support, this can lead to a negative right shift.

To fix this, the page index is now calculated by first converting the
physical block number (pblk) to a file position (pos) before converting
it to a page index. Also, the correct number of pages to readahead is now
passed.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Pankaj Raghav <p.raghav@samsung.com>
Reviewed-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Message-ID: <20251121090654.631996-9-libaokun@huaweicloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/dir.c