diff options
author | Zhihao Cheng <chengzhihao1@huawei.com> | 2024-11-11 17:08:12 +0800 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2024-11-11 10:32:46 +0100 |
commit | df5d5489aed7ae9de007776e19350bd5aebbfea2 (patch) | |
tree | e22d46cedff685cc8fa66bb695d14c5571bdfe45 /ubifs-utils/libubifs/misc.h | |
parent | 7e6ae3a8dcbedf0e65c091e985aff56f293cf8ec (diff) |
ubifs-utils: libubifs: Support some file operations
Add some file operations, such as ubifs_lookup, ubifs_mkdir, etc., this
is a preparation for recovering disconnected files or root dir in fsck.
File writing operations are based on the journal subsystem, generated
dirty data depends on a new commit in subsequent steps to update disk
content.
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'ubifs-utils/libubifs/misc.h')
-rw-r--r-- | ubifs-utils/libubifs/misc.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ubifs-utils/libubifs/misc.h b/ubifs-utils/libubifs/misc.h index 4b71806..1b4404f 100644 --- a/ubifs-utils/libubifs/misc.h +++ b/ubifs-utils/libubifs/misc.h @@ -70,6 +70,15 @@ ubifs_tnc_find_child(struct ubifs_znode *znode, int start) } /** + * ubifs_inode - get UBIFS inode information by VFS 'struct inode' object. + * @inode: the VFS 'struct inode' pointer + */ +static inline struct ubifs_inode *ubifs_inode(const struct inode *inode) +{ + return container_of(inode, struct ubifs_inode, vfs_inode); +} + +/** * ubifs_wbuf_sync - synchronize write-buffer. * @wbuf: write-buffer to synchronize * |