RTEMS  5.0.0
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 InitializationRTEMS File System.
 
file  rtems-rfs-bitmaps.c
 RTEMS File Systems Bitmap RoutinesThese functions manage bit maps. A bit map consists of the map of bit allocated in a block and a search map where a bit represents 32 actual bits. The search map allows for a faster search for an available bit as 32 search bits can checked in a test.
 
file  rtems-rfs-block.c
 RTEMS File Systems Block RoutinesThese functions manage blocks in the RFS file system. A block is an area of the media and its size is set for a each specific media. The block size is set when the file system is set up and needs to be matched for it to be read correctly.
 
file  rtems-rfs-buffer-bdbuf.c
 RTEMS File Systems Buffer RoutinesRTEMS File Systems Buffer Routines for the RTEMS libblock BD buffer cache.
 
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 RoutinesThese functions manage blocks in the directory format. A directory entry is a variable length record in the block. The entry consists of a length, hash and the string. The length allows the next entry to be located and the hash allows a simple check to be performed without a string compare. Directory entries do not span a block and removal of an entry results in the space in the block being compacted and the spare area being initialised to ones.
 
file  rtems-rfs-file-system.c
 RTEMS File Systems OpenOpen the file system by reading the superblock and then the group data.
 
file  rtems-rfs-file.c
 RTEMS File Systems File RoutinesThese functions manage files.
 
file  rtems-rfs-format.c
 RTEMS File Systems FormatFormat the file system ready for use.
 
file  rtems-rfs-group.c
 RTEMS File Systems Group RoutinesThese functions open and close a group as well as manage bit allocations within a group.
 
file  rtems-rfs-inode.c
 RTEMS File Systems Inode RoutinesThese functions manage inodes in the RFS file system. An inode is part of a block that reside after the bitmaps in the group.
 
 
file  rtems-rfs-mutex.c
 RTEMS File System Mutex.
 
file  rtems-rfs-rtems-dev.c
 RTEMS RFS Device InterfaceThis file contains the set of handlers used to map operations on RFS device nodes onto calls to the RTEMS Classic API IO Manager.
 
file  rtems-rfs-rtems-dir.c
 RTEMS RFS Directory Access Routines.
 
file  rtems-rfs-rtems-file.c
 RTEMS RFS File HandlersThis file contains the set of handlers used to process operations on RFS file nodes.
 
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.