21 #if !defined (_RTEMS_RFS_FILE_SYSTEM_H_) 22 #define _RTEMS_RFS_FILE_SYSTEM_H_ 29 #define RTEMS_RFS_SB_OFFSET_MAGIC (0) 30 #define RTEMS_RFS_SB_MAGIC (0x28092001) 31 #define RTEMS_RFS_SB_OFFSET_VERSION (RTEMS_RFS_SB_OFFSET_MAGIC + 4) 32 #define RTEMS_RFS_SB_OFFSET_BLOCK_SIZE (RTEMS_RFS_SB_OFFSET_VERSION + 4) 33 #define RTEMS_RFS_SB_OFFSET_BLOCKS (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE + 4) 34 #define RTEMS_RFS_SB_OFFSET_BAD_BLOCKS (RTEMS_RFS_SB_OFFSET_BLOCKS + 4) 35 #define RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS + 4) 36 #define RTEMS_RFS_SB_OFFSET_GROUPS (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH + 4) 37 #define RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS (RTEMS_RFS_SB_OFFSET_GROUPS + 4) 38 #define RTEMS_RFS_SB_OFFSET_GROUP_INODES (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS + 4) 39 #define RTEMS_RFS_SB_OFFSET_INODE_SIZE (RTEMS_RFS_SB_OFFSET_GROUP_INODES + 4) 44 #define RTEMS_RFS_VERSION (0x00000000) 50 #define RTEMS_RFS_VERSION_MASK INT32_C(0x00000000) 56 #define RTEMS_RFS_ROOT_INO (1) 61 #define RTEMS_RFS_EMPTY_INO (0) 67 #define RTEMS_RFS_INODE_BLOCKS (5) 74 #define RTEMS_RFS_INODE_OVERHEAD_PERCENTAGE (1) 80 #define RTEMS_RFS_SUPERBLOCK_SIZE (1) 85 #define RTEMS_RFS_FS_MAX_HELD_BUFFERS (5) 100 #define RTEMS_RFS_FS_BITMAPS_HOLD (1 << 0) 103 #define RTEMS_RFS_FS_NO_LOCAL_CACHE (1 << 1) 107 #define RTEMS_RFS_FS_FORCE_OPEN (1 << 2) 109 #define RTEMS_RFS_FS_READ_ONLY (1 << 3) 115 struct _rtems_rfs_file_system 140 #if RTEMS_RFS_USE_LIBBLOCK 267 #define rtems_rfs_fs_flags(_f) ((_f)->flags) 273 #define rtems_rfs_fs_release_bitmaps(_f) (!((_f)->flags & RTEMS_RFS_FS_BITMAPS_HOLD)) 280 #define rtems_rfs_fs_no_local_cache(_f) ((_f)->flags & RTEMS_RFS_FS_NO_LOCAL_CACHE) 287 #if RTEMS_RFS_USE_LIBBLOCK 288 #define rtems_rfs_fs_device(_fs) ((_fs)->disk) 290 #define rtems_rfs_fs_device(_fs) ((_fs)->device) 298 #define rtems_rfs_fs_blocks(_fs) ((_fs)->blocks) 305 #define rtems_rfs_fs_block_size(_fs) ((_fs)->block_size) 312 #define rtems_rfs_fs_inodes(_fs) ((_fs)->inodes) 323 #define rtems_rfs_fs_block(_fs, _grp, _blk) \ 324 ((((_fs)->group_blocks) * (_grp)) + (_blk) + 1) 331 #if RTEMS_RFS_USE_LIBBLOCK 332 #define rtems_rfs_fs_media_blocks(_fs) ((_fs)->disk->size) 334 #define rtems_rfs_fs_media_blocks(_fs) ((_fs)->media_size) 343 #if RTEMS_RFS_USE_LIBBLOCK 344 #define rtems_rfs_fs_media_block_size(_fs) ((_fs)->disk->media_block_size) 346 #define rtems_rfs_fs_media_block_size(_fs) (1) 352 #define rtems_rfs_fs_max_name(_fs) ((_fs)->max_name_length) 359 #define rtems_rfs_fs_max_block_map_blocks(_fs) ((_fs)->block_map_doubly_blocks) 364 #define rtems_rfs_fs_user(_fs) ((_fs)->user) int rtems_rfs_fs_close(rtems_rfs_file_system *fs)
Definition: rtems-rfs-file-system.c:310
uint32_t release_modified_count
Definition: rtems-rfs-file-system.h:256
Creates bit allocator for blocks in the group simpler.
Definition: rtems-rfs-group.h:51
uint32_t release_count
Definition: rtems-rfs-file-system.h:245
uint32_t bad_blocks
Definition: rtems-rfs-file-system.h:171
uint32_t max_held_buffers
Definition: rtems-rfs-file-system.h:224
size_t group_blocks
Definition: rtems-rfs-file-system.h:191
int device
Definition: rtems-rfs-file-system.h:146
rtems_rfs_group * groups
Definition: rtems-rfs-file-system.h:181
void * user
Definition: rtems-rfs-file-system.h:267
uint32_t inodes
Definition: rtems-rfs-file-system.h:165
uint64_t rtems_rfs_fs_media_size(rtems_rfs_file_system *fs)
Definition: rtems-rfs-file-system.c:40
rtems_chain_control buffers
Definition: rtems-rfs-file-system.h:229
size_t block_size
Definition: rtems-rfs-file-system.h:141
Definition: rtems-rfs-file-system.h:123
uint64_t rtems_rfs_pos
Definition: rtems-rfs-file-system.h:90
Description of a disk device (logical and physical disks).
Definition: diskdevs.h:157
uint32_t buffers_count
Definition: rtems-rfs-file-system.h:234
RTEMS File Systems Group Management.
rtems_chain_control release
Definition: rtems-rfs-file-system.h:240
size_t block_map_singly_blocks
Definition: rtems-rfs-file-system.h:212
int group_count
Definition: rtems-rfs-file-system.h:186
size_t inodes_per_block
Definition: rtems-rfs-file-system.h:201
size_t group_inodes
Definition: rtems-rfs-file-system.h:196
size_t blocks
Definition: rtems-rfs-file-system.h:135
size_t block_map_doubly_blocks
Definition: rtems-rfs-file-system.h:219
uint32_t max_name_length
Definition: rtems-rfs-file-system.h:176
size_t blocks_per_block
Definition: rtems-rfs-file-system.h:206
rtems_chain_control release_modified
Definition: rtems-rfs-file-system.h:251
rtems_chain_control file_shares
Definition: rtems-rfs-file-system.h:262
uint32_t flags
Definition: rtems-rfs-file-system.h:128
uint64_t rtems_rfs_fs_size(rtems_rfs_file_system *fs)
Definition: rtems-rfs-file-system.c:32
unsigned size
Definition: tte.h:74
int64_t rtems_rfs_pos_rel
Definition: rtems-rfs-file-system.h:95
int rtems_rfs_fs_open(const char *name, void *user, uint32_t flags, uint32_t max_held_buffers, rtems_rfs_file_system **fs)
Definition: rtems-rfs-file-system.c:196