RTEMS 6.1-rc1
Files | Functions
RTEMS File System Group Management

Files

file  rtems-rfs-bitmaps.h
 RTEMS File Systems Bitmap Routines.
 
file  rtems-rfs-block-pos.h
 RTEMS File Systems Block Position and Size Management.
 
file  rtems-rfs-block.h
 RTEMS File Systems Block Management.
 
file  rtems-rfs-buffer.h
 Maps Blocks to the Media Interface Layers.
 
file  rtems-rfs-data.h
 RTEMS File System Data.
 
file  rtems-rfs-dir-hash.h
 Provides a 32bit Hash of a String used to Search a Directory.
 
file  rtems-rfs-dir.h
 RTEMS File System Directory Support.
 
file  rtems-rfs-file-system-fwd.h
 RTEMS File Systems Data Forward Declaration.
 
file  rtems-rfs-file-system.h
 RTEMS File System Data.
 
file  rtems-rfs-file.h
 RTEMS File System File Support.
 
file  rtems-rfs-group.h
 RTEMS File Systems Group Management.
 
file  rtems-rfs-inode.h
 RTEMS File System Information Node.
 
 
file  rtems-rfs-mutex.h
 RTEMS File System Mutex.
 
file  rtems-rfs-trace.h
 Manages the Trace and Debugging Features of the RTEMS RFS File System.
 
file  rtems-rfs-format.h
 RTEMS File System Format.
 
file  rtems-rfs-shell.h
 RTEMS File Systems Shell Commands.
 
file  rtems-rfs.h
 RFS File system Initialization.
 
file  rtems-rfs-bitmaps.c
 RTEMS File Systems Bitmap Routines.
 
file  rtems-rfs-block.c
 RTEMS File Systems Block Routines.
 
file  rtems-rfs-buffer-bdbuf.c
 RTEMS File Systems Buffer Routines.
 
file  rtems-rfs-buffer-devio.c
 RTEMS File Systems Buffer Routines.
 
file  rtems-rfs-buffer.c
 RTEMS File Systems Buffer Routines.
 
file  rtems-rfs-dir-hash.c
 RTEMS File Systems Directory Hash function.
 
file  rtems-rfs-dir.c
 RTEMS File Systems Directory Routines.
 
file  rtems-rfs-file-system.c
 RTEMS File Systems Open.
 
file  rtems-rfs-file.c
 RTEMS File Systems File Routines.
 
file  rtems-rfs-format.c
 RTEMS File Systems Format.
 
file  rtems-rfs-group.c
 RTEMS File Systems Group Routines.
 
file  rtems-rfs-inode.c
 RTEMS File Systems Inode Routines.
 
 
file  rtems-rfs-mutex.c
 RTEMS File System Mutex.
 
file  rtems-rfs-rtems-dev.c
 RTEMS RFS Device Interface.
 
file  rtems-rfs-rtems-dir.c
 RTEMS RFS Directory Access Routines.
 
file  rtems-rfs-rtems-file.c
 RTEMS RFS File Handlers.
 
file  rtems-rfs-rtems-utils.c
 Set of Utility Functions to Support RTEMS RFS on RTEMS.
 
file  rtems-rfs-rtems.c
 RTEMS File System Interface for RTEMS.
 
file  rtems-rfs-rtems.h
 
file  rtems-rfs-shell.c
 RTEMS File Systems Shell Commands Support.
 
file  rtems-rfs-trace.c
 RTEMS File Systems Trace Support.
 

Functions

int rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t *mt_entry, const void *data)
 
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. More...
 
int rtems_rfs_group_close (rtems_rfs_file_system *fs, rtems_rfs_group *group)
 Close a group. More...
 
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. More...
 
int rtems_rfs_group_bitmap_free (rtems_rfs_file_system *fs, bool inode, rtems_rfs_bitmap_bit no)
 Free the group allocated bit. More...
 
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. More...
 
int rtems_rfs_group_usage (rtems_rfs_file_system *fs, size_t *blocks, size_t *inodes)
 Determine the number of blocks and inodes used. More...
 
#define RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK   (0)
 
#define RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK   (1)
 
#define RTEMS_RFS_GROUP_INODE_BLOCK   (2)
 
#define rtems_rfs_group_block(_g, _b)   (((_g)->base) + (_b))
 
#define rtems_rfs_group_inode(_f, _g, _i)    (((_f)->group_inodes * (_g)) + (_i) + RTEMS_RFS_ROOT_INO)
 
typedef struct _rtems_rfs_group rtems_rfs_group
 Creates bit allocator for blocks in the group simpler. More...
 

Detailed Description

Macro Definition Documentation

◆ rtems_rfs_group_block

#define rtems_rfs_group_block (   _g,
  _b 
)    (((_g)->base) + (_b))

Return the disk's block for a block in a group.

◆ RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK

#define RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK   (0)

RTEMS File System Group Management Block allocations for a group on disk.

◆ rtems_rfs_group_inode

#define rtems_rfs_group_inode (   _f,
  _g,
  _i 
)     (((_f)->group_inodes * (_g)) + (_i) + RTEMS_RFS_ROOT_INO)

Return the file system inode for a inode in a group.

Typedef Documentation

◆ rtems_rfs_group

Creates bit allocator for blocks in the group simpler.

A group is a selection of blocks on the disk. Typically the number of blocks in a group is determined by the number of bits a block holds. This makes the bit allocator for blocks in the group simpler plus is allows a simple way to localise access to files and directories.

Function Documentation

◆ rtems_rfs_group_bitmap_alloc()

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.

Parameters
fsThe file system data.
goalThe goal to seed the bitmap search.
inodeIf true allocate an inode else allocate a block.
resultThe allocated bit in the bitmap.
Return values
intThe error number (errno). No error if 0.

◆ rtems_rfs_group_bitmap_free()

int rtems_rfs_group_bitmap_free ( rtems_rfs_file_system fs,
bool  inode,
rtems_rfs_bitmap_bit  no 
)

Free the group allocated bit.

Parameters
fsThe file system data.
inodeIf true the number to free is an inode else it is a block.
blockThe inode or block number to free.
Return values
intThe error number (errno). No error if 0.

◆ rtems_rfs_group_bitmap_test()

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.

Parameters
fsThe file system data.
inodeIf true the number to free is an inode else it is a block.
blockThe inode or block number to free.
stateReturn the state of the bit.
Return values
intThe error number (errno). No error if 0.

◆ rtems_rfs_group_close()

int rtems_rfs_group_close ( rtems_rfs_file_system fs,
rtems_rfs_group group 
)

Close a group.

Release all resources the group holds.

Parameters
fsThe file system.
groupThe group to close.
Return values
intThe error number (errno). No error if 0.

◆ rtems_rfs_group_open()

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.

Parameters
fsThe file system.
baseThe base block number.
sizeThe number of blocks in the group.
groupReference to the group to open.
Return values
intThe error number (errno). No error if 0.

◆ rtems_rfs_group_usage()

int rtems_rfs_group_usage ( rtems_rfs_file_system fs,
size_t *  blocks,
size_t *  inodes 
)

Determine the number of blocks and inodes used.

Parameters
fsThe file system data.
blocksThe number of blocks used.
inodesThe number of inodes used.
Return values
intThe error number (errno). No error if 0.

◆ rtems_rfs_rtems_initialise()

int rtems_rfs_rtems_initialise ( rtems_filesystem_mount_table_entry_t mt_entry,
const void *  data 
)

Initialise the RFS File system.

Open the file system.

Forward decl for the ops table.

Open the file system.