Changeset beb9336 in mainline for uspace/lib/ext4/libext4_superblock.h
- Timestamp:
- 2012-08-24T14:07:52Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 041ab64
- Parents:
- bd29f9c9 (diff), db81577 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext4/libext4_superblock.h
rbd29f9c9 rbeb9336 34 34 #define LIBEXT4_LIBEXT4_SUPERBLOCK_H_ 35 35 36 #include < libblock.h>36 #include <block.h> 37 37 #include <sys/types.h> 38 39 38 #include "libext4_types.h" 40 39 … … 44 43 extern void ext4_superblock_set_blocks_count(ext4_superblock_t *, uint64_t); 45 44 extern uint64_t ext4_superblock_get_reserved_blocks_count(ext4_superblock_t *); 46 extern void ext4_superblock_set_reserved_blocks_count(ext4_superblock_t *, uint64_t); 45 extern void ext4_superblock_set_reserved_blocks_count(ext4_superblock_t *, 46 uint64_t); 47 47 extern uint64_t ext4_superblock_get_free_blocks_count(ext4_superblock_t *); 48 extern void ext4_superblock_set_free_blocks_count(ext4_superblock_t *, uint64_t); 48 extern void ext4_superblock_set_free_blocks_count(ext4_superblock_t *, 49 uint64_t); 49 50 extern uint32_t ext4_superblock_get_free_inodes_count(ext4_superblock_t *); 50 extern void ext4_superblock_set_free_inodes_count(ext4_superblock_t *, uint32_t); 51 extern void ext4_superblock_set_free_inodes_count(ext4_superblock_t *, 52 uint32_t); 51 53 extern uint32_t ext4_superblock_get_first_data_block(ext4_superblock_t *); 52 54 extern void ext4_superblock_set_first_data_block(ext4_superblock_t *, uint32_t); … … 98 100 extern void ext4_superblock_set_inode_size(ext4_superblock_t *, uint16_t); 99 101 extern uint16_t ext4_superblock_get_block_group_index(ext4_superblock_t *); 100 extern void ext4_superblock_set_block_group_index(ext4_superblock_t *, uint16_t); 101 extern uint32_t ext4_superblock_get_features_compatible(ext4_superblock_t *); 102 extern void ext4_superblock_set_features_compatible(ext4_superblock_t *, uint32_t); 103 extern uint32_t ext4_superblock_get_features_incompatible(ext4_superblock_t *); 104 extern void ext4_superblock_set_features_incompatible(ext4_superblock_t *, uint32_t); 105 extern uint32_t ext4_superblock_get_features_read_only(ext4_superblock_t *); 106 extern void ext4_superblock_set_features_read_only(ext4_superblock_t *, uint32_t); 102 extern void ext4_superblock_set_block_group_index(ext4_superblock_t *, 103 uint16_t); 104 extern uint32_t ext4_superblock_get_features_compatible(ext4_superblock_t *); 105 extern void ext4_superblock_set_features_compatible(ext4_superblock_t *, 106 uint32_t); 107 extern uint32_t ext4_superblock_get_features_incompatible(ext4_superblock_t *); 108 extern void ext4_superblock_set_features_incompatible(ext4_superblock_t *, 109 uint32_t); 110 extern uint32_t ext4_superblock_get_features_read_only(ext4_superblock_t *); 111 extern void ext4_superblock_set_features_read_only(ext4_superblock_t *, 112 uint32_t); 107 113 108 114 extern const uint8_t * ext4_superblock_get_uuid(ext4_superblock_t *); … … 113 119 extern void ext4_superblock_set_last_mounted(ext4_superblock_t *, const char *); 114 120 115 /*116 uint32_t s_algorithm_usage_bitmap; // For compression117 uint8_t s_prealloc_blocks; // Number of blocks to try to preallocate118 uint8_t s_prealloc_dir_blocks; // Number to preallocate for dirs119 uint16_t s_reserved_gdt_blocks; // Per group desc for online growth120 uint8_t s_journal_uuid[16]; // UUID of journal superblock121 uint32_t s_journal_inum; // Inode number of journal file122 uint32_t s_journal_dev; // Device number of journal file123 */124 121 extern uint32_t ext4_superblock_get_last_orphan(ext4_superblock_t *); 125 122 extern void ext4_superblock_set_last_orphan(ext4_superblock_t *, uint32_t); 126 123 extern const uint32_t * ext4_superblock_get_hash_seed(ext4_superblock_t *); 127 extern void ext4_superblock_set_hash_seed(ext4_superblock_t *, const uint32_t *); 124 extern void ext4_superblock_set_hash_seed(ext4_superblock_t *, 125 const uint32_t *); 128 126 extern uint8_t ext4_superblock_get_default_hash_version(ext4_superblock_t *); 129 extern void ext4_superblock_set_default_hash_version(ext4_superblock_t *, uint8_t); 130 /* 131 uint8_t s_jnl_backup_type; 132 */ 127 extern void ext4_superblock_set_default_hash_version(ext4_superblock_t *, 128 uint8_t); 133 129 134 130 extern uint16_t ext4_superblock_get_desc_size(ext4_superblock_t *); 135 131 extern void ext4_superblock_set_desc_size(ext4_superblock_t *, uint16_t); 136 132 137 /*138 uint32_t s_default_mount_opts; // Default mount options139 uint32_t s_first_meta_bg; // First metablock block group140 uint32_t s_mkfs_time; // When the filesystem was created141 uint32_t s_jnl_blocks[17]; // Backup of the journal inode142 uint16_t s_min_extra_isize; // All inodes have at least # bytes143 uint16_t s_want_extra_isize; // New inodes should reserve # bytes144 */145 133 extern uint32_t ext4_superblock_get_flags(ext4_superblock_t *); 146 134 extern void ext4_superblock_set_flags(ext4_superblock_t *, uint32_t); 147 /*148 uint16_t s_raid_stride; // RAID stride149 uint16_t s_mmp_interval; // # seconds to wait in MMP checking150 uint64_t s_mmp_block; // Block for multi-mount protection151 uint32_t s_raid_stripe_width; // blocks on all data disks (N*stride)152 uint8_t s_log_groups_per_flex; // FLEX_BG group size153 uint8_t s_reserved_char_pad;154 uint16_t s_reserved_pad;155 uint64_t s_kbytes_written; // Number of lifetime kilobytes written156 uint32_t s_snapshot_inum; // Inode number of active snapshot157 uint32_t s_snapshot_id; // Sequential ID of active snapshot158 uint64_t s_snapshot_r_blocks_count; // reserved blocks for active snapshot's future use159 uint32_t s_snapshot_list; // inode number of the head of the on-disk snapshot list160 uint32_t s_error_count; // number of fs errors161 uint32_t s_first_error_time; // First time an error happened162 uint32_t s_first_error_ino; // Inode involved in first error163 uint64_t s_first_error_block; // block involved of first error164 uint8_t s_first_error_func[32]; // Function where the error happened165 uint32_t s_first_error_line; // Line number where error happened166 uint32_t s_last_error_time; // Most recent time of an error167 uint32_t s_last_error_ino; // Inode involved in last error168 uint32_t s_last_error_line; // Line number where error happened169 uint64_t s_last_error_block; // block involved of last error170 uint8_t s_last_error_func[32]; // function where the error happened171 uint8_t s_mount_opts[64];172 */173 135 174 136 /* More complex superblock functions */ 175 137 extern bool ext4_superblock_has_flag(ext4_superblock_t *, uint32_t); 176 extern bool ext4_superblock_has_feature_compatible(ext4_superblock_t *, uint32_t); 177 extern bool ext4_superblock_has_feature_incompatible(ext4_superblock_t *, uint32_t); 178 extern bool ext4_superblock_has_feature_read_only(ext4_superblock_t *, uint32_t); 138 extern bool ext4_superblock_has_feature_compatible(ext4_superblock_t *, 139 uint32_t); 140 extern bool ext4_superblock_has_feature_incompatible(ext4_superblock_t *, 141 uint32_t); 142 extern bool ext4_superblock_has_feature_read_only(ext4_superblock_t *, 143 uint32_t); 179 144 extern int ext4_superblock_read_direct(service_id_t, ext4_superblock_t **); 180 145 extern int ext4_superblock_write_direct(service_id_t, ext4_superblock_t *); … … 182 147 183 148 extern uint32_t ext4_superblock_get_block_group_count(ext4_superblock_t *); 184 extern uint32_t ext4_superblock_get_blocks_in_group(ext4_superblock_t *, uint32_t); 185 extern uint32_t ext4_superblock_get_inodes_in_group(ext4_superblock_t *, uint32_t); 149 extern uint32_t ext4_superblock_get_blocks_in_group(ext4_superblock_t *, 150 uint32_t); 151 extern uint32_t ext4_superblock_get_inodes_in_group(ext4_superblock_t *, 152 uint32_t); 186 153 187 154 #endif
Note:
See TracChangeset
for help on using the changeset viewer.