ext2: add ext2 driver v2

This driver is not yet feature complete, yet it is much cleaner than the
old one.
This commit is contained in:
Michael Shaw 2025-02-17 19:41:07 -05:00
commit 623cb5905a
5 changed files with 336 additions and 723 deletions

View file

@ -146,6 +146,8 @@ struct ext2fs {
uint32_t bgdt_num_blocks;
struct ext2_group_desc *bgdt;
spinlock_t lock;
uint32_t indir_block_size;
uint32_t block_size;

View file

@ -117,10 +117,8 @@ struct file_descriptor {
struct fs_ops {
int (*read)(struct vnode *vnode, void *buf, size_t offset, size_t size);
int (*write)(struct vnode *vnode, void *buf, size_t offset, size_t size);
int (*readdir)(struct vnode *vnode, struct dirent **dir);
int (*unlink)(struct fs *fs, const char *path); /* change to vno, not path) */
int (*open_vno)(struct fs *vfs, struct vnode *out, ino_t ino_num);
int (*open_dir)(struct fs *vfs, struct vnode *out);
};
struct fs {