RTEMS  5.1
rtems-rfs-group.h
Go to the documentation of this file.
1 
13 /*
14  * COPYRIGHT (c) 2010 Chris Johns <chrisj@rtems.org>
15  *
16  * The license and distribution terms for this file may be
17  * found in the file LICENSE in this distribution or at
18  * http://www.rtems.org/license/LICENSE.
19  */
20 
21 
22 #if !defined (_RTEMS_RFS_GROUP_H_)
23 #define _RTEMS_RFS_GROUP_H_
24 
35 
39 #define RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK (0)
40 #define RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK (1)
41 #define RTEMS_RFS_GROUP_INODE_BLOCK (2)
42 
51 typedef struct _rtems_rfs_group
52 {
57 
61  size_t size;
62 
67 
72 
77 
82 
84 
88 #define rtems_rfs_group_block(_g, _b) (((_g)->base) + (_b))
89 
93 #define rtems_rfs_group_inode(_f, _g, _i) \
94  (((_f)->group_inodes * (_g)) + (_i) + RTEMS_RFS_ROOT_INO)
95 
109  size_t size,
110  size_t inodes,
111  rtems_rfs_group* group);
112 
123  rtems_rfs_group* group);
124 
139  bool inode,
140  rtems_rfs_bitmap_bit* result);
141 
151  bool inode,
153 
164  bool inode,
166  bool* state);
167 
177  size_t* blocks,
178  size_t* inodes);
179 
181 #endif
RTEMS File Systems Bitmap Routines.
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.
Definition: rtems-rfs-group.c:32
Creates bit allocator for blocks in the group simpler.
Definition: rtems-rfs-group.h:51
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.
Definition: rtems-rfs-group.c:314
int32_t rtems_rfs_bitmap_bit
Definition: rtems-rfs-bitmaps.h:84
int rtems_rfs_group_usage(rtems_rfs_file_system *fs, size_t *blocks, size_t *inodes)
Determine the number of blocks and inodes used.
Definition: rtems-rfs-group.c:360
Definition: rtems-rfs-bitmaps.h:104
struct _rtems_rfs_group rtems_rfs_group
Creates bit allocator for blocks in the group simpler.
Definition: rtems-rfs-file-system.h:123
uint32_t rtems_rfs_buffer_block
Definition: rtems-rfs-buffer.h:62
rtems_rfs_buffer_block base
Definition: rtems-rfs-group.h:56
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.
Definition: rtems-rfs-group.c:153
Manages the Trace and Debugging Features of the RTEMS RFS File System.
rtems_rfs_buffer_handle inode_bitmap_buffer
Definition: rtems-rfs-group.h:81
int rtems_rfs_group_bitmap_free(rtems_rfs_file_system *fs, bool inode, rtems_rfs_bitmap_bit no)
Free the group allocated bit.
Definition: rtems-rfs-group.c:273
size_t size
Definition: rtems-rfs-group.h:61
Maps Blocks to the Media Interface Layers.
Definition: rtems-rfs-buffer.h:91
int rtems_rfs_group_close(rtems_rfs_file_system *fs, rtems_rfs_group *group)
Close a group.
Definition: rtems-rfs-group.c:123
rtems_rfs_buffer_handle block_bitmap_buffer
Definition: rtems-rfs-group.h:71
unsigned size
Definition: tte.h:74
rtems_rfs_bitmap_control block_bitmap
Definition: rtems-rfs-group.h:66
rtems_rfs_bitmap_control inode_bitmap
Definition: rtems-rfs-group.h:76