From 0fbfbf59714b73a0d0c487c454c22d72b2c78e68 Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 11 Nov 2024 17:07:58 +0800 Subject: fsck.ubifs: Consolidate log This is the 4/18 step of fsck. Consolidate log to ensure enough space in log area. There could be following possible errors: 1. corrupted scanning data in log area: danger mode with rebuild_fs and normal mode with 'yes' answer will turn to rebuild filesystem, other modes will exit. Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- ubifs-utils/libubifs/log.c | 1 + 1 file changed, 1 insertion(+) (limited to 'ubifs-utils/libubifs') diff --git a/ubifs-utils/libubifs/log.c b/ubifs-utils/libubifs/log.c index 0d45926..c3dfd98 100644 --- a/ubifs-utils/libubifs/log.c +++ b/ubifs-utils/libubifs/log.c @@ -711,6 +711,7 @@ int ubifs_consolidate_log(struct ubifs_info *c) destroy_done_tree(&done_tree); vfree(buf); if (write_lnum == c->lhead_lnum) { + set_failure_reason_callback(c, FR_DATA_CORRUPTED); ubifs_err(c, "log is too full"); return -EINVAL; } -- cgit v1.2.3