Lines Matching +full:- +full:fs
2 * ext2fs.h --- ext2fs
6 * %Begin-Header%
9 * %End-Header%
32 * Non-GNU C compilers won't necessarily understand inline
116 ext2_filsys fs; member
151 /* Ye Olde 32-bit version */
238 /* XXX FIXME-64: not 64-bit safe, but not used? */
239 errcode_t (*get_blocks)(ext2_filsys fs, ext2_ino_t ino, blk_t *blocks);
240 errcode_t (*check_directory)(ext2_filsys fs, ext2_ino_t ino);
241 errcode_t (*write_bitmaps)(ext2_filsys fs);
242 errcode_t (*read_inode)(ext2_filsys fs, ext2_ino_t ino,
244 errcode_t (*write_inode)(ext2_filsys fs, ext2_ino_t ino,
275 errcode_t (*get_alloc_block)(ext2_filsys fs, blk64_t goal,
277 errcode_t (*get_alloc_block2)(ext2_filsys fs, blk64_t goal,
279 void (*block_alloc_stats)(ext2_filsys fs, blk64_t blk, int inuse);
296 /* Precomputed FS UUID checksum for seeding other checksums */
303 errcode_t (*new_range)(ext2_filsys fs, int flags, blk64_t goal,
305 void (*block_alloc_stats_range)(ext2_filsys fs, blk64_t blk, blk_t num,
319 * 64-bit bitmap backend types
368 #define BLOCK_COUNT_IND (-1)
369 #define BLOCK_COUNT_DIND (-2)
370 #define BLOCK_COUNT_TIND (-3)
371 #define BLOCK_COUNT_TRANSLATOR (-4)
393 * Generic (non-filesystem layout specific) extents structure
515 * non-Linux system.
555 #define EXT2_I_SIZE(i) ((i)->i_size | ((__u64) (i)->i_size_high << 32))
589 if ((struct)->magic != (code)) return (code)
645 #define EXT2FS_CLUSTER_RATIO(fs) (1 << (fs)->cluster_ratio_bits) argument
646 #define EXT2FS_CLUSTER_MASK(fs) (EXT2FS_CLUSTER_RATIO(fs) - 1) argument
647 #define EXT2FS_B2C(fs, blk) ((blk) >> (fs)->cluster_ratio_bits) argument
649 #define EXT2FS_C2B(fs, cluster) ((cluster) << (fs)->cluster_ratio_bits) argument
651 #define EXT2FS_NUM_B2C(fs, blks) (((blks) + EXT2FS_CLUSTER_MASK(fs)) >> \ argument
652 (fs)->cluster_ratio_bits)
676 static inline int ext2fs_has_group_desc_csum(ext2_filsys fs) in ext2fs_has_group_desc_csum() argument
678 return ext2fs_has_feature_metadata_csum(fs->super) || in ext2fs_has_group_desc_csum()
679 ext2fs_has_feature_gdt_csum(fs->super); in ext2fs_has_group_desc_csum()
689 extern void ext2fs_clear_block_uninit(ext2_filsys fs, dgrp_t group);
690 extern errcode_t ext2fs_new_inode(ext2_filsys fs, ext2_ino_t dir, int mode,
692 extern errcode_t ext2fs_new_block(ext2_filsys fs, blk_t goal,
694 extern errcode_t ext2fs_new_block2(ext2_filsys fs, blk64_t goal,
696 extern errcode_t ext2fs_new_block3(ext2_filsys fs, blk64_t goal,
699 extern errcode_t ext2fs_get_free_blocks(ext2_filsys fs, blk_t start,
703 extern errcode_t ext2fs_get_free_blocks2(ext2_filsys fs, blk64_t start,
707 extern errcode_t ext2fs_alloc_block(ext2_filsys fs, blk_t goal,
709 extern errcode_t ext2fs_alloc_block2(ext2_filsys fs, blk64_t goal,
711 extern errcode_t ext2fs_alloc_block3(ext2_filsys fs, blk64_t goal,
715 extern void ext2fs_set_alloc_block_callback(ext2_filsys fs,
716 errcode_t (*func)(ext2_filsys fs,
719 errcode_t (**old)(ext2_filsys fs,
722 blk64_t ext2fs_find_inode_goal(ext2_filsys fs, ext2_ino_t ino,
724 extern void ext2fs_set_new_range_callback(ext2_filsys fs,
725 errcode_t (*func)(ext2_filsys fs, int flags, blk64_t goal,
727 errcode_t (**old)(ext2_filsys fs, int flags, blk64_t goal,
729 extern void ext2fs_set_block_alloc_stats_range_callback(ext2_filsys fs,
730 void (*func)(ext2_filsys fs, blk64_t blk,
732 void (**old)(ext2_filsys fs, blk64_t blk,
737 errcode_t ext2fs_new_range(ext2_filsys fs, int flags, blk64_t goal,
743 errcode_t ext2fs_alloc_range(ext2_filsys fs, int flags, blk64_t goal,
747 extern int ext2fs_reserve_super_and_bgd(ext2_filsys fs,
750 extern void ext2fs_set_block_alloc_stats_callback(ext2_filsys fs,
751 void (*func)(ext2_filsys fs,
754 void (**old)(ext2_filsys fs,
759 void ext2fs_inode_alloc_stats(ext2_filsys fs, ext2_ino_t ino, int inuse);
760 void ext2fs_inode_alloc_stats2(ext2_filsys fs, ext2_ino_t ino,
762 void ext2fs_block_alloc_stats(ext2_filsys fs, blk_t blk, int inuse);
763 void ext2fs_block_alloc_stats2(ext2_filsys fs, blk64_t blk, int inuse);
764 void ext2fs_block_alloc_stats_range(ext2_filsys fs, blk64_t blk,
768 extern errcode_t ext2fs_allocate_tables(ext2_filsys fs);
769 extern errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group,
815 extern errcode_t ext2fs_update_bb_inode(ext2_filsys fs,
823 extern errcode_t ext2fs_write_inode_bitmap(ext2_filsys fs);
824 extern errcode_t ext2fs_write_block_bitmap (ext2_filsys fs);
825 extern errcode_t ext2fs_read_inode_bitmap (ext2_filsys fs);
826 extern errcode_t ext2fs_read_block_bitmap(ext2_filsys fs);
827 extern errcode_t ext2fs_allocate_block_bitmap(ext2_filsys fs,
830 extern errcode_t ext2fs_allocate_subcluster_bitmap(ext2_filsys fs,
834 extern errcode_t ext2fs_allocate_inode_bitmap(ext2_filsys fs,
845 extern errcode_t ext2fs_read_bitmaps(ext2_filsys fs);
846 extern errcode_t ext2fs_write_bitmaps(ext2_filsys fs);
887 extern __u32 ext2fs_inode_bitmap_checksum(ext2_filsys fs, dgrp_t group);
888 extern __u32 ext2fs_block_bitmap_checksum(ext2_filsys fs, dgrp_t group);
889 extern dgrp_t ext2fs_group_of_blk2(ext2_filsys fs, blk64_t);
890 extern blk64_t ext2fs_group_first_block2(ext2_filsys fs, dgrp_t group);
891 extern blk64_t ext2fs_group_last_block2(ext2_filsys fs, dgrp_t group);
892 extern int ext2fs_group_blocks_count(ext2_filsys fs, dgrp_t group);
893 extern blk64_t ext2fs_inode_data_blocks2(ext2_filsys fs,
895 extern blk64_t ext2fs_inode_i_blocks(ext2_filsys fs,
913 extern struct ext2_group_desc *ext2fs_group_desc(ext2_filsys fs,
916 extern blk64_t ext2fs_block_bitmap_csum(ext2_filsys fs, dgrp_t group);
917 extern blk64_t ext2fs_block_bitmap_loc(ext2_filsys fs, dgrp_t group);
918 extern void ext2fs_block_bitmap_loc_set(ext2_filsys fs, dgrp_t group,
920 extern __u32 ext2fs_inode_bitmap_csum(ext2_filsys fs, dgrp_t group);
921 extern blk64_t ext2fs_inode_bitmap_loc(ext2_filsys fs, dgrp_t group);
922 extern void ext2fs_inode_bitmap_loc_set(ext2_filsys fs, dgrp_t group,
924 extern blk64_t ext2fs_inode_table_loc(ext2_filsys fs, dgrp_t group);
925 extern void ext2fs_inode_table_loc_set(ext2_filsys fs, dgrp_t group,
927 extern __u32 ext2fs_bg_free_blocks_count(ext2_filsys fs, dgrp_t group);
928 extern void ext2fs_bg_free_blocks_count_set(ext2_filsys fs, dgrp_t group,
930 extern __u32 ext2fs_bg_free_inodes_count(ext2_filsys fs, dgrp_t group);
931 extern void ext2fs_bg_free_inodes_count_set(ext2_filsys fs, dgrp_t group,
933 extern __u32 ext2fs_bg_used_dirs_count(ext2_filsys fs, dgrp_t group);
934 extern void ext2fs_bg_used_dirs_count_set(ext2_filsys fs, dgrp_t group,
936 extern __u32 ext2fs_bg_itable_unused(ext2_filsys fs, dgrp_t group);
937 extern void ext2fs_bg_itable_unused_set(ext2_filsys fs, dgrp_t group,
939 extern __u16 ext2fs_bg_flags(ext2_filsys fs, dgrp_t group);
940 extern void ext2fs_bg_flags_zap(ext2_filsys fs, dgrp_t group);
941 extern int ext2fs_bg_flags_test(ext2_filsys fs, dgrp_t group, __u16 bg_flag);
942 extern void ext2fs_bg_flags_set(ext2_filsys fs, dgrp_t group, __u16 bg_flags);
943 extern void ext2fs_bg_flags_clear(ext2_filsys fs, dgrp_t group, __u16 bg_flags);
944 extern __u16 ext2fs_bg_checksum(ext2_filsys fs, dgrp_t group);
945 extern void ext2fs_bg_checksum_set(ext2_filsys fs, dgrp_t group, __u16 checksum);
946 extern blk64_t ext2fs_file_acl_block(ext2_filsys fs,
948 extern void ext2fs_file_acl_block_set(ext2_filsys fs,
950 extern errcode_t ext2fs_inode_size_set(ext2_filsys fs, struct ext2_inode *inode,
954 extern errcode_t ext2fs_block_iterate(ext2_filsys fs,
958 int (*func)(ext2_filsys fs,
963 errcode_t ext2fs_block_iterate2(ext2_filsys fs,
967 int (*func)(ext2_filsys fs,
974 errcode_t ext2fs_block_iterate3(ext2_filsys fs,
978 int (*func)(ext2_filsys fs,
987 extern errcode_t ext2fs_bmap(ext2_filsys fs, ext2_ino_t ino,
991 extern errcode_t ext2fs_bmap2(ext2_filsys fs, ext2_ino_t ino,
995 errcode_t ext2fs_map_cluster_block(ext2_filsys fs, ext2_ino_t ino,
1001 extern errcode_t ext2fs_move_blocks(ext2_filsys fs,
1008 extern errcode_t ext2fs_check_desc(ext2_filsys fs);
1011 extern errcode_t ext2fs_close(ext2_filsys fs);
1012 extern errcode_t ext2fs_close2(ext2_filsys fs, int flags);
1013 extern errcode_t ext2fs_close_free(ext2_filsys *fs);
1014 extern errcode_t ext2fs_flush(ext2_filsys fs);
1015 extern errcode_t ext2fs_flush2(ext2_filsys fs, int flags);
1016 extern int ext2fs_bg_has_super(ext2_filsys fs, dgrp_t group_block);
1017 extern errcode_t ext2fs_super_and_bgd_loc2(ext2_filsys fs,
1023 extern int ext2fs_super_and_bgd_loc(ext2_filsys fs,
1029 extern void ext2fs_update_dynamic_rev(ext2_filsys fs);
1036 extern void ext2fs_init_csum_seed(ext2_filsys fs);
1037 extern errcode_t ext2fs_mmp_csum_set(ext2_filsys fs, struct mmp_struct *mmp);
1039 extern int ext2fs_verify_csum_type(ext2_filsys fs, struct ext2_super_block *sb);
1040 extern errcode_t ext2fs_superblock_csum_set(ext2_filsys fs,
1042 extern int ext2fs_superblock_csum_verify(ext2_filsys fs,
1044 extern errcode_t ext2fs_ext_attr_block_csum_set(ext2_filsys fs,
1047 extern int ext2fs_ext_attr_block_csum_verify(ext2_filsys fs, ext2_ino_t inum,
1052 (blocksize) - sizeof(struct ext2_dir_entry_tail)))
1054 extern void ext2fs_initialize_dirent_tail(ext2_filsys fs,
1056 extern int ext2fs_dirent_has_tail(ext2_filsys fs,
1058 extern int ext2fs_dirent_csum_verify(ext2_filsys fs, ext2_ino_t inum,
1060 extern int ext2fs_dir_block_csum_verify(ext2_filsys fs, ext2_ino_t inum,
1062 extern errcode_t ext2fs_dir_block_csum_set(ext2_filsys fs, ext2_ino_t inum,
1064 extern errcode_t ext2fs_get_dx_countlimit(ext2_filsys fs,
1068 extern errcode_t ext2fs_extent_block_csum_set(ext2_filsys fs,
1071 extern int ext2fs_extent_block_csum_verify(ext2_filsys fs,
1074 extern errcode_t ext2fs_block_bitmap_csum_set(ext2_filsys fs, dgrp_t group,
1076 extern int ext2fs_block_bitmap_csum_verify(ext2_filsys fs, dgrp_t group,
1078 extern errcode_t ext2fs_inode_bitmap_csum_set(ext2_filsys fs, dgrp_t group,
1080 extern int ext2fs_inode_bitmap_csum_verify(ext2_filsys fs, dgrp_t group,
1082 extern errcode_t ext2fs_inode_csum_set(ext2_filsys fs, ext2_ino_t inum,
1084 extern int ext2fs_inode_csum_verify(ext2_filsys fs, ext2_ino_t inum,
1086 extern void ext2fs_group_desc_csum_set(ext2_filsys fs, dgrp_t group);
1087 extern int ext2fs_group_desc_csum_verify(ext2_filsys fs, dgrp_t group);
1088 extern errcode_t ext2fs_set_gdt_csum(ext2_filsys fs);
1089 extern __u16 ext2fs_group_desc_csum(ext2_filsys fs, dgrp_t group);
1092 extern errcode_t ext2fs_init_dblist(ext2_filsys fs, ext2_dblist *ret_dblist);
1104 int (*func)(ext2_filsys fs, struct ext2_db_entry *db_info,
1108 int (*func)(ext2_filsys fs, struct ext2_db_entry2 *db_info,
1112 int (*func)(ext2_filsys fs, struct ext2_db_entry2 *db_info,
1153 extern errcode_t ext2fs_read_dir_block(ext2_filsys fs, blk_t block,
1155 extern errcode_t ext2fs_read_dir_block2(ext2_filsys fs, blk_t block,
1157 extern errcode_t ext2fs_read_dir_block3(ext2_filsys fs, blk64_t block,
1159 extern errcode_t ext2fs_read_dir_block4(ext2_filsys fs, blk64_t block,
1161 extern errcode_t ext2fs_write_dir_block(ext2_filsys fs, blk_t block,
1163 extern errcode_t ext2fs_write_dir_block2(ext2_filsys fs, blk_t block,
1165 extern errcode_t ext2fs_write_dir_block3(ext2_filsys fs, blk64_t block,
1167 extern errcode_t ext2fs_write_dir_block4(ext2_filsys fs, blk64_t block,
1178 extern errcode_t ext2fs_get_rec_len(ext2_filsys fs,
1181 extern errcode_t ext2fs_set_rec_len(ext2_filsys fs,
1184 extern errcode_t ext2fs_dir_iterate(ext2_filsys fs,
1194 extern errcode_t ext2fs_dir_iterate2(ext2_filsys fs,
1211 extern errcode_t ext2fs_expand_dir(ext2_filsys fs, ext2_ino_t dir);
1216 extern errcode_t ext2fs_ext_attr_hash_entry2(ext2_filsys fs,
1219 extern errcode_t ext2fs_read_ext_attr(ext2_filsys fs, blk_t block, void *buf);
1220 extern errcode_t ext2fs_read_ext_attr2(ext2_filsys fs, blk64_t block,
1222 extern errcode_t ext2fs_read_ext_attr3(ext2_filsys fs, blk64_t block,
1224 extern errcode_t ext2fs_write_ext_attr(ext2_filsys fs, blk_t block,
1226 extern errcode_t ext2fs_write_ext_attr2(ext2_filsys fs, blk64_t block,
1228 extern errcode_t ext2fs_write_ext_attr3(ext2_filsys fs, blk64_t block,
1230 extern errcode_t ext2fs_adjust_ea_refcount(ext2_filsys fs, blk_t blk,
1233 extern errcode_t ext2fs_adjust_ea_refcount2(ext2_filsys fs, blk64_t blk,
1236 extern errcode_t ext2fs_adjust_ea_refcount3(ext2_filsys fs, blk64_t blk,
1254 errcode_t ext2fs_xattrs_open(ext2_filsys fs, ext2_ino_t ino,
1257 errcode_t ext2fs_free_ext_attr(ext2_filsys fs, ext2_ino_t ino,
1260 errcode_t ext2fs_xattr_inode_max_size(ext2_filsys fs, ext2_ino_t ino,
1274 extern errcode_t ext2fs_extent_open(ext2_filsys fs, ext2_ino_t ino,
1276 extern errcode_t ext2fs_extent_open2(ext2_filsys fs, ext2_ino_t ino,
1306 errcode_t ext2fs_fallocate(ext2_filsys fs, int flags, ext2_ino_t ino,
1311 extern errcode_t ext2fs_file_open2(ext2_filsys fs, ext2_ino_t ino,
1314 extern errcode_t ext2fs_file_open(ext2_filsys fs, ext2_ino_t ino,
1341 extern void ext2fs_free(ext2_filsys fs);
1348 extern errcode_t ext2fs_make_generic_bitmap(errcode_t magic, ext2_filsys fs,
1391 errcode_t ext2fs_alloc_generic_bmap(ext2_filsys fs, errcode_t magic,
1415 errcode_t ext2fs_convert_subcluster_bitmap(ext2_filsys fs,
1419 extern errcode_t ext2fs_get_num_dirs(ext2_filsys fs, ext2_ino_t *ret_num_dirs);
1433 errcode_t ext2fs_iblk_add_blocks(ext2_filsys fs, struct ext2_inode *inode,
1435 errcode_t ext2fs_iblk_sub_blocks(ext2_filsys fs, struct ext2_inode *inode,
1437 errcode_t ext2fs_iblk_set(ext2_filsys fs, struct ext2_inode *inode, blk64_t b);
1440 extern errcode_t ext2fs_image_inode_write(ext2_filsys fs, int fd, int flags);
1441 extern errcode_t ext2fs_image_inode_read(ext2_filsys fs, int fd, int flags);
1442 extern errcode_t ext2fs_image_super_write(ext2_filsys fs, int fd, int flags);
1443 extern errcode_t ext2fs_image_super_read(ext2_filsys fs, int fd, int flags);
1444 extern errcode_t ext2fs_image_bitmap_write(ext2_filsys fs, int fd, int flags);
1445 extern errcode_t ext2fs_image_bitmap_read(ext2_filsys fs, int fd, int flags);
1448 errcode_t ext2fs_read_ind_block(ext2_filsys fs, blk_t blk, void *buf);
1449 errcode_t ext2fs_write_ind_block(ext2_filsys fs, blk_t blk, void *buf);
1458 extern errcode_t ext2fs_create_icount_tdb(ext2_filsys fs, char *tdb_dir,
1460 extern errcode_t ext2fs_create_icount2(ext2_filsys fs, int flags,
1463 extern errcode_t ext2fs_create_icount(ext2_filsys fs, int flags,
1483 extern errcode_t ext2fs_inline_data_init(ext2_filsys fs, ext2_ino_t ino);
1484 extern errcode_t ext2fs_inline_data_size(ext2_filsys fs, ext2_ino_t ino,
1486 extern errcode_t ext2fs_inline_data_get(ext2_filsys fs, ext2_ino_t ino,
1489 extern errcode_t ext2fs_inline_data_set(ext2_filsys fs, ext2_ino_t ino,
1494 extern errcode_t ext2fs_create_inode_cache(ext2_filsys fs,
1497 extern errcode_t ext2fs_flush_icache(ext2_filsys fs);
1503 extern errcode_t ext2fs_open_inode_scan(ext2_filsys fs, int buffer_blocks,
1512 errcode_t (*done_group)(ext2_filsys fs,
1519 extern errcode_t ext2fs_read_inode_full(ext2_filsys fs, ext2_ino_t ino,
1522 extern errcode_t ext2fs_read_inode (ext2_filsys fs, ext2_ino_t ino,
1524 extern errcode_t ext2fs_write_inode_full(ext2_filsys fs, ext2_ino_t ino,
1527 extern errcode_t ext2fs_write_inode(ext2_filsys fs, ext2_ino_t ino,
1529 extern errcode_t ext2fs_write_new_inode(ext2_filsys fs, ext2_ino_t ino,
1531 extern errcode_t ext2fs_get_blocks(ext2_filsys fs, ext2_ino_t ino, blk_t *blocks);
1532 extern errcode_t ext2fs_check_directory(ext2_filsys fs, ext2_ino_t ino);
1536 extern errcode_t ext2fs_inode_io_intern(ext2_filsys fs, ext2_ino_t ino,
1538 extern errcode_t ext2fs_inode_io_intern2(ext2_filsys fs, ext2_ino_t ino,
1552 extern errcode_t ext2fs_punch(ext2_filsys fs, ext2_ino_t ino,
1558 extern errcode_t ext2fs_lookup(ext2_filsys fs, ext2_ino_t dir, const char *name,
1560 extern errcode_t ext2fs_namei(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
1562 errcode_t ext2fs_namei_follow(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
1564 extern errcode_t ext2fs_follow_link(ext2_filsys fs, ext2_ino_t root, ext2_ino_t cwd,
1571 extern errcode_t ext2fs_new_dir_block(ext2_filsys fs, ext2_ino_t dir_ino,
1573 extern errcode_t ext2fs_new_dir_inline_data(ext2_filsys fs, ext2_ino_t dir_ino,
1577 extern errcode_t ext2fs_mkdir(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t inum,
1581 extern errcode_t ext2fs_zero_blocks(ext2_filsys fs, blk_t blk, int num,
1583 extern errcode_t ext2fs_zero_blocks2(ext2_filsys fs, blk64_t blk, int num,
1585 extern errcode_t ext2fs_create_journal_superblock(ext2_filsys fs,
1588 extern errcode_t ext2fs_add_journal_device(ext2_filsys fs,
1590 extern errcode_t ext2fs_add_journal_inode(ext2_filsys fs, blk_t num_blocks,
1592 extern errcode_t ext2fs_add_journal_inode2(ext2_filsys fs, blk_t num_blocks,
1610 extern blk64_t ext2fs_descriptor_block_loc2(ext2_filsys fs,
1612 extern blk_t ext2fs_descriptor_block_loc(ext2_filsys fs, blk_t group_block,
1614 errcode_t ext2fs_get_data_io(ext2_filsys fs, io_channel *old_io);
1615 errcode_t ext2fs_set_data_io(ext2_filsys fs, io_channel new_io);
1616 errcode_t ext2fs_rewrite_to_io(ext2_filsys fs, io_channel new_io);
1619 extern errcode_t ext2fs_get_pathname(ext2_filsys fs, ext2_ino_t dir, ext2_ino_t ino,
1623 errcode_t ext2fs_link(ext2_filsys fs, ext2_ino_t dir, const char *name,
1625 errcode_t ext2fs_unlink(ext2_filsys fs, ext2_ino_t dir, const char *name,
1629 errcode_t ext2fs_symlink(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t ino,
1634 errcode_t ext2fs_mmp_read(ext2_filsys fs, blk64_t mmp_blk, void *buf);
1635 errcode_t ext2fs_mmp_write(ext2_filsys fs, blk64_t mmp_blk, void *buf);
1636 errcode_t ext2fs_mmp_clear(ext2_filsys fs);
1637 errcode_t ext2fs_mmp_init(ext2_filsys fs);
1638 errcode_t ext2fs_mmp_start(ext2_filsys fs);
1639 errcode_t ext2fs_mmp_update(ext2_filsys fs);
1640 errcode_t ext2fs_mmp_update2(ext2_filsys fs, int immediately);
1641 errcode_t ext2fs_mmp_stop(ext2_filsys fs);
1645 extern errcode_t ext2fs_read_bb_inode(ext2_filsys fs,
1649 extern errcode_t ext2fs_read_bb_FILE2(ext2_filsys fs, FILE *f,
1652 void (*invalid)(ext2_filsys fs,
1656 extern errcode_t ext2fs_read_bb_FILE(ext2_filsys fs, FILE *f,
1658 void (*invalid)(ext2_filsys fs,
1662 extern errcode_t ext2fs_create_resize_inode(ext2_filsys fs);
1677 extern errcode_t ext2fs_dirent_swab_in2(ext2_filsys fs, char *buf, size_t size,
1679 extern errcode_t ext2fs_dirent_swab_in(ext2_filsys fs, char *buf, int flags);
1680 extern errcode_t ext2fs_dirent_swab_out2(ext2_filsys fs, char *buf, size_t size,
1682 extern errcode_t ext2fs_dirent_swab_out(ext2_filsys fs, char *buf, int flags);
1692 extern void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
1695 extern void ext2fs_swap_inode(ext2_filsys fs,struct ext2_inode *t,
1706 extern int ext2fs_inode_has_valid_blocks2(ext2_filsys fs,
1731 extern void ext2fs_mark_super_dirty(ext2_filsys fs);
1732 extern void ext2fs_mark_changed(ext2_filsys fs);
1733 extern int ext2fs_test_changed(ext2_filsys fs);
1734 extern void ext2fs_mark_valid(ext2_filsys fs);
1735 extern void ext2fs_unmark_valid(ext2_filsys fs);
1736 extern int ext2fs_test_valid(ext2_filsys fs);
1737 extern void ext2fs_mark_ib_dirty(ext2_filsys fs);
1738 extern void ext2fs_mark_bb_dirty(ext2_filsys fs);
1739 extern int ext2fs_test_ib_dirty(ext2_filsys fs);
1740 extern int ext2fs_test_bb_dirty(ext2_filsys fs);
1741 extern dgrp_t ext2fs_group_of_blk(ext2_filsys fs, blk_t blk);
1742 extern dgrp_t ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino);
1743 extern blk_t ext2fs_group_first_block(ext2_filsys fs, dgrp_t group);
1744 extern blk_t ext2fs_group_last_block(ext2_filsys fs, dgrp_t group);
1745 extern blk_t ext2fs_inode_data_blocks(ext2_filsys fs,
1747 extern int ext2fs_htree_intnode_maxrecs(ext2_filsys fs, int blocks);
1865 _INLINE_ void ext2fs_mark_super_dirty(ext2_filsys fs) in ext2fs_mark_super_dirty() argument
1867 fs->flags |= EXT2_FLAG_DIRTY | EXT2_FLAG_CHANGED; in ext2fs_mark_super_dirty()
1873 _INLINE_ void ext2fs_mark_changed(ext2_filsys fs) in ext2fs_mark_changed() argument
1875 fs->flags |= EXT2_FLAG_CHANGED; in ext2fs_mark_changed()
1881 _INLINE_ int ext2fs_test_changed(ext2_filsys fs) in ext2fs_test_changed() argument
1883 return (fs->flags & EXT2_FLAG_CHANGED); in ext2fs_test_changed()
1889 _INLINE_ void ext2fs_mark_valid(ext2_filsys fs) in ext2fs_mark_valid() argument
1891 fs->flags |= EXT2_FLAG_VALID; in ext2fs_mark_valid()
1897 _INLINE_ void ext2fs_unmark_valid(ext2_filsys fs) in ext2fs_unmark_valid() argument
1899 fs->flags &= ~EXT2_FLAG_VALID; in ext2fs_unmark_valid()
1905 _INLINE_ int ext2fs_test_valid(ext2_filsys fs) in ext2fs_test_valid() argument
1907 return (fs->flags & EXT2_FLAG_VALID); in ext2fs_test_valid()
1913 _INLINE_ void ext2fs_mark_ib_dirty(ext2_filsys fs) in ext2fs_mark_ib_dirty() argument
1915 fs->flags |= EXT2_FLAG_IB_DIRTY | EXT2_FLAG_CHANGED; in ext2fs_mark_ib_dirty()
1921 _INLINE_ void ext2fs_mark_bb_dirty(ext2_filsys fs) in ext2fs_mark_bb_dirty() argument
1923 fs->flags |= EXT2_FLAG_BB_DIRTY | EXT2_FLAG_CHANGED; in ext2fs_mark_bb_dirty()
1929 _INLINE_ int ext2fs_test_ib_dirty(ext2_filsys fs) in ext2fs_test_ib_dirty() argument
1931 return (fs->flags & EXT2_FLAG_IB_DIRTY); in ext2fs_test_ib_dirty()
1937 _INLINE_ int ext2fs_test_bb_dirty(ext2_filsys fs) in ext2fs_test_bb_dirty() argument
1939 return (fs->flags & EXT2_FLAG_BB_DIRTY); in ext2fs_test_bb_dirty()
1945 _INLINE_ dgrp_t ext2fs_group_of_blk(ext2_filsys fs, blk_t blk) in ext2fs_group_of_blk() argument
1947 return ext2fs_group_of_blk2(fs, blk); in ext2fs_group_of_blk()
1952 _INLINE_ dgrp_t ext2fs_group_of_ino(ext2_filsys fs, ext2_ino_t ino) in ext2fs_group_of_ino() argument
1954 return (ino - 1) / fs->super->s_inodes_per_group; in ext2fs_group_of_ino()
1960 _INLINE_ blk_t ext2fs_group_first_block(ext2_filsys fs, dgrp_t group) in ext2fs_group_first_block() argument
1962 return (blk_t) ext2fs_group_first_block2(fs, group); in ext2fs_group_first_block()
1968 _INLINE_ blk_t ext2fs_group_last_block(ext2_filsys fs, dgrp_t group) in ext2fs_group_last_block() argument
1970 return (blk_t) ext2fs_group_last_block2(fs, group); in ext2fs_group_last_block()
1973 _INLINE_ blk_t ext2fs_inode_data_blocks(ext2_filsys fs, in ext2fs_inode_data_blocks() argument
1976 return (blk_t) ext2fs_inode_data_blocks2(fs, inode); in ext2fs_inode_data_blocks()
1979 _INLINE_ int ext2fs_htree_intnode_maxrecs(ext2_filsys fs, int blocks) in ext2fs_htree_intnode_maxrecs() argument
1981 return blocks * ((fs->blocksize - 8) / sizeof(struct ext2_dx_entry)); in ext2fs_htree_intnode_maxrecs()
1991 return ((a - 1) / b) + 1; in ext2fs_div_ceil()
1998 return ((a - 1) / b) + 1; in ext2fs_div64_ceil()
2003 return entry->name_len & 0xff; in ext2fs_dirent_name_len()
2008 entry->name_len = (entry->name_len & 0xff00) | (len & 0xff); in ext2fs_dirent_set_name_len()
2013 return entry->name_len >> 8; in ext2fs_dirent_file_type()
2018 entry->name_len = (entry->name_len & 0xff) | (type << 8); in ext2fs_dirent_set_file_type()
2041 static inline unsigned int ext2_dir_htree_level(ext2_filsys fs) in ext2_dir_htree_level() argument
2043 if (ext2fs_has_feature_largedir(fs->super)) in ext2_dir_htree_level()