vfs: further switch to dirent tracking

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-04 00:08:16 +02:00
commit 7799f3b622
3 changed files with 7 additions and 16 deletions

View file

@ -46,10 +46,10 @@ struct inode_ops {
};
struct _inode {
fs_t *fs;
u64 mode;
u64 ino_num;
u64 file_size;
dirent_t *dentry;
u64 flags;
@ -65,6 +65,7 @@ struct _inode {
};
struct _dirent {
fs_t *fs;
inode_t *inode;
union {
u64 ino_num;

View file

@ -17,9 +17,9 @@ struct fs_type {
};
struct fs_ops {
int (*alloc_inode)(fs_t *fs, inode_t **out);
int (*alloc_inode)(fs_t *fs, dirent_t **out);
int (*free_inode)(fs_t *fs, inode_t *inode);
int (*open_inode)(fs_t *fs, u64 id, inode_t **out);
int (*open_inode)(fs_t *fs, u64 id, dirent_t *dirent, inode_t **out);
};
struct _fs {
@ -36,17 +36,6 @@ struct _fs {
struct fs_ops fs_ops;
};
struct ram_file {
u64 type;
u64 extra;
char *name;
size_t name_len;
void *data;
size_t data_size;
size_t file_size;
};
/* VFS ops */
void vfs_init();
void vfs_register(struct fs_type *fs);