Implement a proper block layer with partition support.
[pintos-anon] / src / filesys / inode.h
1 #ifndef FILESYS_INODE_H
2 #define FILESYS_INODE_H
3
4 #include <stdbool.h>
5 #include "filesys/off_t.h"
6 #include "devices/block.h"
7
8 struct bitmap;
9
10 void inode_init (void);
11 bool inode_create (block_sector_t, off_t);
12 struct inode *inode_open (block_sector_t);
13 struct inode *inode_reopen (struct inode *);
14 block_sector_t inode_get_inumber (const struct inode *);
15 void inode_close (struct inode *);
16 void inode_remove (struct inode *);
17 off_t inode_read_at (struct inode *, void *, off_t size, off_t offset);
18 off_t inode_write_at (struct inode *, const void *, off_t size, off_t offset);
19 void inode_deny_write (struct inode *);
20 void inode_allow_write (struct inode *);
21 off_t inode_length (const struct inode *);
22
23 #endif /* filesys/inode.h */