
HULK inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/IBY4CK ---------------------------- The md_bitmap_status() function incorrectly returns for external bitmaps, preventing statistics collection when a valid superblock page exists. Remove the external bitmap check as the statistics should be available regardless of bitmap storage location when sb_page is present. Note: "bitmap_info.external" here refers to a bitmap stored in a separate file (bitmap_file), not to external metadata. Fixes: 8d28d0ddb986 ("md/md-bitmap: Synchronize bitmap_get_stats() with bitmap lifetime") Signed-off-by: Zheng Qixing <zhengqixing@huawei.com> --- drivers/md/md-bitmap.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index 3744acda47d8..b72c8025b2c3 100644 --- a/drivers/md/md-bitmap.c +++ b/drivers/md/md-bitmap.c @@ -2120,8 +2120,6 @@ void md_bitmap_status(struct seq_file *seq, struct bitmap *bitmap) if (!bitmap) return; - if (bitmap->mddev->bitmap_info.external) - return; if (!bitmap->storage.sb_page) /* no superblock */ return; counts = &bitmap->counts; -- 2.39.2