2000-12-13 Theodore Ts'o <tytso@valinux.com>
+ * closefs.c (ext2fs_update_fs_dynamic_rev): New function suggested
+ by Andreas Dilger to update the filesystem revision to
+ EXT2_DYNAMIC_REV.
+
* swapfs.c (ext2fs_swap_super): Add byte swapping for the journal
fields.
}
+/*
+ * Updates the revision to EXT2_DYNAMIC_REV
+ */
+void ext2fs_update_fs_dynamic_rev(ext2_filsys fs)
+{
+ struct ext2_super_block *sb = fs->super;
+
+ if (sb->s_rev_level > EXT2_GOOD_OLD_REV)
+ return;
+
+ sb->s_rev_level = EXT2_DYNAMIC_REV;
+ sb->s_first_ino = EXT2_GOOD_OLD_FIRST_INO;
+ sb->s_inode_size = EXT2_GOOD_OLD_INODE_SIZE;
+ /* s_uuid is handled by e2fsck already */
+ /* other fields should be left alone */
+}
+
errcode_t ext2fs_flush(ext2_filsys fs)
{
dgrp_t i,j,maxgroup,sgrp;
00000000 T _ext2fs_read_bb_FILE2 libext2fs read_bb_file
00000000 T _ext2fs_write_bb_FILE libext2fs write_bb_file
00000000 T _ext2fs_badblocks_equal libext2fs badblocks
+00000000 T _ext2fs_update_fs_dynamic_rev libext2fs closefs
extern errcode_t ext2fs_close(ext2_filsys fs);
extern errcode_t ext2fs_flush(ext2_filsys fs);
extern int ext2fs_bg_has_super(ext2_filsys fs, int group_block);
+extern void ext2fs_update_fs_dynamic_rev(ext2_filsys fs);
/* cmp_bitmaps.c */
extern errcode_t ext2fs_compare_block_bitmap(ext2fs_block_bitmap bm1,