7 #ifndef EXT_FILESYSTEM_CORE_DESCRIPTORS_TABLE_H_
8 #define EXT_FILESYSTEM_CORE_DESCRIPTORS_TABLE_H_
20 uint16_t* fd_to_inode;
21 uint32_t* fd_to_position;
31 const struct superblock* superblock);
39 const struct superblock* superblock);
49 struct descriptors_table* descriptors_table,
50 const struct superblock* superblock);
60 struct descriptors_table* descriptors_table,
61 const struct superblock* superblock);
72 const struct superblock* superblock);
83 const struct superblock* superblock);
92 #endif //EXT_FILESYSTEM_CORE_DESCRIPTORS_TABLE_H_
ssize_t write_descriptor_table(int fd, struct descriptors_table *descriptors_table, const struct superblock *superblock)
Write descriptors_table to memory.
void destruct_descriptors_table(struct descriptors_table *descriptors_table, const struct superblock *superblock)
Destructor of superblock.
struct __attribute__((__packed__)) descriptors_table
Struct for represent DT Contains all information about descriptor table.
Contains superblock struct and its methods.
int free_descriptor(struct descriptors_table *descriptors_table, uint16_t fd, const struct superblock *superblock)
Release descriptor for inode_id.
ssize_t read_descriptors_table(int fd, struct descriptors_table *descriptors_table, const struct superblock *superblock)
Read descriptors_table from memory.
void init_descriptors_table(struct descriptors_table *descriptors_table, const struct superblock *superblock)
Constructor of descriptors_table Init descriptors table with metadata from superblock.
uint16_t sizeof_descriptors_table(const struct superblock *superblock)
Sizeof descriptors_table.
int reserve_descriptor(struct descriptors_table *descriptors_table, uint16_t inode_id, const struct superblock *superblock)
Occupy descriptor for inode_id.