From e708c6f33e51d9cd5565e16c76af2c4180341499 Mon Sep 17 00:00:00 2001 From: Zhihao Cheng Date: Mon, 11 Nov 2024 17:08:03 +0800 Subject: fsck.ubifs: Update files' size for check mode This is the 7/18 step of fsck. Update files' size according to size tree for check mode, now all files are updated after replaying journal. Signed-off-by: Zhihao Cheng Signed-off-by: David Oberhollenzer --- ubifs-utils/libubifs/ubifs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ubifs-utils/libubifs/ubifs.h') diff --git a/ubifs-utils/libubifs/ubifs.h b/ubifs-utils/libubifs/ubifs.h index 03150cd..72497cd 100644 --- a/ubifs-utils/libubifs/ubifs.h +++ b/ubifs-utils/libubifs/ubifs.h @@ -1297,6 +1297,22 @@ static inline int ubifs_authenticated(const struct ubifs_info *c) return c->authenticated; } +/** + * struct size_entry - inode size information for recovery. + * @rb: link in the RB-tree of sizes + * @inum: inode number + * @i_size: size on inode + * @d_size: maximum size based on data nodes + * @exists: indicates whether the inode exists + */ +struct size_entry { + struct rb_node rb; + ino_t inum; + loff_t i_size; + loff_t d_size; + int exists; +}; + #ifdef WITH_CRYPTO int ubifs_init_authentication(struct ubifs_info *c); int ubifs_shash_init(const struct ubifs_info *c, struct shash_desc *desc); -- cgit v1.2.3