RTEMS 6.1-rc2
|
RTEMS File Systems Group Routines. More...
#include <inttypes.h>
#include <string.h>
#include <rtems/rfs/rtems-rfs-file-system.h>
#include <rtems/rfs/rtems-rfs-group.h>
Functions | |
int | rtems_rfs_group_open (rtems_rfs_file_system *fs, rtems_rfs_buffer_block base, size_t size, size_t inodes, rtems_rfs_group *group) |
Open a group. | |
int | rtems_rfs_group_close (rtems_rfs_file_system *fs, rtems_rfs_group *group) |
Close a group. | |
int | rtems_rfs_group_bitmap_alloc (rtems_rfs_file_system *fs, rtems_rfs_bitmap_bit goal, bool inode, rtems_rfs_bitmap_bit *result) |
Allocate an inode or block. | |
int | rtems_rfs_group_bitmap_free (rtems_rfs_file_system *fs, bool inode, rtems_rfs_bitmap_bit no) |
Free the group allocated bit. | |
int | rtems_rfs_group_bitmap_test (rtems_rfs_file_system *fs, bool inode, rtems_rfs_bitmap_bit no, bool *state) |
Test the group allocated bit. | |
int | rtems_rfs_group_usage (rtems_rfs_file_system *fs, size_t *blocks, size_t *inodes) |
Determine the number of blocks and inodes used. | |
RTEMS File Systems Group Routines.
These functions open and close a group as well as manage bit allocations within a group.
int rtems_rfs_group_bitmap_alloc | ( | rtems_rfs_file_system * | fs, |
rtems_rfs_bitmap_bit | goal, | ||
bool | inode, | ||
rtems_rfs_bitmap_bit * | result | ||
) |
Allocate an inode or block.
The groups are searched to find the next available inode or block.
fs | The file system data. |
goal | The goal to seed the bitmap search. |
inode | If true allocate an inode else allocate a block. |
result | The allocated bit in the bitmap. |
int | The error number (errno). No error if 0. |
int rtems_rfs_group_bitmap_free | ( | rtems_rfs_file_system * | fs, |
bool | inode, | ||
rtems_rfs_bitmap_bit | no | ||
) |
Free the group allocated bit.
fs | The file system data. |
inode | If true the number to free is an inode else it is a block. |
block | The inode or block number to free. |
int | The error number (errno). No error if 0. |
int rtems_rfs_group_bitmap_test | ( | rtems_rfs_file_system * | fs, |
bool | inode, | ||
rtems_rfs_bitmap_bit | no, | ||
bool * | state | ||
) |
Test the group allocated bit.
fs | The file system data. |
inode | If true the number to free is an inode else it is a block. |
block | The inode or block number to free. |
state | Return the state of the bit. |
int | The error number (errno). No error if 0. |
int rtems_rfs_group_close | ( | rtems_rfs_file_system * | fs, |
rtems_rfs_group * | group | ||
) |
Close a group.
Release all resources the group holds.
fs | The file system. |
group | The group to close. |
int | The error number (errno). No error if 0. |
int rtems_rfs_group_open | ( | rtems_rfs_file_system * | fs, |
rtems_rfs_buffer_block | base, | ||
size_t | size, | ||
size_t | inodes, | ||
rtems_rfs_group * | group | ||
) |
Open a group.
Allocate all the resources including the bitmaps.
fs | The file system. |
base | The base block number. |
size | The number of blocks in the group. |
group | Reference to the group to open. |
int | The error number (errno). No error if 0. |
int rtems_rfs_group_usage | ( | rtems_rfs_file_system * | fs, |
size_t * | blocks, | ||
size_t * | inodes | ||
) |
Determine the number of blocks and inodes used.
fs | The file system data. |
blocks | The number of blocks used. |
inodes | The number of inodes used. |
int | The error number (errno). No error if 0. |