From 2c7404fc8fd6c12bb8179147ff47c864819f4b35 Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 11 Nov 2024 17:01:15 +0800 Subject: fsck.ubifs: rebuild_fs: Re-write data This is the 8/12 step of rebuilding. Re-write data. Read data from LEB and write back data, make sure that all LEB is ended with empty data(0xFF). It will prevent failed gc scanning in next mounting. Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- ubifs-utils/libubifs/ubifs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ubifs-utils/libubifs') diff --git a/ubifs-utils/libubifs/ubifs.h b/ubifs-utils/libubifs/ubifs.h index e6de7ce..c9d582d 100644 --- a/ubifs-utils/libubifs/ubifs.h +++ b/ubifs-utils/libubifs/ubifs.h @@ -337,6 +337,7 @@ enum { * @dirty: amount of dirty space in bytes * @flags: LEB properties flags (see above) * @lnum: LEB number + * @end: the end postition of LEB calculated by the last node * @list: list of same-category lprops (for LPROPS_EMPTY and LPROPS_FREEABLE) * @hpos: heap position in heap of same-category lprops (other categories) */ @@ -345,6 +346,7 @@ struct ubifs_lprops { int dirty; int flags; int lnum; + int end; union { struct list_head list; int hpos; -- cgit v1.2.3