jbd2: Add recovery.c to the build

Add recovery.c to the jbd2 Makefile and update includes to use the ext4l
compatibility layer.

Add stubs for revoke.c functions that recovery.c depends on and tweak a
few so things build.

Fix sync_blockdev to return int instead of void.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-12-21 06:47:55 -07:00
parent 525cff9f6c
commit 87f7e16bfa
4 changed files with 27 additions and 16 deletions

View File

@@ -3,4 +3,4 @@
# Makefile for JBD2 journaling layer (used by ext4l)
#
obj-y := checkpoint.o commit.o journal.o
obj-y := checkpoint.o commit.o journal.o recovery.o

View File

@@ -10,17 +10,8 @@
* part of the ext2fs journaling system.
*/
#ifndef __KERNEL__
#include "jfs_user.h"
#else
#include <linux/time.h>
#include <linux/fs.h>
#include "../ext4l/ext4_uboot.h"
#include <linux/jbd2.h>
#include <linux/errno.h>
#include <linux/crc32.h>
#include <linux/blkdev.h>
#include <linux/string_choices.h>
#endif
/*
* Maintain information about the progress of the recovery job, so that
@@ -628,7 +619,7 @@ static int do_one_pass(journal_t *journal,
* filesystems.
*/
hash_size = min(roundup_pow_of_two(info->nr_revokes / 8),
1U << 20);
1UL << 20);
journal->j_revoke =
jbd2_journal_init_revoke_table(hash_size);
if (!journal->j_revoke) {