137 for (
i = 0;
i <
Vcb->sbi.s_gdb_count;
i++) {
138 if (
Vcb->sbi.s_gd[
i].bh) {
183 if (!sbi->
s_gd[
i].bh) {
184 DEBUG(
DL_ERR, (
"Ext2LoadGroupBH: can't read group descriptor %d\n",
i));
220 DEBUG(
DL_ERR, (
"Ext2LoadGroup: not enough memory.\n"));
230 if (!sbi->
s_gd[
i].block) {
231 DEBUG(
DL_ERR, (
"Ext2LoadGroup: can't locate group descriptor %d\n",
i));
237 DEBUG(
DL_ERR, (
"Ext2LoadGroup: Failed to load group descriptions !\n"));
243 DEBUG(
DL_ERR, (
"Ext2LoadGroup: group descriptors corrupted !\n"));
303 if (
e.QuadPart <=
s.QuadPart)
307 while (
s.QuadPart <
e.QuadPart) {
308 if (
e.QuadPart >
s.QuadPart + 1024 * 1024 * 1024) {
309 len = 1024 * 1024 * 1024;
353 ASSERT(o.QuadPart >=
s.QuadPart);
355 if (o.QuadPart ==
s.QuadPart) {
356 s.QuadPart =
s.QuadPart + bh->
b_size;
360 if (o.QuadPart >
s.QuadPart) {
367 o =
Vcb->PartitionInformation.PartitionLength;
450 dst->i_mode =
src->i_mode;
451 dst->i_flags =
src->i_flags;
454 dst->i_nlink =
src->i_links_count;
455 dst->i_generation =
src->i_generation;
456 dst->i_size =
src->i_size;
460 dst->i_file_acl =
src->i_file_acl_lo;
462 dst->i_atime =
src->i_atime;
463 dst->i_ctime =
src->i_ctime;
464 dst->i_mtime =
src->i_mtime;
465 dst->i_dtime =
src->i_dtime;
470 dst->i_extra_isize =
src->i_extra_isize;
472 dst->i_extra_isize = 0;
477 dst->i_mode =
src->i_mode;
478 dst->i_flags =
src->i_flags;
481 dst->i_links_count =
src->i_nlink;
482 dst->i_generation =
src->i_generation;
488 dst->osd2.linux2.l_i_file_acl_high |= (
__u16)(
src->i_file_acl >> 32);
489 dst->i_atime =
src->i_atime;
490 dst->i_ctime =
src->i_ctime;
491 dst->i_mtime =
src->i_mtime;
492 dst->i_dtime =
src->i_dtime;
493 dst->i_extra_isize =
src->i_extra_isize;
499 dst->i_extra_isize =
src->i_extra_isize;
511 DEBUG(
DL_ERR, (
"Ext2LoadInode: failed inode %u.\n", Inode->i_ino));
536 DEBUG(
DL_ERR, (
"Ext2SaveInode: failed inode %u.\n", Inode));
555 ULONG InodeSize =
sizeof(ext3i);
558 DEBUG(
DL_INF, (
"Ext2SaveInode: Saving Inode %xh: Mode=%xh Size=%xh\n",
559 Inode->i_ino, Inode->i_mode, Inode->i_size));
562 DEBUG(
DL_ERR, (
"Ext2SaveInode: failed inode %u.\n", Inode->i_ino));
568 DEBUG(
DL_ERR, (
"Ext2SaveInode: failed reading inode %u.\n", Inode->i_ino));
573 if (InodeSize >
Vcb->InodeSize)
574 InodeSize =
Vcb->InodeSize;
594 DEBUG(
DL_ERR, (
"Ext2LoadRawInode: error get inode(%xh)'s addr.\n", Inode->i_ino));
631 DEBUG(
DL_INF, (
"Ext2SaveInodeXattr: Saving Inode %xh: Mode=%xh Size=%xh\n",
632 Inode->i_ino, Inode->i_mode, Inode->i_size));
635 DEBUG(
DL_ERR, (
"Ext2SaveInodeXattr: error get inode(%xh)'s addr.\n", Inode->i_ino));
672 if (!buffer_uptodate(bh)) {
712 if (!buffer_uptodate(bh)) {
758 if (!buffer_uptodate(bh)) {
761 DEBUG(
DL_ERR, (
"Ext2SaveBuffer: bh_submit_read failed: %d\n",
err));
825 if (!buffer_uptodate(bh)) {
828 DEBUG(
DL_ERR, (
"Ext2SaveBuffer: bh_submit_read failed: %d\n",
err));
861#define SIZE_256K 0x40000
892 DEBUG(
DL_ERR, (
"Ext2SaveBuffer: failed to PinLock offset %I64xh ...\n",
Offset));
964 if (GroupHint >=
Vcb->sbi.s_groups_count) {
966 GroupHint =
Vcb->sbi.s_groups_count - 1;
969 if (BlockHint != 0) {
1002 set_buffer_uptodate(bh);
1014 if (!buffer_uptodate(bh)) {
1025 if (
Group ==
Vcb->sbi.s_groups_count - 1) {
1044 if (
Index == 0xFFFFFFFF) {
1048 if (dwHint != 0 &&
Count == 0) {
1124 DEBUG(
DL_INF, (
"Ext2NewBlock: Block %xh - %x allocated.\n",
1125 *Block, *Block + *
Number));
1170 DEBUG(
DL_INF, (
"Ext2FreeBlock: Block %xh - %x to be freed.\n",
1183 Group >=
Vcb->sbi.s_groups_count) {
1206 Offset.QuadPart = bitmap_blk;
1209 if (
Group ==
Vcb->sbi.s_groups_count - 1) {
1230 DEBUG(
DL_ERR, (
"Ext2FreeBlock: failed to PinLock bitmap block %xh.\n",
1267 if (Group < Vcb->sbi.s_groups_count) {
1272 DEBUG(
DL_ERR, (
"Ext2FreeBlock: block number beyonds max group.\n"));
1315 *Inode = dwInode = 0XFFFFFFFF;
1319 if (GroupHint >=
Vcb->sbi.s_groups_count)
1320 GroupHint = GroupHint %
Vcb->sbi.s_groups_count;
1335 Average =
Vcb->SuperBlock->s_free_inodes_count /
Vcb->sbi.s_groups_count;
1337 for (
j = 0;
j <
Vcb->sbi.s_groups_count;
j++) {
1339 i = (
j + GroupHint) % (
Vcb->sbi.s_groups_count);
1363 for (
j = 0;
j <
Vcb->sbi.s_groups_count;
j++) {
1427 Group = GroupHint + 1;
1440 for (
j = 1;
j <
Vcb->sbi.s_groups_count;
j <<= 1) {
1443 i = (
i +
j) %
Vcb->sbi.s_groups_count;
1466 for (
j = 2;
j <
Vcb->sbi.s_groups_count;
j++) {
1468 i = (
i + 1) %
Vcb->sbi.s_groups_count;
1492 if (
Group >
Vcb->sbi.s_groups_count) {
1518 set_buffer_uptodate(bh);
1530 if (!buffer_uptodate(bh)) {
1539 if (
Vcb->sbi.s_groups_count == 1) {
1542 if (
Group + 1 ==
Vcb->sbi.s_groups_count) {
1556 if (dwInode == 0xFFFFFFFF || dwInode >=
Length) {
1604 if (dwInode + 1 >
free) {
1616 if (block_bitmap_bh) {
1619 set_buffer_uptodate(block_bitmap_bh);
1720 DEBUG(
DL_INF, (
"Ext2FreeInode: Inode: %xh (Group/Off = %xh/%xh)\n",
1721 Inode,
Group, dwIno));
1723 if (
Group >=
Vcb->sbi.s_groups_count) {
1742 if (!buffer_uptodate(bh)) {
1751 if (
Group ==
Vcb->sbi.s_groups_count - 1) {
1828 MainResourceAcquired =
TRUE;
1864 if (MainResourceAcquired) {
1901 MainResourceAcquired =
TRUE;
1936 if (MainResourceAcquired)
1967 MainResourceAcquired =
TRUE;
1983 "Deleting nonexistent file (%lu), %d",
2013 if (MainResourceAcquired)
2046 if (OldParent == NewParent) {
2050 MainResourceAcquired =
2064 DEBUG(
DL_ERR, (
"Ex2SetParentEntry: failed to allocate pSelf.\n"));
2086 DEBUG(
DL_ERR, (
"Ext2SetParentEntry: failed to read directory.\n"));
2094 if (pSelf->name_len == 1 && pSelf->name[0] ==
'.' &&
2098 if (
pParent->inode != OldParent) {
2120 DEBUG(
DL_ERR, (
"Ext2SetParentEntry: Dcb reference goes to ZERO.\n"));
2123 if (MainResourceAcquired) {
2144 error_msg =
"rec_len is smaller than minimal";
2145 else if (rlen % 4 != 0)
2148 error_msg =
"rec_len is too small for name_len";
2149 else if ((
char *) de + rlen > bh->
b_data +
dir->i_sb->s_blocksize)
2150 error_msg =
"directory entry across blocks";
2156 DEBUG(
DL_ERR, (
"%s: bad entry in directory %u: %s - "
2157 "offset=%u, inode=%u, rec_len=%d, name_len=%d\n",
2176#define MAX_LFS_FILESIZE 0x7fffffffffffffff
2193 if (!has_huge_files ||
sizeof(
blkcnt_t) <
sizeof(
u64)) {
2233 if (!has_huge_files) {
2276 if (!has_huge_files) {
2351 if (i_blocks < 0x100000000) {
2357 raw_inode->i_blocks_high = 0;
2367 if (i_blocks <= 0xffffffffffff) {
2499 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,
2500 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440,
2501 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40,
2502 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841,
2503 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40,
2504 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41,
2505 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641,
2506 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040,
2507 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240,
2508 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441,
2509 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41,
2510 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840,
2511 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41,
2512 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40,
2513 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640,
2514 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041,
2515 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240,
2516 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441,
2517 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41,
2518 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840,
2519 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41,
2520 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40,
2521 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640,
2522 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041,
2523 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241,
2524 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440,
2525 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40,
2526 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841,
2527 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40,
2528 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41,
2529 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641,
2530 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040
2553 if (!(sbi->
s_es->s_feature_ro_compat &
2559 crc =
crc16(~0, sbi->
s_es->s_uuid,
sizeof(sbi->
s_es->s_uuid));
2560 crc =
crc16(crc, (
__u8 *)&le_group,
sizeof(le_group));
2564 if ((sbi->
s_es->s_feature_incompat &
2624 unsigned long metagroup =
group / EXT4_DESC_PER_BLOCK(
sb);
2650 unsigned long first_meta_bg =
2652 unsigned long metagroup =
group / EXT4_DESC_PER_BLOCK(
sb);
2655 metagroup < first_meta_bg)
2673 return logical_sb_block +
nr + 1;
2677 return (has_super + ext3_group_first_block_no(
sb, bg));
2680#define ext4_set_bit(n, p) set_bit((int)(n), (unsigned long *)(p))
2701 if (start_bit >= end_bit)
2704 DEBUG(
DL_INF, (
"mark end bits +%d through +%d used\n", start_bit, end_bit));
2705 for (
i = start_bit; (
unsigned)
i < ((start_bit + 7) & ~7UL);
i++)
2737 return EXT4_INODES_PER_GROUP(
sb);
2763 if (actual_group == block_group)
2807 unsigned free_blocks, group_blocks;
2816 "Checksum bad for group %u", block_group);
2851 group_blocks = EXT4_BLOCKS_PER_GROUP(
sb);
2854 free_blocks = group_blocks - bit_max;
2860 for (bit = 0; bit < bit_max; bit++)
2863 start = ext3_group_first_block_no(
sb, block_group);
2916 "block_group >= groups_count - "
2917 "block_group = %u, groups_count = %u",
2925 group = block_group >> EXT4_DESC_PER_BLOCK_BITS(
sb);
2926 offset = block_group & (EXT4_DESC_PER_BLOCK(
sb) - 1);
2969 for (
i = 0;
i < ngroups;
i++) {
2982 unsigned long desc_count;
3003 unsigned long count = 0;
3026 int flexbg_flag = 0;
3045 last_block = first_block +
3049 if (block_bitmap < first_block || block_bitmap > last_block) {
3051 "Block bitmap for group %u not in group "
3052 "(block %llu)!\n",
i, block_bitmap);
3057 if (inode_bitmap < first_block || inode_bitmap > last_block) {
3059 "Inode bitmap for group %u not in group "
3060 "(block %llu)!\n",
i, inode_bitmap);
3065 if (inode_table < first_block ||
3068 "Inode table for group %u not in group "
3069 "(block %llu)!\n",
i, inode_table);
3076 "Checksum for group %u failed (%u!=%u)\n",
3087 first_block += EXT4_BLOCKS_PER_GROUP(
sb);
static void atomic_inc(atomic_t volatile *v)
#define EXT2_GOOD_OLD_INODE_SIZE
struct ext2_sblock * PEXT2_SUPER_BLOCK
BOOLEAN Ext2ReadInode(PEXT2_VOLUME_INFO Volume, ULONG Inode, PEXT2_INODE InodeBuffer)
VOID NTAPI CcFlushCache(IN PSECTION_OBJECT_POINTERS SectionObjectPointer, IN OPTIONAL PLARGE_INTEGER FileOffset, IN ULONG Length, OUT OPTIONAL PIO_STATUS_BLOCK IoStatus)
VOID NTAPI CcSetDirtyPinnedData(IN PVOID BcbVoid, IN OPTIONAL PLARGE_INTEGER Lsn)
#define NT_SUCCESS(StatCode)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
#define EXT2_DIR_REC_LEN(name_len)
struct rb_node * rb_first(struct rb_root *)
struct rb_node * rb_next(struct rb_node *)
unsigned __int64 sector_t
unsigned __int64 blkcnt_t
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB * Dcb
#define IsListEmpty(ListHead)
#define ExAcquireResourceExclusiveLite(res, wait)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
VOID Ext2FreePool(IN PVOID P, IN ULONG Tag)
#define ClearFlag(_F, _SF)
struct ext3_dir_entry_2 * PEXT2_DIR_ENTRY2
NTSTATUS Ext2WinntError(int rc)
__u32 ext3_current_time(struct inode *in)
static ext3_fsblk_t ext3_blocks_count(struct ext3_super_block *es)
PVOID Ext2AllocatePool(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
int ext3_mark_inode_dirty(struct ext2_icb *icb, struct inode *in)
struct buffer_head * ext3_find_entry(struct ext2_icb *icb, struct dentry *dentry, struct ext3_dir_entry_2 **res_dir)
#define IsVcbReadOnly(Vcb)
LARGE_INTEGER Ext2NtTime(IN ULONG i_time)
#define EXT2_FIRST_DATA_BLOCK
BOOLEAN Ext2RemoveBlockExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Start, IN ULONG Number)
struct dentry * Ext2BuildEntry(PEXT2_VCB Vcb, PEXT2_MCB Dcb, PUNICODE_STRING FileName)
void ext3_warning(struct super_block *sb, const char *function, char *fmt,...)
int ext3_add_entry(struct ext2_icb *icb, struct dentry *dentry, struct inode *inode)
void ext3_dec_count(struct inode *inode)
#define EXT2_DENTRY_MAGIC
static void ext3_free_blocks_count_set(struct ext3_super_block *es, ext3_fsblk_t blk)
NTSTATUS Ext2ReadDisk(IN PEXT2_VCB Vcb, IN ULONGLONG Offset, IN ULONG Size, IN PVOID Buffer, IN BOOLEAN bVerify)
int ext3_delete_entry(struct ext2_icb *icb, struct inode *dir, struct ext3_dir_entry_2 *de_del, struct buffer_head *bh)
void ext3_set_de_type(struct super_block *sb, struct ext3_dir_entry_2 *de, umode_t mode)
struct _EXT2_VCB * PEXT2_VCB
void ext3_update_dx_flag(struct inode *inode)
VOID Ext2StartFloppyFlushDpc(PEXT2_VCB Vcb, PEXT2_FCB Fcb, PFILE_OBJECT FileObject)
VOID Ext2FreeEntry(IN struct dentry *de)
void ext3_inc_count(struct inode *inode)
#define SUPER_BLOCK_OFFSET
#define VCB_BEING_DROPPED
NTSTATUS Ext2WriteInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONGLONG Offset, IN PVOID Buffer, IN ULONG Size, IN BOOLEAN bDirectIo, OUT PULONG dwReturn)
BOOLEAN Ext2AddVcbExtent(IN PEXT2_VCB Vcb, IN LONGLONG Vbn, IN LONGLONG Length)
#define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER
#define EXT3_BLOCKS_PER_GROUP(s)
#define EXT3_INODES_PER_GROUP(s)
#define EXT4_BG_BLOCK_UNINIT
#define EXT4_FEATURE_INCOMPAT_64BIT
#define EXT3_FEATURE_INCOMPAT_FILETYPE
#define EXT4_FEATURE_RO_COMPAT_HUGE_FILE
#define EXT3_DIR_REC_LEN(len)
#define EXT4_DESC_SIZE(s)
#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM
#define EXT4_MIN_BLOCK_SIZE
#define EXT3_HAS_INCOMPAT_FEATURE(sb, mask)
#define EXT4_BG_INODE_UNINIT
#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE
#define EXT3_SET_RO_COMPAT_FEATURE(sb, mask)
#define EXT3_MIN_BLOCK_SIZE
#define EXT4_FEATURE_INCOMPAT_FLEX_BG
#define EXT3_HAS_RO_COMPAT_FEATURE(sb, mask)
static unsigned ext3_rec_len_from_disk(__le16 dlen)
#define EXT4_FEATURE_INCOMPAT_META_BG
#define EXT4_HUGE_FILE_FL
#define EXT4_MIN_DESC_SIZE_64BIT
unsigned long long ext4_fsblk_t
unsigned int ext3_group_t
unsigned long long ext3_fsblk_t
unsigned int ext4_group_t
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
BOOLEAN Ext2SaveBlock(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Index, IN PVOID Buf)
NTSTATUS Ext2FlushVcb(IN PEXT2_VCB Vcb)
BOOLEAN Ext2SaveInodeXattr(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN struct inode *Inode, IN PEXT2_INODE InodeXattr)
void ext4_used_dirs_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
ext4_fsblk_t ext4_block_bitmap(struct super_block *sb, struct ext4_group_desc *bg)
void ext4_block_bitmap_set(struct super_block *sb, struct ext4_group_desc *bg, ext4_fsblk_t blk)
static unsigned long ext4_bg_num_gdb_nometa(struct super_block *sb, ext4_group_t group)
VOID Ext2DropGroupBH(IN PEXT2_VCB Vcb)
ext4_fsblk_t ext4_count_free_blocks(struct super_block *sb)
void Ext2DecodeInode(struct inode *dst, struct ext3_inode *src)
static int test_root(ext3_group_t a, ext3_group_t b)
ext4_fsblk_t ext4_inode_bitmap(struct super_block *sb, struct ext4_group_desc *bg)
BOOLEAN Ext2LoadBlock(IN PEXT2_VCB Vcb, IN ULONG Index, IN PVOID Buffer)
int ext3_check_dir_entry(const char *function, struct inode *dir, struct ext3_dir_entry_2 *de, struct buffer_head *bh, unsigned long offset)
struct ext4_group_desc * ext4_get_group_desc(struct super_block *sb, ext4_group_t block_group, struct buffer_head **bh)
void ext4_inode_table_set(struct super_block *sb, struct ext4_group_desc *bg, ext4_fsblk_t blk)
BOOLEAN Ext2SaveBuffer(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN LONGLONG Offset, IN ULONG Size, IN PVOID Buf)
NTSTATUS Ext2NewBlock(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG GroupHint, IN ULONG BlockHint, OUT PULONG Block, IN OUT PULONG Number)
NTSTATUS Ext2AddEntry(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN struct inode *Inode, IN PUNICODE_STRING FileName, struct dentry **Dentry)
BOOLEAN Ext2ClearInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Inode)
NTSTATUS Ext2FreeBlock(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Block, IN ULONG Number)
__u32 ext4_used_dirs_count(struct super_block *sb, struct ext4_group_desc *bg)
BOOLEAN Ext2LoadInodeXattr(IN PEXT2_VCB Vcb, IN struct inode *Inode, IN PEXT2_INODE InodeXattr)
NTSTATUS Ext2FreeInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Inode, IN ULONG Type)
BOOLEAN Ext2SaveInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN struct inode *Inode)
static int ext4_group_used_meta_blocks(struct super_block *sb, ext4_group_t block_group)
BOOLEAN Ext2LoadGroup(IN PEXT2_VCB Vcb)
ext4_fsblk_t ext4_inode_table(struct super_block *sb, struct ext4_group_desc *bg)
int ext3_inode_blocks_set(struct ext3_inode *raw_inode, struct inode *inode)
BOOLEAN Ext2ZeroBuffer(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN LONGLONG offset, IN ULONG size)
__u32 ext4_free_inodes_count(struct super_block *sb, struct ext4_group_desc *bg)
static int ext3_group_sparse(ext3_group_t group)
static unsigned long ext4_bg_num_gdb_meta(struct super_block *sb, ext4_group_t group)
void ext4_get_group_no_and_offset(struct super_block *sb, ext4_fsblk_t blocknr, ext4_group_t *blockgrpp, ext4_grpblk_t *offsetp)
loff_t ext3_max_size(int blkbits, int has_huge_files)
unsigned long ext4_bg_num_gdb(struct super_block *sb, ext4_group_t group)
void ext4_free_blks_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
static loff_t ext4_max_size(int blkbits, int has_huge_files)
static __u16 crc16_byte(__u16 crc, const __u8 data)
BOOLEAN Ext2LoadGroupBH(IN PEXT2_VCB Vcb)
int ext3_bg_has_super(struct super_block *sb, ext3_group_t group)
NTSTATUS Ext2SetParentEntry(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN ULONG OldParent, IN ULONG NewParent)
unsigned long ext4_count_dirs(struct super_block *sb)
__u32 ext4_itable_unused_count(struct super_block *sb, struct ext4_group_desc *bg)
unsigned long ext4_count_free_inodes(struct super_block *sb)
__u16 const crc16_table[256]
blkcnt_t ext3_inode_blocks(struct ext3_inode *raw_inode, struct inode *inode)
BOOLEAN Ext2SaveSuper(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
__u16 crc16(__u16 crc, __u8 const *buffer, size_t len)
NTSTATUS Ext2UpdateGroupDirStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG group)
int ext4_check_descriptors(struct super_block *sb)
__le16 ext4_group_desc_csum(struct ext3_sb_info *sbi, __u32 block_group, struct ext4_group_desc *gdp)
NTSTATUS Ext2SetFileType(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN PEXT2_MCB Mcb, IN umode_t mode)
__u32 ext4_free_blks_count(struct super_block *sb, struct ext4_group_desc *bg)
unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, ext4_group_t block_group, struct ext4_group_desc *gdp)
VOID Ext2FlushRange(IN PEXT2_VCB Vcb, LARGE_INTEGER s, LARGE_INTEGER e)
void Ext2EncodeInode(struct ext3_inode *dst, struct inode *src)
BOOLEAN Ext2LoadInode(IN PEXT2_VCB Vcb, IN struct inode *Inode)
void ext4_itable_unused_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
NTSTATUS Ext2LoadSuper(IN PEXT2_VCB Vcb, IN BOOLEAN bVerify, OUT PEXT2_SUPER_BLOCK *Sb)
int ext4_group_desc_csum_verify(struct ext3_sb_info *sbi, __u32 block_group, struct ext4_group_desc *gdp)
VOID Ext2UpdateVcbStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
void ext4_inode_bitmap_set(struct super_block *sb, struct ext4_group_desc *bg, ext4_fsblk_t blk)
BOOLEAN Ext2SaveGroup(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Group)
unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh, ext4_group_t block_group, struct ext4_group_desc *gdp)
BOOLEAN Ext2RefreshGroup(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
BOOLEAN Ext2LoadBuffer(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN LONGLONG offset, IN ULONG size, IN PVOID buf)
struct ext3_dir_entry_2 * ext3_next_entry(struct ext3_dir_entry_2 *p)
NTSTATUS Ext2NewInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG GroupHint, IN ULONG Type, OUT PULONG Inode)
BOOLEAN Ext2RefreshSuper(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
NTSTATUS Ext2RemoveEntry(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN PEXT2_MCB Mcb)
VOID Ext2DropBH(IN PEXT2_VCB Vcb)
loff_t ext3_max_bitmap_size(int bits, int has_huge_files)
VOID Ext2PutGroup(IN PEXT2_VCB Vcb)
ext3_fsblk_t descriptor_loc(struct super_block *sb, ext3_fsblk_t logical_sb_block, unsigned int nr)
void mark_bitmap_end(int start_bit, int end_bit, char *bitmap)
void ext4_free_inodes_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
static int ext4_block_in_group(struct super_block *sb, ext4_fsblk_t block, ext4_group_t block_group)
BOOLEAN Ext2GetInodeLba(IN PEXT2_VCB Vcb, IN ULONG inode, OUT PLONGLONG offset)
#define ext4_set_bit(n, p)
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLboolean GLboolean GLboolean GLboolean a
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
#define container_of(ptr, type, member)
NTSYSAPI void WINAPI RtlInitializeBitMap(PRTL_BITMAP, PULONG, ULONG)
NTSYSAPI ULONG WINAPI RtlNumberOfClearBits(PCRTL_BITMAP)
NTSYSAPI ULONG WINAPI RtlFindClearBits(PCRTL_BITMAP, ULONG, ULONG)
NTSYSAPI void WINAPI RtlClearBits(PRTL_BITMAP, ULONG, ULONG)
NTSYSAPI void WINAPI RtlSetBits(PRTL_BITMAP, ULONG, ULONG)
NTSYSAPI ULONG WINAPI RtlFindNextForwardRunClear(PCRTL_BITMAP, ULONG, PULONG)
#define memcpy(s1, s2, n)
void free_buffer_head(struct buffer_head *bh)
void * kzalloc(int size, int flags)
static void fini_bh(struct buffer_head **bh)
int bh_submit_read(struct buffer_head *bh)
static struct buffer_head * sb_getblk(struct super_block *sb, sector_t block)
void buffer_head_remove(struct block_device *bdev, struct buffer_head *bh)
static void brelse(struct buffer_head *bh)
void __brelse(struct buffer_head *)
static struct buffer_head * sb_getblk_zero(struct super_block *sb, sector_t block)
void mark_buffer_dirty(struct buffer_head *bh)
static const WCHAR desc[]
static PIO_STATUS_BLOCK iosb
static unsigned(__cdecl *hash_bstr)(bstr_t s)
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
__GNU_EXTENSION typedef __int64 * PLONGLONG
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
BOOLEAN NTAPI CcCopyRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus)
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
BOOLEAN NTAPI ExIsResourceAcquiredExclusiveLite(IN PERESOURCE Resource)
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
VOID NTAPI CcUnpinData(IN PVOID Bcb)
BOOLEAN NTAPI CcPreparePinWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Zero, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
BOOLEAN NTAPI CcPinRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG Flags, OUT PVOID *Bcb, OUT PVOID *Buffer)
#define offsetof(TYPE, MEMBER)
struct ext3_super_block * s_es
unsigned long s_itb_per_group
unsigned long s_desc_per_block
unsigned long s_gdb_count
unsigned long s_groups_count
__le16 bg_used_dirs_count
__le16 bg_free_inodes_count
__le16 bg_used_dirs_count_hi
__le16 bg_free_inodes_count_hi
__le32 bg_block_bitmap_hi
__le32 bg_inode_bitmap_hi
__le16 bg_free_blocks_count
__le16 bg_itable_unused_hi
__le16 bg_free_blocks_count_hi
struct super_block * i_sb
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_NOT_A_DIRECTORY
#define STATUS_UNSUCCESSFUL
#define STATUS_DISK_CORRUPT_ERROR
#define STATUS_INSUFFICIENT_RESOURCES
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
static const WCHAR * error_msg[8]
#define RtlCheckBit(BMH, BP)
static unsigned int block