|
ginnOS
The reference: libc, the libraries and the kernel
|
#include "ext2_internal.h"Functions | |
| bool | inode_location (ext2_volume_t *volume, uint32_t inode_number, ext2_block_group_desc_t *desc_out, uint32_t *inode_byte_offset_out, uint32_t *group_out) |
| determines the location of a specific inode within the EXT2 volume, including its block group descriptor and byte offset. | |
| bool | write_inode (ext2_volume_t *volume, uint32_t inode_number, const ext2_inode_t *inode) |
| writes an inode to the EXT2 volume at the specified inode number. | |
| bool | update_group_and_super_counts (ext2_volume_t *volume, uint32_t group, int32_t free_blocks_delta, int32_t free_inodes_delta, int32_t used_dirs_delta) |
| updates the free block count, free inode count, and used directory count in both the block group descriptor and the superblock for the specified block group. | |
| bool | alloc_inode (ext2_volume_t *volume, uint32_t *inode_number_out) |
| allocates a free inode from the EXT2 volume and returns its inode number. | |
| bool | free_inode (ext2_volume_t *volume, uint32_t inode_number) |
| frees an allocated inode in the EXT2 volume, marking it as available for future use. | |
| bool | alloc_block (ext2_volume_t *volume, uint32_t *block_number_out) |
| allocates a free block from the EXT2 volume and returns its block number. | |
| bool | free_block (ext2_volume_t *volume, uint32_t block_number) |
| frees an allocated block in the EXT2 volume, marking it as available for future use. | |
| bool | free_inode_block_chain (ext2_volume_t *volume, ext2_inode_t *inode) |
| frees all blocks associated with an inode, including direct, single indirect, double indirect, and triple indirect blocks. | |
| bool | ext2_write_inode (ext2_volume_t *volume, uint32_t inode_number, const ext2_inode_t *inode) |
| write an inode back to the volume. | |
| bool inode_location | ( | ext2_volume_t * | volume, |
| uint32_t | inode_number, | ||
| ext2_block_group_desc_t * | desc_out, | ||
| uint32_t * | inode_byte_offset_out, | ||
| uint32_t * | group_out ) |
determines the location of a specific inode within the EXT2 volume, including its block group descriptor and byte offset.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| inode_number | the inode number to locate (1-based index). |
| desc_out | pointer to an ext2_block_group_desc_t structure where the block group descriptor will be stored. |
| inode_byte_offset_out | pointer to a variable where the byte offset of the inode within the volume will be stored. |
| group_out | optional pointer to a variable where the block group number will be stored (can be NULL if not needed). |
| bool write_inode | ( | ext2_volume_t * | volume, |
| uint32_t | inode_number, | ||
| const ext2_inode_t * | inode ) |
writes an inode to the EXT2 volume at the specified inode number.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| inode_number | the inode number to write to (1-based index). |
| inode | pointer to the ext2_inode_t structure containing the inode data to be written. |
| bool update_group_and_super_counts | ( | ext2_volume_t * | volume, |
| uint32_t | group, | ||
| int32_t | free_blocks_delta, | ||
| int32_t | free_inodes_delta, | ||
| int32_t | used_dirs_delta ) |
updates the free block count, free inode count, and used directory count in both the block group descriptor and the superblock for the specified block group.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| group | the block group number to update. |
| free_blocks_delta | the change in the number of free blocks (positive to increase, negative to decrease). |
| free_inodes_delta | the change in the number of free inodes (positive to increase, negative to decrease). |
| used_dirs_delta | the change in the number of used directories (positive to increase, negative to decrease). |
| bool alloc_inode | ( | ext2_volume_t * | volume, |
| uint32_t * | inode_number_out ) |
allocates a free inode from the EXT2 volume and returns its inode number.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| inode_number_out | pointer to a variable where the allocated inode number will be stored (1-based index). |
| bool free_inode | ( | ext2_volume_t * | volume, |
| uint32_t | inode_number ) |
frees an allocated inode in the EXT2 volume, marking it as available for future use.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| inode_number | the inode number to free (1-based index). |
| bool alloc_block | ( | ext2_volume_t * | volume, |
| uint32_t * | block_number_out ) |
allocates a free block from the EXT2 volume and returns its block number.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| block_number_out | pointer to a variable where the allocated block number will be stored. |
| bool free_block | ( | ext2_volume_t * | volume, |
| uint32_t | block_number ) |
frees an allocated block in the EXT2 volume, marking it as available for future use.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| block_number | the block number to free. |
| bool free_inode_block_chain | ( | ext2_volume_t * | volume, |
| ext2_inode_t * | inode ) |
frees all blocks associated with an inode, including direct, single indirect, double indirect, and triple indirect blocks.
| volume | pointer to the ext2_volume_t structure representing the filesystem volume. |
| inode | pointer to the ext2_inode_t structure representing the inode whose blocks are to be freed. |
| bool ext2_write_inode | ( | ext2_volume_t * | volume, |
| uint32_t | inode_number, | ||
| const ext2_inode_t * | inode ) |
write an inode back to the volume.