45 if (blk < desc->superblock->firstdatazone)
108 if (!r)
goto e_nomem;
int bcache_remove(struct bcache *bcache, uint64_t off)
Takes a block out of a cache.
int bcache_insert(struct bcache *bcache, uint64_t off, void *data)
Adds a block to a cache, which keeps its memory from now on.
void * bcache_find(struct bcache *bcache, uint64_t off)
Finds a cached block.
void * kmalloc(size_t size, struct malloc_type *type, int flags)
Allocates memory for one of the kernel's structures.
ssize_t minix_block_write(struct minix *desc, blk_t blk, void *buf)
Writes a block to the disk.
void minix_block_free(struct minix *desc, blk_t blk)
Frees a zone: its bit is cleared in the zone bitmap, which is written back at once,...
ssize_t minix_block_read(struct minix *desc, blk_t blk, void *buf)
Reads a block from the disk.
int minix_bcache_get(struct minix *desc, blk_t blk, void **data)
Gets a block from the block cache, reading it from the disk into the cache if it isn't there.
blk_t minix_block_alloc(struct minix *desc)
Allocates a free zone: its bit is set in the zone bitmap, which is written back to the disk at once.
ssize_t vfs_read(struct vnode *vnode, off_t off, size_t size, void *buf)
Reads from a vnode into a kernel buffer.
A mounted minix filesystem.
struct minix_superblock * superblock
ssize_t vfs_write(struct vnode *vnode, off_t off, size_t size, void *buf)
Writes to a vnode from a kernel buffer.