diff options
author | Kemeng Shi <shikemeng@huaweicloud.com> | 2023-02-21 14:59:19 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2023-03-24 06:00:08 +0300 |
commit | 68e294dcccf965c93d65c4660547794728a4cff0 (patch) | |
tree | 90cf8f8edf8da4ab8a034f41acff93c35e7626a0 /fs/ext4/bitmap.c | |
parent | cefa74d004fa48bc073ad66b7a7ad00dc8d7bfa6 (diff) | |
download | linux-68e294dcccf965c93d65c4660547794728a4cff0.tar.xz |
ext4: improve inode table blocks counting in ext4_num_overhead_clusters
As inode table blocks are contiguous, inode table blocks inside the
block_group can be represented as range [itbl_cluster_start,
itbl_cluster_last]. Then we can simply account inode table cluters and
check cluster overlap with [itbl_cluster_start, itbl_cluster_last]
instead of traverse each block of inode table.
By the way, this patch fixes code style problem of comment for
ext4_num_overhead_clusters.
[ Merged fix-up patch which fixed potentially access to an
uninitialzied stack variable. --TYT ]
Signed-off-by: Kemeng Shi <shikemeng@huaweicloud.com>
Link: https://lore.kernel.org/r/20230221115919.1918161-8-shikemeng@huaweicloud.com
Link: https://lore.kernel.org/r/202303171446.eLEhZzAu-lkp@intel.com/
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/bitmap.c')
0 files changed, 0 insertions, 0 deletions