7 #ifndef EXT_FILESYSTEM_CORE_BLOCK_H_
8 #define EXT_FILESYSTEM_CORE_BLOCK_H_
29 uint8_t records_count;
39 struct block_info* block_info;
40 struct block_record* block_records;
52 const struct superblock* superblock,
70 const struct superblock* superblock,
84 const struct superblock* superblock,
87 uint8_t records_count);
106 const struct superblock* superblock);
117 const struct superblock* superblock);
143 const struct superblock* superblock);
145 #endif //EXT_FILESYSTEM_CORE_BLOCK_H_
void init_block_with_records(struct block *block, const struct superblock *superblock, uint16_t block_id, uint16_t inode_id, uint8_t records_count)
Constructor of block Init block and set its block_records array to bloc_record[records_count].
ssize_t write_block(int fd, struct block *block, const struct superblock *superblock)
Write.
uint32_t get_max_data_size_of_all_blocks(const struct superblock *superblock)
void init_block_record(struct block_record *block_record, const struct superblock *superblock, uint16_t inode_id)
Constructor of block record Init block record and set its path array to char[max_len_path].
void destruct_block_record(struct block_record *block_record)
Destructor of block_record.
ssize_t read_block(int fd, struct block *block, uint16_t block_id, const struct superblock *superblock)
Read block from memory.
uint32_t get_remain_data(const struct block *block, const struct superblock *superblock)
void destruct_block(struct block *block)
Destructor of block.
uint8_t get_max_records_count(const struct superblock *superblock)
uint32_t get_max_data_in_block(const struct superblock *superblock)
Contains inode struct and its methods.
void init_block(struct block *block, const struct superblock *superblock, uint16_t block_id, uint16_t inode_id)
Constructor of block Init block and set its block_records array to nullptr.
struct __attribute__((__packed__)) block_record
Contains information about filename/dirname.