24 DPRINT(
"\nExt2 Super Block Details ...\n\n");
25 DPRINT(
" Inode Count: %lu\n", pExt2Sb->s_inodes_count);
26 DPRINT(
" Block Count: %lu\n", pExt2Sb->s_blocks_count);
27 DPRINT(
" Reserved Block Count: %lu\n", pExt2Sb->s_r_blocks_count);
28 DPRINT(
" Free Blocks: %lu\n", pExt2Sb->s_free_blocks_count);
29 DPRINT(
" Free Inodes: %lu\n", pExt2Sb->s_free_inodes_count);
30 DPRINT(
" First Data Block: %lu\n", pExt2Sb->s_first_data_block);
31 DPRINT(
" Log Block Size: %lu\n", pExt2Sb->s_log_block_size);
32 DPRINT(
" Log Frag Size: %ld\n", pExt2Sb->s_log_frag_size);
33 DPRINT(
" Blocks per Group: %lu\n", pExt2Sb->s_blocks_per_group);
34 DPRINT(
" Fragments per Group: %lu\n", pExt2Sb->s_frags_per_group);
35 DPRINT(
" Inodes per Group: %lu\n", pExt2Sb->s_inodes_per_group);
38 DPRINT(
" Mount Count: %u\n", pExt2Sb->s_mnt_count);
39 DPRINT(
" Max Mount Count: %d\n", pExt2Sb->s_max_mnt_count);
40 DPRINT(
" Magic Number: %X (%s)\n", pExt2Sb->s_magic,
42 DPRINT(
" File System State: %X\n", pExt2Sb->s_state);
43 DPRINT(
" Error Behaviour: %X\n", pExt2Sb->s_errors);
44 DPRINT(
" Minor rev: %u\n", pExt2Sb->s_minor_rev_level);
46 DPRINT(
" Check Interval: %lu\n", pExt2Sb->s_checkinterval);
47 DPRINT(
" Creator OS: %lu\n", pExt2Sb->s_creator_os);
48 DPRINT(
" Revision Level: %lu\n", pExt2Sb->s_rev_level);
49 DPRINT(
" Reserved Block Default UID: %u\n", pExt2Sb->s_def_resuid);
50 DPRINT(
" Reserved Block Default GID: %u\n", pExt2Sb->s_def_resgid);
52 for (
i=0;
i < 16;
i++)
56 DPRINT(
" volume label name: ");
57 for (
i=0;
i < 16;
i++)
59 if (pExt2Sb->s_volume_name[
i] == 0)
61 DbgPrint(
"%c", pExt2Sb->s_volume_name[
i]);
68#define set_field(field, default) if (!pExt2Sb->field) pExt2Sb->field = (default);
76 int frags_per_block = 0;
80 ULONG group_block = 0;
94 pExt2Sb->s_first_data_block = (pExt2Sb->s_log_block_size) ? 0 : 1;
101 if (!pExt2Sb->s_rev_level)
111 pExt2Sb->s_lastcheck = pExt2Sb->s_mtime = pExt2Sb->s_wtime;
113 if (!pExt2Sb->s_blocks_per_group)
114 pExt2Sb->s_blocks_per_group = Ext2Sys->
blocksize * 8;
116 pExt2Sb->s_frags_per_group = pExt2Sb->s_blocks_per_group * frags_per_block;
119 if (pExt2Sb->s_r_blocks_count >= pExt2Sb->s_blocks_count)
128 if (pExt2Sb->s_feature_incompat &
138 Ext2Sys->
group_desc_count = (pExt2Sb->s_blocks_count - pExt2Sb->s_first_data_block
147 if (!pExt2Sb->s_inodes_count)
163 pExt2Sb->s_inodes_per_group = (pExt2Sb->s_inodes_count + Ext2Sys->
group_desc_count - 1)
167 pExt2Sb->s_inodes_per_group = Ext2Sys->
blocksize*8;
185 pExt2Sb->s_inodes_per_group &= ~7;
192 pExt2Sb->s_inodes_count = pExt2Sb->s_inodes_per_group * Ext2Sys->
group_desc_count;
193 pExt2Sb->s_free_inodes_count = pExt2Sb->s_inodes_count;
211 rem = ((pExt2Sb->s_blocks_count - pExt2Sb->s_first_data_block) %
212 pExt2Sb->s_blocks_per_group);
217 if (rem && (rem < overhead+50))
219 pExt2Sb->s_blocks_count -= rem;
253 group_block = pExt2Sb->s_first_data_block;
256 pExt2Sb->s_free_blocks_count = 0;
262 numblocks = (pExt2Sb->s_blocks_count - pExt2Sb->s_first_data_block)
263 % pExt2Sb->s_blocks_per_group;
266 numblocks = pExt2Sb->s_blocks_per_group;
270 numblocks = pExt2Sb->s_blocks_per_group;
285 pExt2Sb->s_free_blocks_count += numblocks;
290 group_block += pExt2Sb->s_blocks_per_group;
void ext2_free_inode_bitmap(PEXT2_FILESYS Ext2Sys)
bool ext2_allocate_block_bitmap(PEXT2_FILESYS Ext2Sys)
bool ext2_mark_bitmap(PEXT2_BITMAP bitmap, ULONG bitno)
bool ext2_allocate_inode_bitmap(PEXT2_FILESYS Ext2Sys)
void ext2_free_block_bitmap(PEXT2_FILESYS Ext2Sys)
void ext2_free_group_desc(PEXT2_FILESYS Ext2Sys)
bool ext2_bg_has_super(PEXT2_SUPER_BLOCK pExt2Sb, int group_block)
bool ext2_allocate_group_desc(PEXT2_FILESYS Ext2Sys)
#define EXT2_FIRST_INODE(s)
void ext2_print_super(PEXT2_SUPER_BLOCK pExt2Sb)
#define set_field(field, default)
bool ext2_initialize_sb(PEXT2_FILESYS Ext2Sys)
#define EXT2_INODE_SIZE(sb)
#define EXT2_BLOCK_SIZE(sb)
#define EXT2_GOOD_OLD_INODE_SIZE
#define EXT2_DESC_PER_BLOCK(s)
static void cleanup(void)
#define EXT2_GOOD_OLD_FIRST_INO
#define EXT2_FRAG_SIZE(s)
#define EXT2_BLOCKS_PER_GROUP(s)
#define EXT2_ERRORS_DEFAULT
#define EXT2_DFL_CHECKINTERVAL
#define EXT2_DFL_MAX_MNT_COUNT
#define EXT2_GOOD_OLD_REV
#define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
BOOLEAN NTAPI RtlTimeToSecondsSince1970(PLARGE_INTEGER Time, PULONG ElapsedSeconds)
NTSTATUS NTAPI NtQuerySystemTime(OUT PLARGE_INTEGER SystemTime)
PEXT2_SUPER_BLOCK ext2_sb
unsigned long inode_blocks_per_group
PEXT2_BLOCK_BITMAP block_map
unsigned long desc_blocks
PEXT2_GROUP_DESC group_desc
__u16 bg_free_blocks_count
__u16 bg_free_inodes_count