aboutsummaryrefslogtreecommitdiff
path: root/ubifs-utils/libubifs/ubifs.h
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2024-11-11 17:08:03 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2024-11-11 10:32:46 +0100
commite708c6f33e51d9cd5565e16c76af2c4180341499 (patch)
tree842195b1840ccfc5213314f4063029ed2048db22 /ubifs-utils/libubifs/ubifs.h
parente8ca613778e7e5449a038c5ea04b17977de97d74 (diff)
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 <chengzhihao1@huawei.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/libubifs/ubifs.h')
-rw-r--r--ubifs-utils/libubifs/ubifs.h16
1 files changed, 16 insertions, 0 deletions
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);