|
22 | 22 | #include "mballoc.h"
|
23 | 23 |
|
24 | 24 | #include <trace/events/ext4.h>
|
| 25 | +#include <kunit/static_stub.h> |
25 | 26 |
|
26 | 27 | static unsigned ext4_num_base_meta_clusters(struct super_block *sb,
|
27 | 28 | ext4_group_t block_group);
|
@@ -272,6 +273,9 @@ struct ext4_group_desc * ext4_get_group_desc(struct super_block *sb,
|
272 | 273 | struct ext4_sb_info *sbi = EXT4_SB(sb);
|
273 | 274 | struct buffer_head *bh_p;
|
274 | 275 |
|
| 276 | + KUNIT_STATIC_STUB_REDIRECT(ext4_get_group_desc, |
| 277 | + sb, block_group, bh); |
| 278 | + |
275 | 279 | if (block_group >= ngroups) {
|
276 | 280 | ext4_error(sb, "block_group >= groups_count - block_group = %u,"
|
277 | 281 | " groups_count = %u", block_group, ngroups);
|
@@ -466,6 +470,9 @@ ext4_read_block_bitmap_nowait(struct super_block *sb, ext4_group_t block_group,
|
466 | 470 | ext4_fsblk_t bitmap_blk;
|
467 | 471 | int err;
|
468 | 472 |
|
| 473 | + KUNIT_STATIC_STUB_REDIRECT(ext4_read_block_bitmap_nowait, |
| 474 | + sb, block_group, ignore_locked); |
| 475 | + |
469 | 476 | desc = ext4_get_group_desc(sb, block_group, NULL);
|
470 | 477 | if (!desc)
|
471 | 478 | return ERR_PTR(-EFSCORRUPTED);
|
@@ -561,6 +568,9 @@ int ext4_wait_block_bitmap(struct super_block *sb, ext4_group_t block_group,
|
561 | 568 | {
|
562 | 569 | struct ext4_group_desc *desc;
|
563 | 570 |
|
| 571 | + KUNIT_STATIC_STUB_REDIRECT(ext4_wait_block_bitmap, |
| 572 | + sb, block_group, bh); |
| 573 | + |
564 | 574 | if (!buffer_new(bh))
|
565 | 575 | return 0;
|
566 | 576 | desc = ext4_get_group_desc(sb, block_group, NULL);
|
|
0 commit comments