141 for (
i = 0;
i <
Vcb->sbi.s_gdb_count;
i++) {
142 if (
Vcb->sbi.s_gd[
i].bh) {
187 if (!sbi->
s_gd[
i].bh) {
188 DEBUG(
DL_ERR, (
"Ext2LoadGroupBH: can't read group descriptor %d\n",
i));
224 DEBUG(
DL_ERR, (
"Ext2LoadGroup: not enough memory.\n"));
234 if (!sbi->
s_gd[
i].block) {
235 DEBUG(
DL_ERR, (
"Ext2LoadGroup: can't locate group descriptor %d\n",
i));
241 DEBUG(
DL_ERR, (
"Ext2LoadGroup: Failed to load group descriptions !\n"));
247 DEBUG(
DL_ERR, (
"Ext2LoadGroup: group descriptors corrupted !\n"));
307 if (
e.QuadPart <=
s.QuadPart)
311 while (
s.QuadPart <
e.QuadPart) {
312 if (
e.QuadPart >
s.QuadPart + 1024 * 1024 * 1024) {
313 len = 1024 * 1024 * 1024;
357 ASSERT(o.QuadPart >=
s.QuadPart);
359 if (o.QuadPart ==
s.QuadPart) {
360 s.QuadPart =
s.QuadPart + bh->
b_size;
364 if (o.QuadPart >
s.QuadPart) {
371 o =
Vcb->PartitionInformation.PartitionLength;
454 dst->i_mode =
src->i_mode;
455 dst->i_flags =
src->i_flags;
458 dst->i_nlink =
src->i_links_count;
459 dst->i_generation =
src->i_generation;
460 dst->i_size =
src->i_size;
464 dst->i_file_acl =
src->i_file_acl_lo;
466 dst->i_atime =
src->i_atime;
467 dst->i_ctime =
src->i_ctime;
468 dst->i_mtime =
src->i_mtime;
469 dst->i_dtime =
src->i_dtime;
474 dst->i_extra_isize =
src->i_extra_isize;
476 dst->i_extra_isize = 0;
481 dst->i_mode =
src->i_mode;
482 dst->i_flags =
src->i_flags;
485 dst->i_links_count =
src->i_nlink;
486 dst->i_generation =
src->i_generation;
492 dst->osd2.linux2.l_i_file_acl_high |= (
__u16)(
src->i_file_acl >> 32);
493 dst->i_atime =
src->i_atime;
494 dst->i_ctime =
src->i_ctime;
495 dst->i_mtime =
src->i_mtime;
496 dst->i_dtime =
src->i_dtime;
497 dst->i_extra_isize =
src->i_extra_isize;
503 dst->i_extra_isize =
src->i_extra_isize;
515 DEBUG(
DL_ERR, (
"Ext2LoadInode: failed inode %u.\n", Inode->i_ino));
540 DEBUG(
DL_ERR, (
"Ext2SaveInode: failed inode %u.\n", Inode));
559 ULONG InodeSize =
sizeof(ext3i);
562 DEBUG(
DL_INF, (
"Ext2SaveInode: Saving Inode %xh: Mode=%xh Size=%xh\n",
563 Inode->i_ino, Inode->i_mode, Inode->i_size));
566 DEBUG(
DL_ERR, (
"Ext2SaveInode: failed inode %u.\n", Inode->i_ino));
572 DEBUG(
DL_ERR, (
"Ext2SaveInode: failed reading inode %u.\n", Inode->i_ino));
577 if (InodeSize >
Vcb->InodeSize)
578 InodeSize =
Vcb->InodeSize;
598 DEBUG(
DL_ERR, (
"Ext2LoadRawInode: error get inode(%xh)'s addr.\n", Inode->i_ino));
635 DEBUG(
DL_INF, (
"Ext2SaveInodeXattr: Saving Inode %xh: Mode=%xh Size=%xh\n",
636 Inode->i_ino, Inode->i_mode, Inode->i_size));
639 DEBUG(
DL_ERR, (
"Ext2SaveInodeXattr: error get inode(%xh)'s addr.\n", Inode->i_ino));
676 if (!buffer_uptodate(bh)) {
716 if (!buffer_uptodate(bh)) {
762 if (!buffer_uptodate(bh)) {
765 DEBUG(
DL_ERR, (
"Ext2SaveBuffer: bh_submit_read failed: %d\n",
err));
829 if (!buffer_uptodate(bh)) {
832 DEBUG(
DL_ERR, (
"Ext2SaveBuffer: bh_submit_read failed: %d\n",
err));
866#define SIZE_256K 0x40000
897 DEBUG(
DL_ERR, (
"Ext2SaveBuffer: failed to PinLock offset %I64xh ...\n",
Offset));
962 if (!buffer_uptodate(bh)) {
965 DEBUG(
DL_ERR, (
"Ext2SaveBuffer: bh_submit_read failed: %d\n",
err));
1038 if (GroupHint >=
Vcb->sbi.s_groups_count) {
1040 GroupHint =
Vcb->sbi.s_groups_count - 1;
1043 if (BlockHint != 0) {
1076 set_buffer_uptodate(bh);
1088 if (!buffer_uptodate(bh)) {
1099 if (
Group ==
Vcb->sbi.s_groups_count - 1) {
1118 if (
Index == 0xFFFFFFFF) {
1122 if (dwHint != 0 &&
Count == 0) {
1198 DEBUG(
DL_INF, (
"Ext2NewBlock: Block %xh - %x allocated.\n",
1199 *Block, *Block + *
Number));
1244 DEBUG(
DL_INF, (
"Ext2FreeBlock: Block %xh - %x to be freed.\n",
1257 Group >=
Vcb->sbi.s_groups_count) {
1280 Offset.QuadPart = bitmap_blk;
1283 if (
Group ==
Vcb->sbi.s_groups_count - 1) {
1304 DEBUG(
DL_ERR, (
"Ext2FreeBlock: failed to PinLock bitmap block %xh.\n",
1341 if (Group < Vcb->sbi.s_groups_count) {
1346 DEBUG(
DL_ERR, (
"Ext2FreeBlock: block number beyonds max group.\n"));
1389 *Inode = dwInode = 0XFFFFFFFF;
1393 if (GroupHint >=
Vcb->sbi.s_groups_count)
1394 GroupHint = GroupHint %
Vcb->sbi.s_groups_count;
1409 Average =
Vcb->SuperBlock->s_free_inodes_count /
Vcb->sbi.s_groups_count;
1411 for (
j = 0;
j <
Vcb->sbi.s_groups_count;
j++) {
1413 i = (
j + GroupHint) % (
Vcb->sbi.s_groups_count);
1437 for (
j = 0;
j <
Vcb->sbi.s_groups_count;
j++) {
1501 Group = GroupHint + 1;
1514 for (
j = 1;
j <
Vcb->sbi.s_groups_count;
j <<= 1) {
1517 i = (
i +
j) %
Vcb->sbi.s_groups_count;
1540 for (
j = 2;
j <
Vcb->sbi.s_groups_count;
j++) {
1542 i = (
i + 1) %
Vcb->sbi.s_groups_count;
1566 if (
Group >
Vcb->sbi.s_groups_count) {
1592 set_buffer_uptodate(bh);
1604 if (!buffer_uptodate(bh)) {
1613 if (
Vcb->sbi.s_groups_count == 1) {
1616 if (
Group + 1 ==
Vcb->sbi.s_groups_count) {
1630 if (dwInode == 0xFFFFFFFF || dwInode >=
Length) {
1678 if (dwInode + 1 >
free) {
1690 if (block_bitmap_bh) {
1693 set_buffer_uptodate(block_bitmap_bh);
1794 DEBUG(
DL_INF, (
"Ext2FreeInode: Inode: %xh (Group/Off = %xh/%xh)\n",
1795 Inode,
Group, dwIno));
1797 if (
Group >=
Vcb->sbi.s_groups_count) {
1816 if (!buffer_uptodate(bh)) {
1825 if (
Group ==
Vcb->sbi.s_groups_count - 1) {
1902 MainResourceAcquired =
TRUE;
1938 if (MainResourceAcquired) {
1975 MainResourceAcquired =
TRUE;
2010 if (MainResourceAcquired)
2041 MainResourceAcquired =
TRUE;
2057 "Deleting nonexistent file (%lu), %d",
2087 if (MainResourceAcquired)
2120 if (OldParent == NewParent) {
2124 MainResourceAcquired =
2138 DEBUG(
DL_ERR, (
"Ex2SetParentEntry: failed to allocate pSelf.\n"));
2160 DEBUG(
DL_ERR, (
"Ext2SetParentEntry: failed to read directory.\n"));
2168 if (pSelf->name_len == 1 && pSelf->name[0] ==
'.' &&
2172 if (
pParent->inode != OldParent) {
2194 DEBUG(
DL_ERR, (
"Ext2SetParentEntry: Dcb reference goes to ZERO.\n"));
2197 if (MainResourceAcquired) {
2218 error_msg =
"rec_len is smaller than minimal";
2219 else if (rlen % 4 != 0)
2222 error_msg =
"rec_len is too small for name_len";
2223 else if ((
char *) de + rlen > bh->
b_data +
dir->i_sb->s_blocksize)
2224 error_msg =
"directory entry across blocks";
2230 DEBUG(
DL_ERR, (
"%s: bad entry in directory %u: %s - "
2231 "offset=%u, inode=%u, rec_len=%d, name_len=%d\n",
2250#define MAX_LFS_FILESIZE 0x7fffffffffffffff
2267 if (!has_huge_files ||
sizeof(
blkcnt_t) <
sizeof(
u64)) {
2307 if (!has_huge_files) {
2350 if (!has_huge_files) {
2425 if (i_blocks < 0x100000000) {
2431 raw_inode->i_blocks_high = 0;
2441 if (i_blocks <= 0xffffffffffff) {
2573 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,
2574 0xC601, 0x06C0, 0x0780, 0xC741, 0x0500, 0xC5C1, 0xC481, 0x0440,
2575 0xCC01, 0x0CC0, 0x0D80, 0xCD41, 0x0F00, 0xCFC1, 0xCE81, 0x0E40,
2576 0x0A00, 0xCAC1, 0xCB81, 0x0B40, 0xC901, 0x09C0, 0x0880, 0xC841,
2577 0xD801, 0x18C0, 0x1980, 0xD941, 0x1B00, 0xDBC1, 0xDA81, 0x1A40,
2578 0x1E00, 0xDEC1, 0xDF81, 0x1F40, 0xDD01, 0x1DC0, 0x1C80, 0xDC41,
2579 0x1400, 0xD4C1, 0xD581, 0x1540, 0xD701, 0x17C0, 0x1680, 0xD641,
2580 0xD201, 0x12C0, 0x1380, 0xD341, 0x1100, 0xD1C1, 0xD081, 0x1040,
2581 0xF001, 0x30C0, 0x3180, 0xF141, 0x3300, 0xF3C1, 0xF281, 0x3240,
2582 0x3600, 0xF6C1, 0xF781, 0x3740, 0xF501, 0x35C0, 0x3480, 0xF441,
2583 0x3C00, 0xFCC1, 0xFD81, 0x3D40, 0xFF01, 0x3FC0, 0x3E80, 0xFE41,
2584 0xFA01, 0x3AC0, 0x3B80, 0xFB41, 0x3900, 0xF9C1, 0xF881, 0x3840,
2585 0x2800, 0xE8C1, 0xE981, 0x2940, 0xEB01, 0x2BC0, 0x2A80, 0xEA41,
2586 0xEE01, 0x2EC0, 0x2F80, 0xEF41, 0x2D00, 0xEDC1, 0xEC81, 0x2C40,
2587 0xE401, 0x24C0, 0x2580, 0xE541, 0x2700, 0xE7C1, 0xE681, 0x2640,
2588 0x2200, 0xE2C1, 0xE381, 0x2340, 0xE101, 0x21C0, 0x2080, 0xE041,
2589 0xA001, 0x60C0, 0x6180, 0xA141, 0x6300, 0xA3C1, 0xA281, 0x6240,
2590 0x6600, 0xA6C1, 0xA781, 0x6740, 0xA501, 0x65C0, 0x6480, 0xA441,
2591 0x6C00, 0xACC1, 0xAD81, 0x6D40, 0xAF01, 0x6FC0, 0x6E80, 0xAE41,
2592 0xAA01, 0x6AC0, 0x6B80, 0xAB41, 0x6900, 0xA9C1, 0xA881, 0x6840,
2593 0x7800, 0xB8C1, 0xB981, 0x7940, 0xBB01, 0x7BC0, 0x7A80, 0xBA41,
2594 0xBE01, 0x7EC0, 0x7F80, 0xBF41, 0x7D00, 0xBDC1, 0xBC81, 0x7C40,
2595 0xB401, 0x74C0, 0x7580, 0xB541, 0x7700, 0xB7C1, 0xB681, 0x7640,
2596 0x7200, 0xB2C1, 0xB381, 0x7340, 0xB101, 0x71C0, 0x7080, 0xB041,
2597 0x5000, 0x90C1, 0x9181, 0x5140, 0x9301, 0x53C0, 0x5280, 0x9241,
2598 0x9601, 0x56C0, 0x5780, 0x9741, 0x5500, 0x95C1, 0x9481, 0x5440,
2599 0x9C01, 0x5CC0, 0x5D80, 0x9D41, 0x5F00, 0x9FC1, 0x9E81, 0x5E40,
2600 0x5A00, 0x9AC1, 0x9B81, 0x5B40, 0x9901, 0x59C0, 0x5880, 0x9841,
2601 0x8801, 0x48C0, 0x4980, 0x8941, 0x4B00, 0x8BC1, 0x8A81, 0x4A40,
2602 0x4E00, 0x8EC1, 0x8F81, 0x4F40, 0x8D01, 0x4DC0, 0x4C80, 0x8C41,
2603 0x4400, 0x84C1, 0x8581, 0x4540, 0x8701, 0x47C0, 0x4680, 0x8641,
2604 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040
2627 if (!(sbi->
s_es->s_feature_ro_compat &
2633 crc =
crc16(~0, sbi->
s_es->s_uuid,
sizeof(sbi->
s_es->s_uuid));
2634 crc =
crc16(crc, (
__u8 *)&le_group,
sizeof(le_group));
2638 if ((sbi->
s_es->s_feature_incompat &
2698 unsigned long metagroup =
group / EXT4_DESC_PER_BLOCK(
sb);
2724 unsigned long first_meta_bg =
2726 unsigned long metagroup =
group / EXT4_DESC_PER_BLOCK(
sb);
2729 metagroup < first_meta_bg)
2747 return logical_sb_block +
nr + 1;
2751 return (has_super + ext3_group_first_block_no(
sb, bg));
2754#define ext4_set_bit(n, p) set_bit((int)(n), (unsigned long *)(p))
2775 if (start_bit >= end_bit)
2778 DEBUG(
DL_INF, (
"mark end bits +%d through +%d used\n", start_bit, end_bit));
2779 for (
i = start_bit; (
unsigned)
i < ((start_bit + 7) & ~7UL);
i++)
2811 return EXT4_INODES_PER_GROUP(
sb);
2837 if (actual_group == block_group)
2881 unsigned free_blocks, group_blocks;
2890 "Checksum bad for group %u", block_group);
2925 group_blocks = EXT4_BLOCKS_PER_GROUP(
sb);
2928 free_blocks = group_blocks - bit_max;
2934 for (bit = 0; bit < bit_max; bit++)
2937 start = ext3_group_first_block_no(
sb, block_group);
2990 "block_group >= groups_count - "
2991 "block_group = %u, groups_count = %u",
2999 group = block_group >> EXT4_DESC_PER_BLOCK_BITS(
sb);
3000 offset = block_group & (EXT4_DESC_PER_BLOCK(
sb) - 1);
3043 for (
i = 0;
i < ngroups;
i++) {
3056 unsigned long desc_count;
3077 unsigned long count = 0;
3100 int flexbg_flag = 0;
3119 last_block = first_block +
3123 if (block_bitmap < first_block || block_bitmap > last_block) {
3125 "Block bitmap for group %u not in group "
3126 "(block %llu)!\n",
i, block_bitmap);
3131 if (inode_bitmap < first_block || inode_bitmap > last_block) {
3133 "Inode bitmap for group %u not in group "
3134 "(block %llu)!\n",
i, inode_bitmap);
3139 if (inode_table < first_block ||
3142 "Inode table for group %u not in group "
3143 "(block %llu)!\n",
i, inode_table);
3150 "Checksum for group %u failed (%u!=%u)\n",
3161 first_block += EXT4_BLOCKS_PER_GROUP(
sb);
static void atomic_inc(atomic_t volatile *v)
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 RtlInitializeBitMap
#define RtlFindNextForwardRunClear
#define RtlNumberOfClearBits
#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)
BOOLEAN Ext2ReadInode(PEXT2_VOLUME_INFO Volume, ULONG Inode, PEXT2_INODE InodeBuffer)
#define EXT2_GOOD_OLD_INODE_SIZE
struct ext2_sblock * PEXT2_SUPER_BLOCK
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)
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)
BOOLEAN Ext2SaveBuffer(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN LONGLONG offset, IN ULONG size, IN PVOID buf)
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)
#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]
static unsigned int block