ReactOS 0.4.15-dev-7931-gfd331f1
ext2fs.h
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYRIGHT.TXT
3 * PROJECT: Ext2 File System Driver for WinNT/2K/XP
4 * FILE: Ext2fs.h
5 * PURPOSE: Header file: ext2 structures
6 * PROGRAMMER: Matt Wu <mattwu@163.com>
7 * HOMEPAGE: http://www.ext2fsd.com
8 * UPDATE HISTORY:
9 */
10
11#ifndef _EXT2_HEADER_
12#define _EXT2_HEADER_
13
14/* INCLUDES *************************************************************/
15#include <linux/module.h>
16#include <ntdddisk.h>
17#ifdef __REACTOS__
18#include <ndk/rtlfuncs.h>
19#include <pseh/pseh2.h>
21#endif
22#include <stdio.h>
23#include <time.h>
24#include <string.h>
25#include <linux/ext2_fs.h>
26#include <linux/ext3_fs.h>
27#include <linux/ext3_fs_i.h>
28#include <linux/ext4.h>
29
30/* DEBUG ****************************************************************/
31#if DBG
32# define EXT2_DEBUG 1
33#else
34# define EXT2_DEBUG 0
35#endif
36
37#define EXT_DEBUG_BREAKPOINT FALSE
38
39#if EXT2_DEBUG && EXT_DEBUG_BREAKPOINT
40//#if _X86_
41//#define DbgBreak() __asm int 3
42//#else
43#define DbgBreak() KdBreakPoint()
44//#endif
45#else
46#define DbgBreak()
47#endif
48
49/* STRUCTS & CONSTS******************************************************/
50
51#define EXT2FSD_VERSION "0.69"
52
53
54/* WDK DEFINITIONS ******************************************************/
55
56
57/* COMPILER SWITCH / OPTIONS ********************************************/
58
59//
60// Ext2Fsd build options
61//
62
63// To support driver dynamics unload
64
65#define EXT2_UNLOAD FALSE
66
67// To support inode size expansion (fallocate)
68
69#define EXT2_PRE_ALLOCATION_SUPPORT TRUE
70
71//
72// Constants
73//
74
75#define EXT2_MAX_NESTED_LINKS (8)
76#define EXT2_LINKLEN_IN_INODE (60)
77#define EXT2_BLOCK_TYPES (0x04)
78
79#define MAXIMUM_RECORD_LENGTH (0x10000)
80
81#define SECTOR_BITS (Vcb->SectorBits)
82#define SECTOR_SIZE (Vcb->DiskGeometry.BytesPerSector)
83#define DEFAULT_SECTOR_SIZE (0x200)
84
85#define SUPER_BLOCK_OFFSET (0x400)
86#define SUPER_BLOCK_SIZE (0x400)
87
88#define READ_AHEAD_GRANULARITY (0x10000)
89
90#define SUPER_BLOCK (Vcb->SuperBlock)
91
92#define INODE_SIZE (Vcb->InodeSize)
93#define BLOCK_SIZE (Vcb->BlockSize)
94#define BLOCK_BITS (SUPER_BLOCK->s_log_block_size + 10)
95#define GROUP_DESC_SIZE (Vcb->sbi.s_desc_size)
96
97#define INODES_COUNT (Vcb->SuperBlock->s_inodes_count)
98
99#define INODES_PER_GROUP (SUPER_BLOCK->s_inodes_per_group)
100#define BLOCKS_PER_GROUP (SUPER_BLOCK->s_blocks_per_group)
101#define TOTAL_BLOCKS (ext3_blocks_count(SUPER_BLOCK))
102
103#define EXT2_FIRST_DATA_BLOCK (SUPER_BLOCK->s_first_data_block)
104
110
111#define CEILING_ALIGNED(T, A, B) (((A) + (B) - 1) & (~((T)(B) - 1)))
112#define COCKLOFT_ALIGNED(T, A, B) (((A) + (B)) & (~((T)(B) - 1)))
113
114
115
116/*
117 * Compile-time assertion: (Lustre version)
118 *
119 * Check an invariant described by a constant expression at compile time by
120 * forcing a compiler error if it does not hold. \a cond must be a constant
121 * expression as defined by the ISO C Standard:
122 *
123 * 6.8.4.2 The switch statement
124 * ....
125 * [#3] The expression of each case label shall be an integer
126 * constant expression and no two of the case constant
127 * expressions in the same switch statement shall have the same
128 * value after conversion...
129 *
130 */
131
132#define CL_ASSERT(cond) do {switch('x') {case (cond): case 0: break;}} while (0)
133
134/* File System Releated *************************************************/
135
136#define DRIVER_NAME "Ext2Fsd"
137#define DEVICE_NAME L"\\Ext2Fsd"
138#define CDROM_NAME L"\\Ext2CdFsd"
139
140// Registry
141
142#define PARAMETERS_KEY L"\\Parameters"
143#define VOLUMES_KEY L"\\Volumes"
144
145#define READING_ONLY L"Readonly"
146#define WRITING_SUPPORT L"WritingSupport"
147#define CHECKING_BITMAP L"CheckingBitmap"
148#define EXT3_FORCEWRITING L"Ext3ForceWriting"
149#define CODEPAGE_NAME L"CodePage"
150#define HIDING_PREFIX L"HidingPrefix"
151#define HIDING_SUFFIX L"HidingSuffix"
152#define AUTO_MOUNT L"AutoMount"
153#define MOUNT_POINT L"MountPoint"
154#define UID L"uid"
155#define GID L"gid"
156#define EUID L"euid"
157#define EGID L"egid"
158
159#define DOS_DEVICE_NAME L"\\DosDevices\\Ext2Fsd"
160
161// To support ext2fsd unload routine
162#if EXT2_UNLOAD
163//
164// Private IOCTL to make the driver ready to unload
165//
166#define IOCTL_PREPARE_TO_UNLOAD \
167CTL_CODE(FILE_DEVICE_UNKNOWN, 2048, METHOD_NEITHER, FILE_WRITE_ACCESS)
168
169#endif // EXT2_UNLOAD
170
171#include "common.h"
172
173#ifndef _GNU_NTIFS_
175#endif
176
177#define IsFlagOn(a,b) ((BOOLEAN)(FlagOn(a,b) == b))
178#ifndef FlagOn
179#define FlagOn(_F,_SF) ((_F) & (_SF))
180#endif
181
182#ifndef BooleanFlagOn
183#define BooleanFlagOn(F,SF) ((BOOLEAN)(((F) & (SF)) != 0))
184#endif
185
186#ifndef SetFlag
187#define SetFlag(_F,_SF) ((_F) |= (_SF))
188#endif
189
190#ifndef ClearFlag
191#define ClearFlag(_F,_SF) ((_F) &= ~(_SF))
192#endif
193
194#ifndef min
195#define min(a,b) (((a) < (b)) ? (a) : (b))
196#endif
197
198#ifndef max
199#define max(a,b) (((a) > (b)) ? (a) : (b))
200#endif
201
202#ifdef _WIN2K_TARGET_
203#define InterlockedOr _InterlockedOr
204LONG
206 IN OUT LONG volatile *Target,
207 IN LONG Set
208);
209
210#pragma intrinsic (_InterlockedAnd)
211#define InterlockedAnd _InterlockedAnd
212
213LONG
215 IN OUT LONG volatile *Target,
216 IN LONG Set
217);
218
219#pragma intrinsic (_InterlockedXor)
220#define InterlockedXor _InterlockedXor
221
222#endif /* only for win2k */
223
224#if EXT2_DEBUG
225
226#ifdef __REACTOS__
227#define SetLongFlag(_F,_SF) Ext2SetFlag((PULONG)&(_F), (ULONG)(_SF))
228#define ClearLongFlag(_F,_SF) Ext2ClearFlag((PULONG)&(_F), (ULONG)(_SF))
229#else
230#define SetLongFlag(_F,_SF) Ext2SetFlag(&(_F), (ULONG)(_SF))
231#define ClearLongFlag(_F,_SF) Ext2ClearFlag(&(_F), (ULONG)(_SF))
232#endif
233
234#ifdef __REACTOS__
235static
236#endif
237__inline
238VOID
239Ext2SetFlag(PULONG Flags, ULONG FlagBit)
240{
241 ULONG _ret = InterlockedOr(Flags, FlagBit);
242 ASSERT(*Flags == (_ret | FlagBit));
243}
244
245#ifdef __REACTOS__
246static
247#endif
248__inline
249VOID
250Ext2ClearFlag(PULONG Flags, ULONG FlagBit)
251{
252 ULONG _ret = InterlockedAnd(Flags, ~FlagBit);
253 ASSERT(*Flags == (_ret & (~FlagBit)));
254}
255
256#else
257
258#define SetLongFlag(_F,_SF) InterlockedOr(&(_F), (ULONG)(_SF))
259#define ClearLongFlag(_F,_SF) InterlockedAnd(&(_F), ~((ULONG)(_SF)))
260
261#endif /* release */
262
263#define Ext2RaiseStatus(IRPCONTEXT,STATUS) { \
264 (IRPCONTEXT)->ExceptionCode = (STATUS); \
265 ExRaiseStatus((STATUS)); \
266}
267
268#define Ext2NormalizeAndRaiseStatus(IRPCONTEXT,STATUS) { \
269 (IRPCONTEXT)->ExceptionCode = STATUS; \
270 if ((STATUS) == STATUS_VERIFY_REQUIRED) { ExRaiseStatus((STATUS)); } \
271 ExRaiseStatus(FsRtlNormalizeNtstatus((STATUS),STATUS_UNEXPECTED_IO_ERROR)); \
272}
273
274//
275// Define IsWritingToEof for write (append) operations
276//
277
278#define FILE_WRITE_TO_END_OF_FILE 0xffffffff
279
280#define IsWritingToEof(Pos) (((Pos).LowPart == FILE_WRITE_TO_END_OF_FILE) && \
281 ((Pos).HighPart == -1 ))
282
283#define IsDirectory(Fcb) IsMcbDirectory((Fcb)->Mcb)
284#define IsSpecialFile(Fcb) IsMcbSpecialFile((Fcb)->Mcb)
285#define IsSymLink(Fcb) IsMcbSymLink((Fcb)->Mcb)
286#define IsInodeSymLink(I) S_ISLNK((I)->i_mode)
287#define IsRoot(Fcb) IsMcbRoot((Fcb)->Mcb)
288
289//
290// Pool Tags
291//
292
293#define TAG_VPB ' bpV'
294#define VPB_SIZE sizeof(VPB)
295
296#define EXT2_DATA_MAGIC 'BD2E'
297#define EXT2_INAME_MAGIC 'NI2E'
298#define EXT2_FNAME_MAGIC 'NF2E'
299#define EXT2_VNAME_MAGIC 'NV2E'
300#define EXT2_DENTRY_MAGIC 'ED2E'
301#define EXT2_DIRSP_MAGIC 'SD2E'
302#define EXT2_SB_MAGIC 'BS2E'
303#define EXT2_GD_MAGIC 'DG2E'
304#define EXT2_FLIST_MAGIC 'LF2E'
305#define EXT2_PARAM_MAGIC 'PP2E'
306#define EXT2_RWC_MAGIC 'WR2E'
307
308//
309// Bug Check Codes Definitions
310//
311
312#define EXT2_FILE_SYSTEM (FILE_SYSTEM)
313
314#define EXT2_BUGCHK_BLOCK (0x00010000)
315#define EXT2_BUGCHK_CLEANUP (0x00020000)
316#define EXT2_BUGCHK_CLOSE (0x00030000)
317#define EXT2_BUGCHK_CMCB (0x00040000)
318#define EXT2_BUGCHK_CREATE (0x00050000)
319#define EXT2_BUGCHK_DEBUG (0x00060000)
320#define EXT2_BUGCHK_DEVCTL (0x00070000)
321#define EXT2_BUGCHK_DIRCTL (0x00080000)
322#define EXT2_BUGCHK_DISPATCH (0x00090000)
323#define EXT2_BUGCHK_EXCEPT (0x000A0000)
324#define EXT2_BUGCHK_EXT2 (0x000B0000)
325#define EXT2_BUGCHK_FASTIO (0x000C0000)
326#define EXT2_BUGCHK_FILEINFO (0x000D0000)
327#define EXT2_BUGCHK_FLUSH (0x000E0000)
328#define EXT2_BUGCHK_FSCTL (0x000F0000)
329#define EXT2_BUGCHK_INIT (0x00100000)
330#define EXT2_BUGCHK_LOCK (0x0011000)
331#define EXT2_BUGCHK_MEMORY (0x0012000)
332#define EXT2_BUGCHK_MISC (0x0013000)
333#define EXT2_BUGCHK_READ (0x00140000)
334#define EXT2_BUGCHK_SHUTDOWN (0x00150000)
335#define EXT2_BUGCHK_VOLINFO (0x00160000)
336#define EXT2_BUGCHK_WRITE (0x00170000)
337
338#define EXT2_BUGCHK_LAST (0x00170000)
339
340#define Ext2BugCheck(A,B,C,D) { KeBugCheckEx(EXT2_FILE_SYSTEM, A | __LINE__, B, C, D ); }
341
342
343/* Ext2 file system definions *******************************************/
344
345//
346// The second extended file system magic number
347//
348
349#define EXT2_SUPER_MAGIC 0xEF53
350
351#define EXT2_MIN_BLOCK 1024
352#define EXT2_MIN_FRAG 1024
353#define EXT2_MAX_USER_BLKSIZE 65536
354//
355// Inode flags (Linux uses octad number, but why ? strange!!!)
356//
357
358#define S_IFMT 0x0F000 /* 017 0000 */
359#define S_IFSOCK 0x0C000 /* 014 0000 */
360#define S_IFLNK 0x0A000 /* 012 0000 */
361#define S_IFREG 0x08000 /* 010 0000 */
362#define S_IFBLK 0x06000 /* 006 0000 */
363#define S_IFDIR 0x04000 /* 004 0000 */
364#define S_IFCHR 0x02000 /* 002 0000 */
365#define S_IFIFO 0x01000 /* 001 0000 */
366
367#define S_ISUID 0x00800 /* 000 4000 */
368#define S_ISGID 0x00400 /* 000 2000 */
369#define S_ISVTX 0x00200 /* 000 1000 */
370
371#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
372#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
373#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
374#define S_ISFIL(m) (((m) & S_IFMT) == S_IFFIL)
375#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
376#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
377#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
378#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
379
380#define S_IPERMISSION_MASK 0x1FF /* */
381
382#define S_IRWXU 0x1C0 /* 0 0700 */
383#define S_IRWNU 0x180 /* 0 0600 */
384#define S_IRUSR 0x100 /* 0 0400 */
385#define S_IWUSR 0x080 /* 0 0200 */
386#define S_IXUSR 0x040 /* 0 0100 */
387
388#define S_IRWXG 0x038 /* 0 0070 */
389#define S_IRWNG 0x030 /* 0 0060 */
390#define S_IRGRP 0x020 /* 0 0040 */
391#define S_IWGRP 0x010 /* 0 0020 */
392#define S_IXGRP 0x008 /* 0 0010 */
393
394#define S_IRWXO 0x007 /* 0 0007 */
395#define S_IRWNO 0x006 /* 0 0006 */
396#define S_IROTH 0x004 /* 0 0004 */
397#define S_IWOTH 0x002 /* 0 0002 */
398#define S_IXOTH 0x001 /* 0 0001 */
399
400#define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO)
401#define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
402#define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
403#define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
404#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
405#define S_IFATTR (S_IRWNU|S_IRWNG|S_IRWNO)
406
407#define S_ISREADABLE(m) (((m) & S_IPERMISSION_MASK) == (S_IRUSR | S_IRGRP | S_IROTH))
408#define S_ISWRITABLE(m) (((m) & S_IPERMISSION_MASK) == (S_IWUSR | S_IWGRP | S_IWOTH))
409
410#define Ext2SetReadable(m) do {(m) = (m) | (S_IRUSR | S_IRGRP | S_IROTH);} while(0)
411#define Ext2SetWritable(m) do {(m) = (m) | (S_IWUSR | S_IWGRP | S_IWOTH);} while(0)
412
413#define Ext2SetOwnerWritable(m) do {(m) |= S_IWUSR;} while(0)
414#define Ext2SetOwnerReadOnly(m) do {(m) &= ~S_IWUSR;} while(0)
415
416#define Ext2IsOwnerWritable(m) (((m) & S_IWUSR) == S_IWUSR)
417#define Ext2IsOwnerReadable(m) (((m) & S_IRUSR) == S_IRUSR)
418#define Ext2IsOwnerReadOnly(m) (!(Ext2IsOwnerWritable(m)) && Ext2IsOwnerReadable(m))
419
420#define Ext2IsGroupWritable(m) (((m) & S_IWGRP) == S_IWGRP)
421#define Ext2IsGroupReadable(m) (((m) & S_IRGRP) == S_IRGRP)
422#define Ext2IsGroupReadOnly(m) (!(Ext2IsGroupWritable(m)) && Ext2IsGroupReadable(m))
423
424#define Ext2IsOtherWritable(m) (((m) & S_IWOTH) == S_IWOTH)
425#define Ext2IsOtherReadable(m) (((m) & S_IROTH) == S_IROTH)
426#define Ext2IsOtherReadOnly(m) (!(Ext2IsOtherWritable(m)) && Ext2IsOtherReadable(m))
427
428#define Ext2SetReadOnly(m) do {(m) &= ~(S_IWUSR | S_IWGRP | S_IWOTH);} while(0)
429
430
431#define Ext2FileCanRead (0x1)
432#define Ext2FileCanWrite (0x2)
433#define Ext2FileCanExecute (0x4)
434
435
436/*
437 * We need 8-bytes aligned for all the sturctures
438 * It's a must for all ERESOURCE allocations
439 */
440
441//
442// Ext2Fsd Driver Definitions
443//
444
445//
446// EXT2_IDENTIFIER_TYPE
447//
448// Identifiers used to mark the structures
449//
450
452#ifdef _MSC_VER
453 EXT2FGD = ':DGF',
454 EXT2VCB = ':BCV',
455 EXT2FCB = ':BCF',
456 EXT2CCB = ':BCC',
457 EXT2ICX = ':XCI',
458 EXT2FSD = ':DSF',
459 EXT2MCB = ':BCM'
460#else
461 EXT2FGD = 0xE2FD0001,
462 EXT2VCB = 0xE2FD0002,
463 EXT2FCB = 0xE2FD0003,
464 EXT2CCB = 0xE2FD0004,
465 EXT2ICX = 0xE2FD0005,
466 EXT2FSD = 0xE2FD0006,
467 EXT2MCB = 0xE2FD0007
468#endif
470
471//
472// EXT2_IDENTIFIER
473//
474// Header used to mark the structures
475//
476typedef struct _EXT2_IDENTIFIER {
480
481
482#define NodeType(Ptr) (*((EXT2_IDENTIFIER_TYPE *)(Ptr)))
483
484typedef struct _EXT2_MCB EXT2_MCB, *PEXT2_MCB;
485
486
487typedef PVOID PBCB;
488
489//
490
491//
492// EXT2_GLOBAL_DATA
493//
494// Data that is not specific to a mounted volume
495//
496
497#ifdef __REACTOS__
499#else
501#endif
502
503typedef struct _EXT2_REAPER {
510
511#define EXT2_REAPER_FLAG_STOP (1 << 0)
512
513typedef struct _EXT2_GLOBAL {
514
515 /* Identifier for this structure */
517
518 /* Syncronization primitive for this structure */
520
521 /* Global flags for the driver: I put it since
522 FastIoDispatch isn't 8bytes aligned. */
524
525 /* Table of pointers to the fast I/O entry points */
527
528 /* Filter callbacks */
530
531 /* Table of pointers to the Cache Manager callbacks */
534
535 /* Pointer to the driver object */
537
538 /* Pointer to the disk device object */
540
541 /* Pointer to the cdrom device object */
543
544 /* List of mounted volumes */
546
547 /* Cleaning thread related: resource cleaner */
551
552 /* Look Aside table of IRP_CONTEXT, FCB, MCB, CCB */
560
561 /* User specified global codepage name */
562 struct {
567
568 /* global hiding patterns */
575
576 /* Registery path */
578
579 /* global memory and i/o statistics and memory allocations
580 of various sturctures */
581
583
585
586//
587// Flags for EXT2_GLOBAL_DATA
588//
589
590#define EXT2_UNLOAD_PENDING 0x00000001
591#define EXT2_SUPPORT_WRITING 0x00000002
592#define EXT3_FORCE_WRITING 0x00000004
593#define EXT2_CHECKING_BITMAP 0x00000008
594#define EXT2_AUTO_MOUNT 0x00000010
595
596//
597// Glboal Ext2Fsd Memory Block
598//
599
601
602//
603// memory allocation statistics
604//
605
606
607#define INC_MEM_COUNT(_i, _p, _s) do { ASSERT(_p); Ext2TraceMemory(TRUE, (int) (_i), (PVOID)(_p), (LONG)(_s)); } while(0)
608#define DEC_MEM_COUNT(_i, _p, _s) do { ASSERT(_p); Ext2TraceMemory(FALSE, (int) (_i), (PVOID)(_p), (LONG)(_s)); } while(0)
609#define INC_IRP_COUNT(IrpContext) Ext2TraceIrpContext(TRUE, (IrpContext))
610#define DEC_IRP_COUNT(IrpContext) Ext2TraceIrpContext(FALSE, (IrpContext))
611
612//
613// Driver Extension define
614//
615
616#define IsExt2FsDevice(DO) ((DO == Ext2Global->DiskdevObject) || \
617 (DO == Ext2Global->CdromdevObject) )
618
619#ifdef _WIN2K_TARGET_
620#define FSRTL_ADVANCED_FCB_HEADER FSRTL_COMMON_FCB_HEADER
621#endif
622
623typedef struct _EXT2_FCBVCB {
624
625 // Command header for Vcb and Fcb
627
628#ifndef _WIN2K_TARGET_
630#endif
631
632 // Ext2Fsd identifier
634
635
636 // Locking resources
639
641
642//
643// EXT2_VCB Volume Control Block
644//
645// Data that represents a mounted logical volume
646// It is allocated as the device extension of the volume device object
647//
648typedef struct _EXT2_VCB {
649
650 /* Common header */
652
653 // Resource for metadata (inode)
655
656 // Resource for metadata (block)
658
659 // Resource for Mcb (Meta data control block)
661
662 // List of FCBs for open files on this volume
666
667 // Mcb list
670
671 // Entry of Mcb Tree (Root Node)
673
674 // Link list to Global
676
677 // Section objects
679
680 // Dirty Mcbs of modifications for volume stream
682
683
684 // Share Access for the file object
686
687 // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLOSE
688 // for both files on this volume and open instances of the
689 // volume itself.
690 ULONG ReferenceCount; /* total ref count */
691 ULONG OpenHandleCount; /* all handles */
692
693 ULONG OpenVolumeCount; /* volume handle */
694
695 // Disk change count
697
698 // Pointer to the VPB in the target device object
701
702 // The FileObject of Volume used to lock the volume
704
705 // List of IRPs pending on directory change notify requests
707
708 // Pointer to syncronization primitive for this list
710
711 // This volumes device object
713
714 // The physical device object (the disk)
716
717 // The physical device object (the disk)
719
720 // Information about the physical device object
723
726
727 // Block / Cluster size
729
730 // Sector size in bits
732
733 // Minimal i/o size: min(PageSize, BlockSize)
735
736 // Bits of aligned size
738
739 // Inode size
741
742 // Inode lookaside list
744
745 // Flags for the volume
747
748 // Streaming File Object
750
751 // User specified codepage name per volume
752 struct {
756
757 /* patterns to hiding files */
762
763 /* User to impersanate */
766
767 /* User to act as */
770
771 /* mountpoint: symlink to DesDevices */
773
777
778 /* Maximum file size in blocks ... */
784
785//
786// Flags for EXT2_VCB
787//
788#define VCB_INITIALIZED 0x00000001
789#define VCB_VOLUME_LOCKED 0x00000002
790#define VCB_MOUNTED 0x00000004
791#define VCB_DISMOUNT_PENDING 0x00000008
792#define VCB_NEW_VPB 0x00000010
793#define VCB_BEING_CLOSED 0x00000020
794#define VCB_USER_IDS 0x00000040 /* uid/gid specified by user */
795#define VCB_USER_EIDS 0x00000080 /* euid/egid specified by user */
796#define VCB_GD_LOADED 0x00000100 /* group desc loaded */
797
798#define VCB_BEING_DROPPED 0x00002000
799#define VCB_FORCE_WRITING 0x00004000
800#define VCB_DEVICE_REMOVED 0x00008000
801#define VCB_JOURNAL_RECOVER 0x00080000
802#define VCB_ARRIVAL_NOTIFIED 0x00800000
803#define VCB_RO_COMPAT_READ_ONLY 0x01000000
804#define VCB_READ_ONLY 0x08000000
805#define VCB_WRITE_PROTECTED 0x10000000
806#define VCB_FLOPPY_DISK 0x20000000
807#define VCB_REMOVAL_PREVENTED 0x40000000
808#define VCB_REMOVABLE_MEDIA 0x80000000
809
810
811#define IsVcbInited(Vcb) (IsFlagOn((Vcb)->Flags, VCB_INITIALIZED))
812#define IsMounted(Vcb) (IsFlagOn((Vcb)->Flags, VCB_MOUNTED))
813#define IsDispending(Vcb) (IsFlagOn((Vcb)->Flags, VCB_DISMOUNT_PENDING))
814#define IsVcbReadOnly(Vcb) (IsFlagOn((Vcb)->Flags, VCB_READ_ONLY) || \
815 IsFlagOn((Vcb)->Flags, VCB_RO_COMPAT_READ_ONLY) || \
816 IsFlagOn((Vcb)->Flags, VCB_WRITE_PROTECTED))
817
818
819#define IsExt3ForceWrite() (IsFlagOn(Ext2Global->Flags, EXT3_FORCE_WRITING))
820#define IsVcbForceWrite(Vcb) (IsFlagOn((Vcb)->Flags, VCB_FORCE_WRITING))
821#define CanIWrite(Vcb) (IsExt3ForceWrite() || (!IsVcbReadOnly(Vcb) && IsVcbForceWrite(Vcb)))
822#define IsLazyWriter(Fcb) ((Fcb)->LazyWriterThread == PsGetCurrentThread())
823//
824// EXT2_FCB File Control Block
825//
826// Data that represents an open file
827// There is a single instance of the FCB for every open file
828//
829typedef struct _EXT2_FCB {
830
831 /* Common header */
833
834 // List of FCBs for this volume
836 LARGE_INTEGER TsDrop; /* drop time */
837
839
840 // Share Access for the file object
842
843 // List of byte-range locks for this file
845
846 // oplock information management structure
848
849 // Lazy writer thread context
851
852 // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP
854
855 // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLOSE
857
858 // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP
859 // But only for Files with FO_NO_INTERMEDIATE_BUFFERING flag
861
862 // Flags for the FCB
864
865 // Pointer to the inode
866 struct inode *Inode;
867
868 // Vcb
870
871 // Mcb Node ...
873
875
876//
877// Flags for EXT2_FCB
878//
879
880#define FCB_FROM_POOL 0x00000001
881#define FCB_PAGE_FILE 0x00000002
882#define FCB_FILE_MODIFIED 0x00000020
883
884#define FCB_ALLOC_IN_CREATE 0x00000080
885#define FCB_ALLOC_IN_WRITE 0x00000100
886#define FCB_ALLOC_IN_SETINFO 0x00000200
887
888#define FCB_DELETE_PENDING 0x80000000
889
890//
891// Mcb Node
892//
893
894struct _EXT2_MCB {
895
896 // Identifier for this structure
898
899 // Flags
901
902 // Link List Info
903 PEXT2_MCB Parent; // Parent
904 PEXT2_MCB Next; // Siblings
905
906 union {
907 PEXT2_MCB Child; // Children Mcb nodes
908 PEXT2_MCB Target; // Target Mcb of symlink
909 };
910
911 // Mcb Node Info
912
913 // -> Fcb
915
916 // Short name
918
919 // Full name with path
921
922 // File attribute
924
925 // reference count
927
928 // Extents zone
930
931 // Metablocks
933
934 // Time stamps
939
940 // List Link to Vcb->McbList
942
943
944
945 struct inode Inode;
946 struct dentry *de;
947};
948
949//
950// Flags for MCB
951//
952#define MCB_FROM_POOL 0x00000001
953#define MCB_VCB_LINK 0x00000002
954#define MCB_ENTRY_TREE 0x00000004
955#define MCB_FILE_DELETED 0x00000008
956
957#define MCB_ZONE_INITED 0x20000000
958#define MCB_TYPE_SPECIAL 0x40000000 /* unresolved symlink + device node */
959#define MCB_TYPE_SYMLINK 0x80000000
960
961#define IsMcbUsed(Mcb) ((Mcb)->Refercount > 0)
962#define IsMcbSymLink(Mcb) IsFlagOn((Mcb)->Flags, MCB_TYPE_SYMLINK)
963#define IsZoneInited(Mcb) IsFlagOn((Mcb)->Flags, MCB_ZONE_INITED)
964#define IsMcbSpecialFile(Mcb) IsFlagOn((Mcb)->Flags, MCB_TYPE_SPECIAL)
965#define IsMcbRoot(Mcb) ((Mcb)->Inode.i_ino == EXT2_ROOT_INO)
966#define IsMcbReadonly(Mcb) IsFlagOn((Mcb)->FileAttr, FILE_ATTRIBUTE_READONLY)
967#define IsMcbDirectory(Mcb) IsFlagOn((Mcb)->FileAttr, FILE_ATTRIBUTE_DIRECTORY)
968#define IsFileDeleted(Mcb) IsFlagOn((Mcb)->Flags, MCB_FILE_DELETED)
969
970#define IsLinkInvalid(Mcb) (IsMcbSymLink(Mcb) && IsFileDeleted(Mcb->Target))
971
972/*
973 * routines for reference count management
974 */
975
976#define Ext2ReferXcb(_C) InterlockedIncrement(_C)
977#define Ext2DerefXcb(_C) DEC_OBJ_CNT(_C)
978
979#ifdef __REACTOS__
980static
981#endif
983 if (*_C <= 0) {
984 DbgBreak();
985 }
986 return InterlockedDecrement(_C);
987}
988
989#if EXT2_DEBUG
990VOID
991Ext2TraceMcb(PCHAR fn, USHORT lc, USHORT add, PEXT2_MCB Mcb);
992#define Ext2ReferMcb(Mcb) Ext2TraceMcb(__FUNCTION__, __LINE__, TRUE, Mcb)
993#define Ext2DerefMcb(Mcb) Ext2TraceMcb(__FUNCTION__, __LINE__, FALSE, Mcb)
994#else
995#define Ext2ReferMcb(Mcb) Ext2ReferXcb(&Mcb->Refercount)
996#define Ext2DerefMcb(Mcb) Ext2DerefXcb(&Mcb->Refercount)
997#endif
998
999//
1000// EXT2_CCB Context Control Block
1001//
1002// Data that represents one instance of an open file
1003// There is one instance of the CCB for every instance of an open file
1004//
1005typedef struct _EXT2_CCB {
1006
1007 // Identifier for this structure
1009
1010 // Flags
1012
1013 // Mcb of it's symbol link
1015
1016 // State that may need to be maintained
1018
1019 /* Open handle control block */
1020 struct file filp;
1021
1022 /* The EA index we are on */
1024
1026
1027//
1028// Flags for CCB
1029//
1030
1031#define CCB_FROM_POOL 0x00000001
1032#define CCB_VOLUME_DASD_PURGE 0x00000002
1033#define CCB_LAST_WRITE_UPDATED 0x00000004
1034#define CCB_OPEN_REPARSE_POINT 0x00000008
1035#define CCB_DELETE_ON_CLOSE 0x00000010
1036
1037#define CCB_ALLOW_EXTENDED_DASD_IO 0x80000000
1038
1039//
1040// EXT2_IRP_CONTEXT
1041//
1042// Used to pass information about a request between the drivers functions
1043//
1044typedef struct ext2_icb {
1045
1046 // Identifier for this structure
1048
1049 // Pointer to the IRP this request describes
1051
1052 // Flags
1054
1055 // The major and minor function code for the request
1058
1059 // The device object
1061
1062 // The real device object
1064
1065 // The file object
1067
1070
1071 // If the request is top level
1073
1074 // Used if the request needs to be queued for later processing
1076
1077 // If an exception is currently in progress
1079
1080 // The exception code when an exception is in progress
1082
1084
1085
1086#define IRP_CONTEXT_FLAG_FROM_POOL (0x00000001)
1087#define IRP_CONTEXT_FLAG_WAIT (0x00000002)
1088#define IRP_CONTEXT_FLAG_WRITE_THROUGH (0x00000004)
1089#define IRP_CONTEXT_FLAG_FLOPPY (0x00000008)
1090#define IRP_CONTEXT_FLAG_DISABLE_POPUPS (0x00000020)
1091#define IRP_CONTEXT_FLAG_DEFERRED (0x00000040)
1092#define IRP_CONTEXT_FLAG_VERIFY_READ (0x00000080)
1093#define IRP_CONTEXT_STACK_IO_CONTEXT (0x00000100)
1094#define IRP_CONTEXT_FLAG_REQUEUED (0x00000200)
1095#define IRP_CONTEXT_FLAG_USER_IO (0x00000400)
1096#define IRP_CONTEXT_FLAG_DELAY_CLOSE (0x00000800)
1097#define IRP_CONTEXT_FLAG_FILE_BUSY (0x00001000)
1098
1099
1100#define Ext2CanIWait() (!IrpContext || IsFlagOn(IrpContext->Flags, IRP_CONTEXT_FLAG_WAIT))
1101
1102//
1103// EXT2_ALLOC_HEADER
1104//
1105// In the checked version of the driver this header is put in the beginning of
1106// every memory allocation
1107//
1108typedef struct _EXT2_ALLOC_HEADER {
1111
1112typedef struct _FCB_LIST_ENTRY {
1116
1117
1118// Block Description List
1119typedef struct _EXT2_EXTENT {
1126
1127
1128/* FUNCTIONS DECLARATION *****************************************************/
1129
1130// Include this so we don't need the latest WDK to build the driver.
1131#ifndef FSCTL_GET_RETRIEVAL_POINTER_BASE
1132#define FSCTL_GET_RETRIEVAL_POINTER_BASE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 141, METHOD_BUFFERED, FILE_ANY_ACCESS) // RETRIEVAL_POINTER_BASE
1133#endif
1134
1135#ifndef FILE_SUPPORTS_EXTENDED_ATTRIBUTES
1136#define FILE_SUPPORTS_EXTENDED_ATTRIBUTES 0x00800000
1137#endif
1138
1139//
1140// The following macro is used to determine if an FSD thread can block
1141// for I/O or wait for a resource. It returns TRUE if the thread can
1142// block and FALSE otherwise. This attribute can then be used to call
1143// the FSD & FSP common work routine with the proper wait value.
1144//
1145
1146#define CanExt2Wait(IRP) IoIsOperationSynchronous(Irp)
1147
1148//
1149// memory allocation statistics
1150//
1151
1152#ifdef __REACTOS__
1153static
1154#endif
1155__inline
1156VOID
1158{
1159 if (_n) {
1163 } else {
1166 }
1167}
1168
1169#ifdef __REACTOS__
1170static
1171#endif
1172__inline
1173VOID
1175{
1176 if (_n) {
1177 INC_MEM_COUNT(PS_IRP_CONTEXT, IrpContext, sizeof(EXT2_IRP_CONTEXT));
1178 InterlockedIncrement(&(Ext2Global->PerfStat.Irps[IrpContext->MajorFunction].Current));
1179 } else {
1180 DEC_MEM_COUNT(PS_IRP_CONTEXT, IrpContext, sizeof(EXT2_IRP_CONTEXT));
1181 InterlockedIncrement(&Ext2Global->PerfStat.Irps[IrpContext->MajorFunction].Processed);
1183 }
1184}
1185
1196
1197//
1198// Access.c
1199//
1200
1201
1202int Ext2CheckInodeAccess(PEXT2_VCB Vcb, struct inode *in, int attempt);
1203int Ext2CheckFileAccess (PEXT2_VCB Vcb, PEXT2_MCB Mcb, int attempt);
1204
1205//
1206// Block.c
1207//
1208
1209PMDL
1211 IN PVOID Buffer,
1212 IN ULONG Length,
1214);
1215
1216VOID
1218
1221 IN PIRP Irp,
1222 IN ULONG Length,
1224PVOID
1226
1227
1230 IN PEXT2_IRP_CONTEXT IrpContext,
1234 );
1235
1240 IN ULONG Length,
1242 IN BOOLEAN bVerify );
1243
1248 IN ULONG Size,
1249 IN PVOID Buffer,
1250 IN BOOLEAN bVerify );
1251
1254 IN PDEVICE_OBJECT DeviceOjbect,
1257 IN ULONG InputBufferSize,
1259 IN OUT PULONG OutputBufferSize );
1260
1261VOID
1263 IN PEXT2_IRP_CONTEXT IrpContext,
1265 IN BOOLEAN bPrevent );
1266
1269
1270
1271//
1272// Cleanup.c
1273//
1274
1276Ext2Cleanup (IN PEXT2_IRP_CONTEXT IrpContext);
1277
1278//
1279// Close.c
1280//
1281
1283Ext2Close (IN PEXT2_IRP_CONTEXT IrpContext);
1284
1285VOID
1287
1288#ifdef __REACTOS__
1289VOID NTAPI
1290#else
1291VOID
1292#endif
1294
1295//
1296// Cmcb.c
1297//
1298
1299#ifdef __REACTOS__
1301#else
1302BOOLEAN
1303#endif
1306 IN BOOLEAN Wait );
1307#ifdef __REACTOS__
1308VOID NTAPI
1309#else
1310VOID
1311#endif
1313
1314#ifdef __REACTOS__
1316#else
1317BOOLEAN
1318#endif
1321 IN BOOLEAN Wait );
1322
1323#ifdef __REACTOS__
1324VOID NTAPI
1325#else
1326VOID
1327#endif
1329
1330#ifdef __REACTOS__
1332#else
1333BOOLEAN
1334#endif
1336 IN PVOID Fcb,
1337 IN BOOLEAN Wait );
1338
1339#ifdef __REACTOS__
1340VOID NTAPI
1341#else
1342VOID
1343#endif
1345
1346//
1347// Create.c
1348//
1349
1350
1351BOOLEAN
1353
1356 IN PEXT2_IRP_CONTEXT IrpContext,
1360 IN ULONG Linkdep
1361);
1362
1365 IN PEXT2_IRP_CONTEXT IrpContext,
1369 OUT PULONG Inode,
1370 struct dentry **dentry
1371);
1372
1373BOOLEAN
1376 IN BOOLEAN bDirectory
1377);
1378
1379#define EXT2_LOOKUP_FLAG_MASK (0xFF00000)
1380#define EXT2_LOOKUP_NOT_FOLLOW (0x8000000)
1381
1384 IN PEXT2_IRP_CONTEXT IrpContext,
1388 OUT PEXT2_MCB * Ext2Mcb,
1389 IN ULONG Linkdep
1390);
1391
1394 IN PEXT2_IRP_CONTEXT IrpContext,
1396 OUT PBOOLEAN OpPostIrp
1397);
1398
1401 IN PEXT2_IRP_CONTEXT IrpContext,
1402 IN PEXT2_VCB Vcb );
1403
1405Ext2Create (IN PEXT2_IRP_CONTEXT IrpContext);
1406
1409 IN PEXT2_IRP_CONTEXT IrpContext,
1411 IN PEXT2_FCB pParentFcb,
1412 IN ULONG Type,
1415
1416
1419 IN PEXT2_IRP_CONTEXT IrpContext,
1425);
1426
1427//
1428// Debug.c
1429//
1430
1431/* debug levels */
1432#define DL_NVR 0
1433#define DL_VIT 0x00000001
1434#define DL_ERR 0x00000002
1435#define DL_DBG 0x00000004
1436#define DL_INF 0x00000008
1437#define DL_FUN 0x00000010
1438#define DL_LOW 0x00000020
1439#define DL_REN 0x00000040 /* renaming operation */
1440#define DL_RES 0x00000080 /* entry reference managment */
1441#define DL_BLK 0x00000100 /* data block allocation / free */
1442#define DL_CP 0x00000200 /* code pages (create, querydir) */
1443#define DL_EXT 0x00000400 /* mcb extents */
1444#define DL_MAP 0x00000800 /* retrieval points */
1445#define DL_JNL 0x00001000 /* dump journal operations */
1446#define DL_HTI 0x00002000 /* htree index */
1447#define DL_WRN 0x00004000 /* warning */
1448#define DL_BH 0x00008000 /* buffer head */
1449#define DL_PNP 0x00010000 /* pnp */
1450#define DL_IO 0x00020000 /* file i/o */
1451
1452#define DL_DEFAULT (DL_ERR|DL_VIT)
1453
1454#if EXT2_DEBUG
1455extern ULONG DebugFilter;
1456
1457VOID
1458__cdecl
1459Ext2NiPrintf(
1460 PCHAR DebugMessage,
1461 ...
1462);
1463
1464#define DEBUG(_DL, arg) do {if ((_DL) & DebugFilter) Ext2Printf arg;} while(0)
1465#define DEBUGNI(_DL, arg) do {if ((_DL) & DebugFilter) Ext2NiPrintf arg;} while(0)
1466
1467#define Ext2CompleteRequest(Irp, bPrint, PriorityBoost) \
1468 Ext2DbgPrintComplete(Irp, bPrint); \
1469 IoCompleteRequest(Irp, PriorityBoost)
1470
1471#else
1472
1473#define DEBUG(_DL, arg) do {if ((_DL) & DL_ERR) DbgPrint arg;} while(0)
1474
1475#define Ext2CompleteRequest(Irp, bPrint, PriorityBoost) \
1476 IoCompleteRequest(Irp, PriorityBoost)
1477
1478#endif // EXT2_DEBUG
1479
1480VOID
1481__cdecl
1483 PCHAR DebugMessage,
1484 ...
1485);
1486
1488
1489#define Ext2GetCurrentProcessName() ( \
1490 (PUCHAR) PsGetCurrentProcess() + ProcessNameOffset \
1491)
1492
1493ULONG
1495
1496VOID
1499 IN PIRP Irp );
1500
1501VOID
1503 IN PIRP Irp,
1504 IN BOOLEAN bPrint
1505);
1506
1507PUCHAR
1509
1513 IN ULONG Tag
1514);
1515
1516VOID
1518 IN PVOID P,
1519 IN ULONG Tag
1520);
1521
1522//
1523// Devctl.c
1524//
1525
1531);
1532
1538);
1539
1542 IN PEXT2_IRP_CONTEXT IrpContext,
1545);
1546
1549 IN PEXT2_IRP_CONTEXT IrpContext,
1550 IN PEXT2_QUERY_PERFSTAT QueryPerf,
1552);
1553
1556 IN PEXT2_IRP_CONTEXT IrpContext,
1557 IN PEXT2_MOUNT_POINT MountPoint,
1559);
1560
1563
1566
1569
1570//
1571// Dirctl.c
1572//
1573
1574ULONG
1576
1579 IN PEXT2_IRP_CONTEXT IrpContext,
1583 IN ULONG in,
1584 IN PVOID Buffer,
1585 IN ULONG UsedLength,
1586 IN ULONG Length,
1587 IN ULONG FileIndex,
1591);
1592
1593BOOLEAN
1596 IN POEM_STRING OeName
1597);
1598
1600
1603 IN PEXT2_IRP_CONTEXT IrpContext
1604);
1605
1606VOID
1608 IN PEXT2_IRP_CONTEXT IrpContext,
1611 IN ULONG Filter,
1613);
1614
1617
1618BOOLEAN
1620 IN PEXT2_IRP_CONTEXT IrpContext,
1623);
1624
1625//
1626// Dispatch.c
1627//
1628
1629#ifdef __REACTOS__
1630VOID NTAPI
1631#else
1632VOID
1633#endif
1636 IN PIRP Irp
1637);
1638
1639#ifdef __REACTOS__
1640VOID NTAPI
1641#else
1642VOID
1643#endif
1646 IN PIRP Irp
1647);
1648
1651
1652#ifdef __REACTOS__
1653VOID NTAPI
1654#else
1655VOID
1656#endif
1658
1661
1662#ifdef __REACTOS__
1664#else
1666#endif
1669 IN PIRP Irp
1670);
1671
1672//
1673// ea.c
1674//
1675
1678 IN PEXT2_IRP_CONTEXT IrpContext
1679);
1680
1681BOOLEAN
1684);
1685
1687Ext2SetEa(
1688 IN PEXT2_IRP_CONTEXT IrpContext
1689);
1690
1691
1692//
1693// Except.c
1694//
1695
1698 IN PEXT2_IRP_CONTEXT IrpContext,
1699 IN PEXCEPTION_POINTERS ExceptionPointer
1700);
1701
1704
1705
1706//
1707// Extents.c
1708//
1709
1710
1713 IN PEXT2_IRP_CONTEXT IrpContext,
1716 IN ULONG Index,
1718 OUT PULONG Block,
1720 );
1721
1724 PEXT2_IRP_CONTEXT IrpContext,
1725 PEXT2_VCB Vcb,
1726 PEXT2_MCB Mcb,
1727 ULONG Start,
1728 ULONG End,
1730 );
1731
1734 PEXT2_IRP_CONTEXT IrpContext,
1735 PEXT2_VCB Vcb,
1736 PEXT2_MCB Mcb,
1738 );
1739
1740
1741//
1742// generic.c
1743//
1744
1746{
1747 return ((ext3_fsblk_t)le32_to_cpu(es->s_blocks_count_hi) << 32) |
1748 le32_to_cpu(es->s_blocks_count);
1749}
1750
1752{
1753 return ((ext3_fsblk_t)le32_to_cpu(es->s_r_blocks_count_hi) << 32) |
1754 le32_to_cpu(es->s_r_blocks_count);
1755}
1756
1758{
1759 return ((ext3_fsblk_t)le32_to_cpu(es->s_free_blocks_count_hi) << 32) |
1760 le32_to_cpu(es->s_free_blocks_count);
1761}
1762
1763static inline void ext3_blocks_count_set(struct ext3_super_block *es,
1765{
1766 es->s_blocks_count = cpu_to_le32((u32)blk);
1767 es->s_blocks_count_hi = cpu_to_le32(blk >> 32);
1768}
1769
1772{
1773 es->s_free_blocks_count = cpu_to_le32((u32)blk);
1774 es->s_free_blocks_count_hi = cpu_to_le32(blk >> 32);
1775}
1776
1779{
1780 es->s_r_blocks_count = cpu_to_le32((u32)blk);
1781 es->s_r_blocks_count_hi = cpu_to_le32(blk >> 32);
1782}
1783
1784blkcnt_t ext3_inode_blocks(struct ext3_inode *raw_inode,
1785 struct inode *inode);
1786
1787int ext3_inode_blocks_set(struct ext3_inode *raw_inode,
1788 struct inode * inode);
1790 struct ext4_group_desc *bg);
1791
1793 struct ext4_group_desc *bg);
1795 struct ext4_group_desc *bg);
1797 struct ext4_group_desc *bg);
1799 struct ext4_group_desc *bg);
1801 struct ext4_group_desc *bg);
1803 struct ext4_group_desc *bg);
1805 struct ext4_group_desc *bg, ext4_fsblk_t blk);
1807 struct ext4_group_desc *bg, ext4_fsblk_t blk);
1809 struct ext4_group_desc *bg, ext4_fsblk_t blk);
1810void ext4_free_blks_set(struct super_block *sb,
1811 struct ext4_group_desc *bg, __u32 count);
1813 struct ext4_group_desc *bg, __u32 count);
1814void ext4_used_dirs_set(struct super_block *sb,
1815 struct ext4_group_desc *bg, __u32 count);
1817 struct ext4_group_desc *bg, __u32 count);
1818
1820unsigned long ext4_bg_num_gdb(struct super_block *sb, ext4_group_t group);
1821unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh,
1822 ext4_group_t block_group,
1823 struct ext4_group_desc *gdp);
1824unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
1825 ext4_group_t block_group, struct ext4_group_desc *gdp);
1827 ext4_group_t block_group, struct buffer_head **bh);
1829unsigned long ext4_count_free_inodes(struct super_block *sb);
1831
1837);
1838
1839
1840BOOLEAN
1842 IN PEXT2_IRP_CONTEXT IrpContext,
1844);
1845
1846BOOLEAN
1848 IN PEXT2_IRP_CONTEXT IrpContext,
1850);
1851
1852BOOLEAN
1854
1855BOOLEAN
1857
1858VOID
1860
1861VOID
1863
1864VOID
1866
1869
1870BOOLEAN
1872 IN PEXT2_IRP_CONTEXT IrpContext,
1874 IN ULONG Group
1875);
1876
1877BOOLEAN
1879 IN PEXT2_IRP_CONTEXT IrpContext,
1881);
1882
1883BOOLEAN
1886 IN ULONG inode,
1888);
1889
1890BOOLEAN
1893 IN struct inode *Inode
1894);
1895
1896BOOLEAN
1898 IN PEXT2_IRP_CONTEXT IrpContext,
1900 IN ULONG inode
1901);
1902
1903BOOLEAN
1905 IN PEXT2_IRP_CONTEXT IrpContext,
1907 IN struct inode *Inode
1908);
1909
1910BOOLEAN
1912 IN struct inode *Inode,
1913 IN PEXT2_INODE InodeXattr);
1914
1915BOOLEAN
1918 IN struct inode *Inode,
1919 IN PEXT2_INODE InodeXattr);
1920
1921BOOLEAN
1924 IN ULONG dwBlk,
1926);
1927
1928BOOLEAN
1930 IN PEXT2_IRP_CONTEXT IrpContext,
1932 IN ULONG dwBlk,
1933 IN PVOID Buf
1934);
1935
1936BOOLEAN
1938 IN PEXT2_IRP_CONTEXT IrpContext,
1941 IN ULONG Size,
1942 IN PVOID Buf
1943);
1944
1945BOOLEAN
1947 IN PEXT2_IRP_CONTEXT IrpContext,
1950 IN ULONG Size
1951);
1952
1953BOOLEAN
1955 IN PEXT2_IRP_CONTEXT IrpContext,
1958 IN ULONG Size,
1959 IN PVOID Buf
1960);
1961
1964 IN PEXT2_IRP_CONTEXT IrpContext,
1967 IN ULONG Base,
1968 IN ULONG Layer,
1969 IN ULONG Start,
1970 IN ULONG SizeArray,
1971 IN PULONG BlockArray,
1972 IN BOOLEAN bAlloc,
1973 IN OUT PULONG Hint,
1974 OUT PULONG Block,
1976);
1977
1980 IN PEXT2_IRP_CONTEXT IrpContext,
1983 IN ULONG Index,
1984 IN BOOLEAN bAlloc,
1985 OUT PULONG pBlock,
1987);
1988
1989VOID
1991 IN PEXT2_IRP_CONTEXT IrpContext,
1993);
1994
1997 IN PEXT2_IRP_CONTEXT IrpContext,
1999 IN ULONG GroupHint,
2000 IN ULONG BlockHint,
2001 OUT PULONG Block,
2003);
2004
2007 IN PEXT2_IRP_CONTEXT IrpContext,
2009 IN ULONG Block,
2011);
2012
2013
2016 IN PEXT2_IRP_CONTEXT IrpContext,
2018 IN ULONG GroupHint,
2019 IN ULONG Type,
2020 OUT PULONG Inode
2021);
2022
2025 IN PEXT2_IRP_CONTEXT IrpContext,
2027 IN ULONG Group
2028);
2029
2032 IN PEXT2_IRP_CONTEXT IrpContext,
2034 IN ULONG Inode,
2035 IN ULONG Type
2036);
2037
2040 IN PEXT2_IRP_CONTEXT IrpContext,
2043 IN struct inode *Inode,
2045 OUT struct dentry **dentry
2046);
2047
2050 IN PEXT2_IRP_CONTEXT IrpContext,
2055);
2056
2059 IN PEXT2_IRP_CONTEXT IrpContext,
2063);
2064
2067 IN PEXT2_IRP_CONTEXT IrpContext,
2070 IN ULONG OldParent,
2071 IN ULONG NewParent );
2072
2073
2076 IN PEXT2_IRP_CONTEXT IrpContext,
2079 IN ULONG Base,
2080 IN ULONG Start,
2081 IN ULONG Layer,
2082 IN ULONG SizeArray,
2083 IN PULONG BlockArray,
2084 IN PULONG Extra
2085);
2086
2088
2089int ext3_check_dir_entry (const char * function, struct inode * dir,
2090 struct ext3_dir_entry_2 * de,
2091 struct buffer_head * bh,
2092 unsigned long offset);
2093
2094loff_t ext3_max_size(int blkbits, int has_huge_files);
2095loff_t ext3_max_bitmap_size(int bits, int has_huge_files);
2096
2097
2098__le16 ext4_group_desc_csum(struct ext3_sb_info *sbi, __u32 block_group,
2099 struct ext4_group_desc *gdp);
2100int ext4_group_desc_csum_verify(struct ext3_sb_info *sbi, __u32 block_group,
2101 struct ext4_group_desc *gdp);
2102
2104 ext3_fsblk_t logical_sb_block, unsigned int nr);
2106 ext4_group_t block_group, struct buffer_head **bh);
2108
2109//
2110// Fastio.c
2111//
2112
2116);
2117
2118#ifdef __REACTOS__
2120#else
2121BOOLEAN
2122#endif
2126 IN ULONG Length,
2127 IN BOOLEAN Wait,
2132);
2133
2134
2135#ifdef __REACTOS__
2137#else
2138BOOLEAN
2139#endif
2142 IN ULONG Length,
2143 IN BOOLEAN Wait,
2148
2149#ifdef __REACTOS__
2151#else
2152BOOLEAN
2153#endif
2157 IN ULONG Length,
2158 IN BOOLEAN Wait,
2163
2164#ifdef __REACTOS__
2166#else
2167BOOLEAN
2168#endif
2171 IN BOOLEAN Wait,
2175
2176#ifdef __REACTOS__
2178#else
2179BOOLEAN
2180#endif
2183 IN BOOLEAN Wait,
2187
2188#ifdef __REACTOS__
2190#else
2191BOOLEAN
2192#endif
2198 IN ULONG Key,
2203);
2204
2205#ifdef __REACTOS__
2207#else
2208BOOLEAN
2209#endif
2215 IN ULONG Key,
2218);
2219
2220#ifdef __REACTOS__
2222#else
2223BOOLEAN
2224#endif
2230);
2231
2232#ifdef __REACTOS__
2234#else
2235BOOLEAN
2236#endif
2239#ifdef __REACTOS__
2241#else
2243#endif
2244 IN ULONG Key,
2247);
2248
2249
2250#ifdef __REACTOS__
2252#else
2253BOOLEAN
2254#endif
2257 IN BOOLEAN Wait,
2261
2262#ifdef __REACTOS__
2264#else
2265BOOLEAN
2266#endif
2269 IN BOOLEAN Wait,
2273
2274#ifdef __REACTOS__
2275VOID NTAPI
2276#else
2277VOID
2278#endif
2281);
2282
2283#ifdef __REACTOS__
2284VOID NTAPI
2285#else
2286VOID
2287#endif
2290);
2291
2292#ifdef __REACTOS__
2294#else
2296#endif
2302);
2303
2304#ifdef __REACTOS__
2306#else
2308#endif
2313);
2314
2315#ifdef __REACTOS__
2317#else
2319#endif
2323);
2324
2325#ifdef __REACTOS__
2327#else
2329#endif
2333);
2334
2335
2336#ifdef __REACTOS__
2338#else
2340#endif
2343 OUT PVOID *cc
2344 );
2345
2346//
2347// FileInfo.c
2348//
2349
2350
2353
2356
2357ULONG
2359 PEXT2_VCB Vcb,
2361 PULONG pMeta
2362);
2363
2366 PEXT2_IRP_CONTEXT IrpContext,
2367 PEXT2_VCB Vcb,
2368 PEXT2_MCB Mcb,
2370);
2371
2374 PEXT2_IRP_CONTEXT IrpContext,
2375 PEXT2_VCB Vcb,
2376 PEXT2_MCB Mcb,
2378
2381 IN PEXT2_IRP_CONTEXT IrpContext,
2385);
2386
2389 PEXT2_IRP_CONTEXT IrpContext,
2390 PEXT2_VCB Vcb,
2391 PEXT2_FCB Fcb,
2392 PEXT2_CCB Ccb,
2393 BOOLEAN bDelete
2394);
2395
2398 PEXT2_IRP_CONTEXT IrpContext,
2399 PEXT2_VCB Vcb,
2400 PEXT2_FCB Fcb,
2402);
2403
2406 PEXT2_IRP_CONTEXT IrpContext,
2407 PEXT2_VCB Vcb,
2408 PEXT2_FCB Fcb,
2410);
2411
2412ULONG
2414
2417 PEXT2_IRP_CONTEXT IrpContext,
2418 PEXT2_VCB Vcb,
2419 PEXT2_FCB Fcb,
2421);
2422
2423
2424//
2425// Flush.c
2426//
2427
2430 IN PEXT2_IRP_CONTEXT IrpContext,
2433);
2434
2437 IN PEXT2_IRP_CONTEXT IrpContext,
2440);
2441
2444 IN PEXT2_IRP_CONTEXT IrpContext,
2447);
2448
2450Ext2Flush (IN PEXT2_IRP_CONTEXT IrpContext);
2451
2452
2453//
2454// Fsctl.c
2455//
2456
2459 IN PEXT2_IRP_CONTEXT IrpContext,
2462 IN PVOID Buffer,
2463 IN ULONG Size,
2465 );
2466
2469 IN PEXT2_IRP_CONTEXT IrpContext,
2472 IN PVOID Buffer,
2473 IN ULONG Size,
2475);
2476
2479 PEXT2_IRP_CONTEXT IrpContext,
2480 PEXT2_VCB Vcb,
2481 PEXT2_MCB Mcb,
2482 ULONG Size
2483);
2484
2485//
2486// MountPoint process workitem
2487//
2488
2489VOID
2491 IN USHORT Flag );
2492
2493VOID
2495 IN USHORT Flag );
2496
2497BOOLEAN
2499 IN PEXT2_IRP_CONTEXT IrpContext,
2501 IN BOOLEAN bForce );
2502
2505 IN BOOLEAN FlushBeforePurge);
2506
2509 IN BOOLEAN FlushBeforePurge);
2510
2511BOOLEAN
2513
2517
2520
2524
2527
2530
2533
2536 IN PEXT2_IRP_CONTEXT IrpContext,
2539 IN PLARGE_INTEGER RequestVbn,
2540 OUT PLARGE_INTEGER * pMappedRuns
2541);
2542
2545
2548
2551
2554
2555BOOLEAN
2557 IN PEXT2_IRP_CONTEXT IrpContext,
2559);
2560
2563
2564VOID
2566 IN PEXT2_VCB Vcb );
2569
2572
2575
2578
2579//
2580// HTree.c
2581//
2582
2583struct buffer_head *ext3_append(struct ext2_icb *icb, struct inode *inode,
2584 ext3_lblk_t *block, int *err);
2585
2586void ext3_set_de_type(struct super_block *sb,
2587 struct ext3_dir_entry_2 *de,
2588 umode_t mode);
2589
2591void ext3_warning (struct super_block * sb, const char * function,
2592 char * fmt, ...);
2593#define ext3_error ext3_warning
2594#define ext4_error ext3_error
2595
2596void ext3_update_dx_flag(struct inode *inode);
2597int ext3_mark_inode_dirty(struct ext2_icb *icb, struct inode *in);
2598
2599void ext3_inc_count(struct inode *inode);
2600void ext3_dec_count(struct inode *inode);
2601
2602struct buffer_head *
2603 ext3_find_entry (struct ext2_icb *icb, struct dentry *dentry,
2604 struct ext3_dir_entry_2 ** res_dir);
2605struct buffer_head *
2607 struct ext3_dir_entry_2 **res_dir, int *err);
2608
2609typedef int (*filldir_t)(void *, const char *, int, unsigned long, __u32, unsigned);
2610int ext3_dx_readdir(struct file *filp, filldir_t filldir, void * context);
2611
2612struct buffer_head *ext3_bread(struct ext2_icb *icb, struct inode *inode,
2613 unsigned long block, int *err);
2614int add_dirent_to_buf(struct ext2_icb *icb, struct dentry *dentry,
2615 struct inode *inode, struct ext3_dir_entry_2 *de,
2616 struct buffer_head *bh);
2617#if !defined(__REACTOS__) || (defined(_MSC_VER) && !defined(__clang__))
2618/* FIXME: Inspect the clang-cl code path */
2619struct ext3_dir_entry_2 *
2620 do_split(struct ext2_icb *icb, struct inode *dir,
2621 struct buffer_head **bh,struct dx_frame *frame,
2622 struct dx_hash_info *hinfo, int *error);
2623#endif
2624
2625int ext3_add_entry(struct ext2_icb *icb, struct dentry *dentry, struct inode *inode);
2626
2627int ext3_delete_entry(struct ext2_icb *icb, struct inode *dir,
2628 struct ext3_dir_entry_2 *de_del,
2629 struct buffer_head *bh);
2630
2631int ext3_is_dir_empty(struct ext2_icb *icb, struct inode *inode);
2632
2633//
2634// Init.c
2635//
2636
2639BOOLEAN
2641
2642#ifdef __REACTOS__
2643VOID NTAPI
2644#else
2645VOID
2646#endif
2648
2649//
2650// Indirect.c
2651//
2652
2655 IN PEXT2_IRP_CONTEXT IrpContext,
2658 IN ULONG Index,
2659 IN BOOLEAN bAlloc,
2660 OUT PULONG pBlock,
2662);
2663
2666 PEXT2_IRP_CONTEXT IrpContext,
2667 PEXT2_VCB Vcb,
2668 PEXT2_MCB Mcb,
2669 ULONG Start,
2670 ULONG End,
2672);
2673
2676 PEXT2_IRP_CONTEXT IrpContext,
2677 PEXT2_VCB Vcb,
2678 PEXT2_MCB Mcb,
2680);
2681
2682
2683//
2684// linux.c: linux lib implemenation
2685//
2686
2687int
2689
2690void
2692
2693
2694//
2695// Lock.c
2696//
2697
2700
2701
2702//
2703// Memory.c
2704//
2705
2706#ifdef __REACTOS__
2707VOID NTAPI
2708#else
2709VOID
2710#endif
2713);
2714
2715#ifdef __REACTOS__
2716VOID NTAPI
2717#else
2718VOID
2719#endif
2722);
2723
2724#ifdef __REACTOS__
2725VOID NTAPI
2726#else
2727VOID
2728#endif
2731);
2732
2733
2736 IN PIRP Irp );
2737
2738VOID
2740
2741
2746);
2747
2748VOID
2750
2751VOID
2753VOID
2755
2756VOID
2758
2761
2762VOID
2766);
2767
2768VOID
2770
2773
2774VOID
2776
2777struct dentry * Ext2AllocateEntry();
2778VOID Ext2FreeEntry (IN struct dentry *de);
2780
2783
2784VOID
2786
2787ULONG
2789
2790VOID
2792 IN PEXT2_EXTENT Chain,
2794);
2795
2796VOID
2798
2801 IN PEXT2_IRP_CONTEXT IrpContext,
2805 IN ULONG Size,
2806 IN BOOLEAN bAlloc,
2807 OUT PEXT2_EXTENT * Chain
2808);
2809
2810BOOLEAN
2812
2813VOID
2815 PLARGE_MCB Zone,
2816 LONGLONG Vbn,
2817 LONGLONG Lbn,
2819 BOOLEAN bAdded
2820);
2821
2822VOID
2824
2825BOOLEAN
2828 IN LONGLONG Vbn,
2830);
2831
2832BOOLEAN
2835 IN LONGLONG Vbn,
2837);
2838
2839BOOLEAN
2842 IN LONGLONG Vbn,
2845);
2846
2847BOOLEAN
2851 IN LONGLONG Vbn,
2852 IN LONGLONG Lbn,
2854);
2855
2856BOOLEAN
2860 IN LONGLONG Vbn,
2862);
2863
2864BOOLEAN
2868 IN LONGLONG Vbn,
2871);
2872
2873BOOLEAN
2877 IN ULONG Block,
2879);
2880
2881BOOLEAN
2885 IN ULONG Block,
2887);
2888
2889BOOLEAN
2893 IN ULONG Start,
2894 IN ULONG Block,
2896);
2897
2898BOOLEAN
2902 IN ULONG Start,
2903 IN PULONG Block,
2904 IN PULONG Mapped
2905);
2906
2907BOOLEAN
2911 IN ULONG Start,
2913);
2914
2917 IN PEXT2_IRP_CONTEXT IrpContext,
2920);
2921
2922BOOLEAN
2927);
2928
2929
2936);
2937
2940 PEXT2_VCB Vcb,
2943);
2944
2949);
2950
2951VOID
2953 PEXT2_VCB Vcb,
2956);
2957
2958BOOLEAN
2960 PEXT2_VCB Vcb,
2962);
2963
2964VOID
2967);
2968
2969BOOLEAN
2971 PEXT2_IRP_CONTEXT IrpContext,
2972 PEXT2_VCB Vcb, LONGLONG Block
2973);
2974
2975BOOLEAN
2977 PEXT2_IRP_CONTEXT IrpContext,
2979);
2980
2981VOID
2983
2984VOID
2986
2991);
2992
2995 PEXT2_IRP_CONTEXT IrpContext,
2996 PEXT2_VCB Vcb,
2997 PEXT2_SUPER_BLOCK Ext2Sb,
2999 PDEVICE_OBJECT VolumeDevice,
3000 PVPB Vpb );
3001
3002VOID
3004
3005VOID
3007
3010 IN PEXT2_IRP_CONTEXT IrpContext,
3011 IN NTSTATUS Status );
3012
3013VOID
3016
3017VOID
3019
3020
3021VOID
3023
3024VOID
3026
3029 PEXT2_VCB Vcb,
3030 BOOLEAN Wait,
3032);
3033
3034#ifdef __REACTOS__
3035VOID NTAPI
3036#else
3037VOID
3038#endif
3041);
3042
3045#ifdef __REACTOS__
3046VOID NTAPI
3047#else
3048VOID
3049#endif
3051
3052//
3053// Misc.c
3054//
3055
3056ULONG
3058
3060Ext2NtTime (IN ULONG i_time);
3061
3062ULONG
3064
3065ULONG
3068 IN PANSI_STRING Oem
3069);
3070
3075 IN POEM_STRING Unicode
3076);
3077
3078ULONG
3081 IN PUNICODE_STRING Unicode
3082);
3083
3087 IN OUT POEM_STRING Oem,
3088 IN PUNICODE_STRING Unicode
3089);
3090
3091VOID
3092Ext2Sleep(ULONG ms);
3093
3095NTSTATUS Ext2WinntError(int rc);
3096
3099//
3100// nls/nls_rtl.c
3101//
3102
3103int
3105
3106VOID
3108
3109//
3110// Pnp.c
3111//
3112
3115
3118 PEXT2_IRP_CONTEXT IrpContext,
3119 PEXT2_VCB Vcb );
3120
3123 PEXT2_IRP_CONTEXT IrpContext,
3124 PEXT2_VCB Vcb );
3125
3128 PEXT2_IRP_CONTEXT IrpContext,
3129 PEXT2_VCB Vcb );
3130
3133 PEXT2_IRP_CONTEXT IrpContext,
3134 PEXT2_VCB Vcb );
3135
3136
3137//
3138// Read.c
3139//
3140
3143 IN PEXT2_IRP_CONTEXT IrpContext,
3147 IN PVOID Buffer,
3148 IN ULONG Size,
3149 IN BOOLEAN bDirectIo,
3150 OUT PULONG dwReturn
3151);
3152
3154Ext2Read (IN PEXT2_IRP_CONTEXT IrpContext);
3155
3156
3157//
3158// ext3\recover.c
3159//
3160
3163 PEXT2_VCB Vcb,
3164 ULONG jNo
3165);
3166
3167INT
3169 PEXT2_VCB Vcb,
3170 PULONG jNo
3171);
3172
3173INT
3175 PEXT2_IRP_CONTEXT IrpContext,
3177);
3178
3179//
3180// Shutdown.c
3181//
3182
3183
3185Ext2ShutDown (IN PEXT2_IRP_CONTEXT IrpContext);
3186
3187
3188//
3189// Volinfo.c
3190//
3191
3194
3197
3198//
3199// Write.c
3200//
3201
3202typedef struct _EXT2_RW_CONTEXT {
3212
3214
3215#define EXT2_RW_CONTEXT_WRITE 1
3216
3219 IN PEXT2_IRP_CONTEXT IrpContext,
3223 IN PVOID Buffer,
3224 IN ULONG Size,
3225 IN BOOLEAN bDirectIo,
3226 OUT PULONG dwReturn
3227);
3228
3229
3230VOID
3232 PEXT2_VCB Vcb,
3233 PEXT2_FCB Fcb,
3235
3236BOOLEAN
3238 IN PEXT2_IRP_CONTEXT IrpContext,
3242 IN PLARGE_INTEGER End );
3243
3245Ext2Write (IN PEXT2_IRP_CONTEXT IrpContext);
3246
3247#endif /* _EXT2_HEADER_ */
unsigned char BOOLEAN
InitDirComponents & cd
Type
Definition: Type.h:7
#define __cdecl
Definition: accygwin.h:79
#define VOID
Definition: acefi.h:82
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn UINT32 *TableIdx UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER void *Data ACPI_OBJECT_HANDLER void **Data ACPI_STRING ACPI_OBJECT_LIST ACPI_BUFFER *ReturnObjectBuffer ACPI_DEVICE_INFO **ReturnBuffer ACPI_HANDLE Parent
Definition: acpixf.h:732
unsigned int dir
Definition: maze.c:112
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
LONG NTSTATUS
Definition: precomp.h:26
long uid_t
Definition: various.h:8
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
ULONG32 u32
Definition: btrfs.h:14
u32 __u32
Definition: btrfs.h:19
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:160
_In_ PFCB Fcb
Definition: cdprocs.h:159
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
Definition: cdprocs.h:592
Definition: bufpool.h:45
Definition: File.h:16
_In_ PIRP Irp
Definition: csq.h:116
UINT gid_t
Definition: types.h:89
#define P(row, col)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
superblock * sb
Definition: btrfs.c:4261
#define HIDINGPAT_LEN
Definition: common.h:160
#define CODEPAGE_MAXLEN
Definition: common.h:159
#define PS_IRP_CONTEXT
Definition: common.h:16
#define __le16
Definition: types.h:43
unsigned __int64 blkcnt_t
Definition: types.h:83
unsigned short umode_t
Definition: types.h:75
unsigned __int64 loff_t
Definition: types.h:84
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB * Dcb
Definition: create.c:4140
ERESOURCE * PERESOURCE
Definition: env_spec_w32.h:595
ULONG ERESOURCE
Definition: env_spec_w32.h:594
NTSTATUS Ext2InitializeLabel(IN PEXT2_VCB Vcb, IN PEXT2_SUPER_BLOCK Sb)
Definition: memory.c:2253
NTSTATUS Ext2BlockMap(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Index, IN BOOLEAN bAlloc, OUT PULONG pBlock, OUT PULONG Number)
Definition: fileinfo.c:1127
NTSTATUS Ext2ExceptionHandler(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: except.c:112
VOID Ext2FreeMcb(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
Definition: memory.c:1538
NTSTATUS Ext2FlushVcb(IN PEXT2_VCB Vcb)
Definition: generic.c:323
NTSTATUS Ext2PnpQueryRemove(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
VOID Ext2FreePool(IN PVOID P, IN ULONG Tag)
Definition: debug.c:2697
BOOLEAN Ext2SaveInodeXattr(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN struct inode *Inode, IN PEXT2_INODE InodeXattr)
Definition: generic.c:621
NTSTATUS Ext2QueryEa(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: ea.c:94
NTSTATUS Ext2Pnp(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2UnlockVolume(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:241
struct ext2_icb EXT2_IRP_CONTEXT
static void ext3_r_blocks_count_set(struct ext3_super_block *es, ext3_fsblk_t blk)
Definition: ext2fs.h:1777
struct ext3_dir_entry_2 * PEXT2_DIR_ENTRY2
Definition: ext2fs.h:109
BOOLEAN Ext2LookupMcbExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN LONGLONG Vbn, OUT PLONGLONG Lbn, OUT PLONGLONG Length)
Definition: memory.c:897
NTSTATUS Ext2IsFileRemovable(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Fcb, IN PEXT2_CCB Ccb)
Definition: fileinfo.c:1239
BOOLEAN Ext2IsHandleCountZero(IN PEXT2_VCB Vcb)
Definition: fsctl.c:68
NTSTATUS Ext2QueryRetrievalPointers(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:774
VOID Ext2OplockComplete(IN PVOID Context, IN PIRP Irp)
Definition: dispatch.c:45
void ext4_used_dirs_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
Definition: generic.c:2555
ext4_fsblk_t ext4_block_bitmap(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2459
NTSTATUS Ext2ExceptionFilter(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXCEPTION_POINTERS ExceptionPointer)
Definition: except.c:21
NTSTATUS Ext2ExpandIndirect(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, ULONG Start, ULONG End, PLARGE_INTEGER Size)
Definition: indirect.c:948
NTSTATUS Ext2Flush(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: flush.c:148
VOID Ext2JointExtents(IN PEXT2_EXTENT Chain, IN PEXT2_EXTENT Extent)
Definition: memory.c:527
BOOLEAN Ext2FastIoRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:172
VOID Ext2SyncUninitializeCacheMap(IN PFILE_OBJECT FileObject)
Definition: memory.c:2883
#define EXT2_BLOCK_TYPES
Definition: ext2fs.h:77
VOID Ext2RemoveVcb(PEXT2_VCB Vcb)
Definition: memory.c:1943
void ext4_block_bitmap_set(struct super_block *sb, struct ext4_group_desc *bg, ext4_fsblk_t blk)
Definition: generic.c:2515
VOID Ext2ReleaseFcb(IN PEXT2_FCB Fcb)
Definition: memory.c:276
BOOLEAN Ext2ZeroData(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER Start, IN PLARGE_INTEGER End)
Definition: write.c:186
NTSTATUS Ext2ShutDown(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: shutdown.c:25
BOOLEAN Ext2FastIoLock(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN PLARGE_INTEGER Length, IN PEPROCESS Process, IN ULONG Key, IN BOOLEAN FailImmediately, IN BOOLEAN ExclusiveLock, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:517
NTSTATUS Ext2WinntError(int rc)
Definition: misc.c:410
BOOLEAN Ext2AddMcbMetaExts(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Block, IN ULONG Length)
Definition: memory.c:941
struct _EXT2_IDENTIFIER EXT2_IDENTIFIER
VOID Ext2DropGroupBH(IN PEXT2_VCB Vcb)
Definition: generic.c:132
VOID Ext2bhReaperThread(PVOID Context)
Definition: memory.c:3239
VOID Ext2McbReaperThread(PVOID Context)
Definition: memory.c:3055
NTSTATUS Ext2TruncateExtent(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, PLARGE_INTEGER Size)
Definition: extents.c:200
ext4_fsblk_t ext4_count_free_blocks(struct super_block *sb)
Definition: generic.c:3033
struct _EXT2_CCB EXT2_CCB
BOOLEAN Ext2IsDotDot(PUNICODE_STRING name)
Definition: misc.c:529
NTSTATUS Ext2UnlockVcb(IN PEXT2_VCB Vcb, IN PFILE_OBJECT FileObject)
Definition: fsctl.c:206
NTSTATUS Ext2GetBlock(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Base, IN ULONG Layer, IN ULONG Start, IN ULONG SizeArray, IN PULONG BlockArray, IN BOOLEAN bAlloc, IN OUT PULONG Hint, OUT PULONG Block, OUT PULONG Number)
Definition: indirect.c:136
NTSTATUS Ext2ReadInode(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)
Definition: read.c:311
BOOLEAN Ext2FastIoQueryBasicInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_BASIC_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:280
struct _EXT2_EXTENT EXT2_EXTENT
BOOLEAN Ext2FastIoUnlockAllByKey(IN PFILE_OBJECT FileObject, IN PEPROCESS Process, IN ULONG Key, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:831
PEXT2_IRP_CONTEXT Ext2AllocateIrpContext(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: memory.c:35
VOID Ext2DestroyInode(IN PEXT2_VCB Vcb, IN PEXT2_INODE inode)
Definition: memory.c:406
VOID Ext2FreeFcb(IN PEXT2_FCB Fcb)
Definition: memory.c:240
__u32 ext3_current_time(struct inode *in)
Definition: htree.c:204
ext4_fsblk_t ext4_inode_bitmap(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2467
NTSTATUS Ext2StartReaper(PEXT2_REAPER, EXT2_REAPER_RELEASE)
Definition: memory.c:3478
struct ext3_dir_entry_2 * do_split(struct ext2_icb *icb, struct inode *dir, struct buffer_head **bh, struct dx_frame *frame, struct dx_hash_info *hinfo, int *error)
NTSTATUS Ext2OplockRequest(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:451
static ext3_fsblk_t ext3_blocks_count(struct ext3_super_block *es)
Definition: ext2fs.h:1745
IO_STACK_LOCATION EXTENDED_IO_STACK_LOCATION
Definition: ext2fs.h:174
NTSTATUS Ext2QueryExtentMappings(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Fcb, IN PLARGE_INTEGER RequestVbn, OUT PLARGE_INTEGER *pMappedRuns)
Definition: fsctl.c:670
struct buffer_head * ext3_dx_find_entry(struct ext2_icb *, struct dentry *dentry, struct ext3_dir_entry_2 **res_dir, int *err)
struct _EXT2_GLOBAL EXT2_GLOBAL
int ext3_check_dir_entry(const char *function, struct inode *dir, struct ext3_dir_entry_2 *de, struct buffer_head *bh, unsigned long offset)
Definition: generic.c:2209
NTSTATUS Ext2CreateVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
struct ext4_group_desc * ext4_get_group_desc(struct super_block *sb, ext4_group_t block_group, struct buffer_head **bh)
Definition: generic.c:2976
static void ext3_blocks_count_set(struct ext3_super_block *es, ext3_fsblk_t blk)
Definition: ext2fs.h:1763
static ext3_fsblk_t ext3_free_blocks_count(struct ext3_super_block *es)
Definition: ext2fs.h:1757
void ext4_inode_table_set(struct super_block *sb, struct ext4_group_desc *bg, ext4_fsblk_t blk)
Definition: generic.c:2531
PVOID Ext2AllocatePool(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
Definition: debug.c:2684
BOOLEAN Ext2SaveBuffer(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN LONGLONG Offset, IN ULONG Size, IN PVOID Buf)
Definition: generic.c:928
int ext3_mark_inode_dirty(struct ext2_icb *icb, struct inode *in)
Definition: htree.c:360
NTSTATUS Ext2NewBlock(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG GroupHint, IN ULONG BlockHint, OUT PULONG Block, IN OUT PULONG Number)
Definition: generic.c:1008
BOOLEAN Ext2FastIoWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:207
struct dentry * Ext2AllocateEntry()
Definition: memory.c:416
static ext3_fsblk_t ext3_r_blocks_count(struct ext3_super_block *es)
Definition: ext2fs.h:1751
_EXT2_IDENTIFIER_TYPE
Definition: ext2fs.h:451
@ EXT2FCB
Definition: ext2fs.h:463
@ EXT2ICX
Definition: ext2fs.h:465
@ EXT2FSD
Definition: ext2fs.h:466
@ EXT2VCB
Definition: ext2fs.h:462
@ EXT2MCB
Definition: ext2fs.h:467
@ EXT2FGD
Definition: ext2fs.h:461
@ EXT2CCB
Definition: ext2fs.h:464
NTSTATUS Ext2ScanDir(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Parent, IN PUNICODE_STRING FileName, OUT PULONG Inode, struct dentry **dentry)
struct _FCB_LIST_ENTRY * PFCB_LIST_ENTRY
NTSTATUS Ext2CreateFile(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, OUT PBOOLEAN OpPostIrp)
struct buffer_head * ext3_find_entry(struct ext2_icb *icb, struct dentry *dentry, struct ext3_dir_entry_2 **res_dir)
Definition: htree.c:2166
BOOLEAN Ext2AcquireForLazyWrite(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:27
NTSTATUS Ext2PurgeVolume(IN PEXT2_VCB Vcb, IN BOOLEAN FlushBeforePurge)
Definition: fsctl.c:2704
VOID Ext2DbgPrintComplete(IN PIRP Irp, IN BOOLEAN bPrint)
NTSTATUS Ext2ExpandExtent(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, ULONG Start, ULONG End, PLARGE_INTEGER Size)
Definition: extents.c:151
NTSTATUS Ext2FreeBlock(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Block, IN ULONG Number)
Definition: generic.c:1217
__u32 ext4_used_dirs_count(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2499
BOOLEAN Ext2LoadBuffer(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN LONGLONG Offset, IN ULONG Size, IN PVOID Buf)
Definition: generic.c:733
BOOLEAN Ext2SaveBlock(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG dwBlk, IN PVOID Buf)
Definition: generic.c:698
INT Ext2CheckJournal(PEXT2_VCB Vcb, PULONG jNo)
Definition: recover.c:55
VOID Ext2MediaEjectControl(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bPrevent)
Definition: block.c:685
NTSTATUS Ext2TruncateFile(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, PLARGE_INTEGER AllocationSize)
Definition: fileinfo.c:1204
BOOLEAN Ext2LoadInodeXattr(IN PEXT2_VCB Vcb, IN struct inode *Inode, IN PEXT2_INODE InodeXattr)
Definition: generic.c:590
VOID Ext2DestroyExtentChain(IN PEXT2_EXTENT Chain)
Definition: memory.c:546
ULONG Ext2GetProcessNameOffset(VOID)
struct ext3_dir_entry * PEXT2_DIR_ENTRY
Definition: ext2fs.h:108
NTSTATUS Ext2InitializeZone(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
Definition: memory.c:1121
NTSTATUS Ext2FreeInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Inode, IN ULONG Type)
Definition: generic.c:1766
struct _EXT2_VCB EXT2_VCB
PEXT2_EXTENT Ext2AllocateExtent()
Definition: memory.c:488
BOOLEAN Ext2IsMediaWriteProtected(IN PEXT2_IRP_CONTEXT IrpContext, IN PDEVICE_OBJECT TargetDevice)
Definition: fsctl.c:2005
VOID Ext2TearDownStream(IN PEXT2_VCB Vcb)
Definition: memory.c:2798
NTSTATUS Ext2Cleanup(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: cleanup.c:21
struct ext3_inode * PEXT2_INODE
Definition: ext2fs.h:106
LARGE_INTEGER Ext2NtTime(IN ULONG i_time)
Definition: misc.c:40
NTSTATUS Ext2SetLinkInfo(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_FCB Fcb, PEXT2_CCB Ccb)
Definition: fileinfo.c:1665
NTSTATUS Ext2VerifyVolume(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:2378
VOID Ext2FreeExtent(IN PEXT2_EXTENT Extent)
Definition: memory.c:505
BOOLEAN Ext2SaveInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN struct inode *Inode)
Definition: generic.c:552
NTSTATUS Ext2ReleaseFileForModWrite(IN PFILE_OBJECT FileObject, IN PERESOURCE ResourceToRelease, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1110
__inline VOID Ext2TraceMemory(BOOLEAN _n, int _i, PVOID _p, LONG _s)
Definition: ext2fs.h:1157
PEXT2_MCB Ext2SearchMcbWithoutLock(PEXT2_MCB Parent, PUNICODE_STRING FileName)
Definition: memory.c:1622
VOID Ext2AcquireForCreateSection(IN PFILE_OBJECT FileObject)
Definition: fastio.c:1043
PEXT2_GLOBAL Ext2Global
Definition: init.c:16
struct _EXT2_FILLDIR_CONTEXT * PEXT2_FILLDIR_CONTEXT
NTSTATUS Ext2DeleteFile(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_FCB Fcb, PEXT2_MCB Mcb)
Definition: fileinfo.c:1920
NTSTATUS Ext2DirectoryControl(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: dirctl.c:1236
VOID Ext2Sleep(ULONG ms)
Definition: misc.c:297
BOOLEAN Ext2LoadGroup(IN PEXT2_VCB Vcb)
Definition: generic.c:207
NTSTATUS Ext2QueueRequest(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: dispatch.c:158
VOID Ext2UnlinkMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
Definition: memory.c:2957
NTSTATUS Ext2TruncateBlock(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Base, IN ULONG Start, IN ULONG Layer, IN ULONG SizeArray, IN PULONG BlockArray, IN PULONG Extra)
Definition: indirect.c:632
NTSTATUS Ext2DeviceControlNormal(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: devctl.c:65
#define DEC_MEM_COUNT(_i, _p, _s)
Definition: ext2fs.h:608
struct _EXT2_REAPER * PEXT2_REAPER
VOID Ext2ReleaseFromLazyWrite(IN PVOID Context)
Definition: cmcb.c:63
struct ext3_super_block * PEXT2_SUPER_BLOCK
Definition: ext2fs.h:105
NTSTATUS Ext2Create(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: create.c:1951
NTSTATUS Ext2SetRenameInfo(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_FCB Fcb, PEXT2_CCB Ccb)
Definition: fileinfo.c:1325
ext4_fsblk_t ext4_inode_table(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2475
BOOLEAN Ext2FastIoQueryStandardInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_STANDARD_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:396
int ext3_is_dir_empty(struct ext2_icb *icb, struct inode *inode)
Definition: htree.c:2038
BOOLEAN Ext2IsDot(PUNICODE_STRING name)
Definition: misc.c:524
NTSTATUS Ext2SupersedeOrOverWriteFile(IN PEXT2_IRP_CONTEXT IrpContext, IN PFILE_OBJECT FileObject, IN PEXT2_VCB Vcb, IN PEXT2_FCB Fcb, IN PLARGE_INTEGER AllocationSize, IN ULONG Disposition)
Definition: create.c:2137
NTSTATUS Ext2Read(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: read.c:863
NTSTATUS Ext2TruncateSymlink(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, ULONG Size)
Definition: fsctl.c:1751
int ext3_dx_readdir(struct file *filp, filldir_t filldir, void *context)
struct _EXT2_IDENTIFIER * PEXT2_IDENTIFIER
NTSTATUS Ext2ProcessUserProperty(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VOLUME_PROPERTY3 Property, IN ULONG Length)
Definition: devctl.c:591
int ext3_inode_blocks_set(struct ext3_inode *raw_inode, struct inode *inode)
Definition: generic.c:2418
BOOLEAN Ext2CheckDismount(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bForce)
Definition: fsctl.c:2592
BOOLEAN Ext2IsSpecialSystemFile(IN PUNICODE_STRING FileName, IN BOOLEAN bDirectory)
Definition: create.c:224
NTSTATUS Ex2ProcessMountPoint(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_MOUNT_POINT MountPoint, IN ULONG Length)
Definition: devctl.c:723
NTSTATUS Ext2AllowExtendedDasdIo(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:407
BOOLEAN Ext2RemoveBlockExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Start, IN ULONG Number)
Definition: memory.c:1097
ULONG Ext2Log2(ULONG Value)
Definition: misc.c:25
NTSTATUS Ext2ReadSync(IN PEXT2_VCB Vcb, IN ULONGLONG Offset, IN ULONG Length, OUT PVOID Buffer, IN BOOLEAN bVerify)
NTSTATUS Ext2GetRetrievalPointers(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:911
VOID Ext2UnloadAllNls()
Definition: nls.c:181
BOOLEAN Ext2RemoveMcbExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG Length)
Definition: memory.c:848
NTSTATUS Ext2OEMToUnicode(IN PEXT2_VCB Vcb, IN OUT PUNICODE_STRING Oem, IN POEM_STRING Unicode)
Definition: misc.c:206
VOID Ext2LinkHeadMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
Definition: memory.c:2935
BOOLEAN Ext2IsWearingCloak(IN PEXT2_VCB Vcb, IN POEM_STRING OeName)
Definition: dirctl.c:372
BOOLEAN Ext2NoOpAcquire(IN PVOID Fcb, IN BOOLEAN Wait)
Definition: cmcb.c:138
NTSTATUS Ext2ReleaseFileForCcFlush(IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1156
NTSTATUS Ext2WriteSymlink(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN PVOID Buffer, IN ULONG Size, OUT PULONG BytesWritten)
Definition: fsctl.c:1519
struct _EXT2_MCB * PEXT2_MCB
Definition: ext2fs.h:484
NTSTATUS Ext2BuildExtents(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONGLONG Offset, IN ULONG Size, IN BOOLEAN bAlloc, OUT PEXT2_EXTENT *Chain)
Definition: memory.c:1207
__u32 ext4_free_inodes_count(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2491
NTSTATUS Ext2SetFileInformation(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fileinfo.c:514
BOOLEAN Ext2QueryRegistrySettings(IN PUNICODE_STRING RegistryPath)
Definition: init.c:305
VOID Ext2LinkTailMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
Definition: memory.c:2912
NTSTATUS Ext2QueryDirectory(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: dirctl.c:525
NTSTATUS Ext2QueryVolumeInformation(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: volinfo.c:27
NTSTATUS Ext2MapExtent(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Index, IN BOOLEAN Alloc, OUT PULONG Block, OUT PULONG Number)
Definition: extents.c:25
VOID Ext2ClearVpbFlag(IN PVPB Vpb, IN USHORT Flag)
Definition: fsctl.c:56
struct dentry * Ext2BuildEntry(PEXT2_VCB Vcb, PEXT2_MCB Dcb, PUNICODE_STRING FileName)
Definition: memory.c:444
ULONG ProcessNameOffset
loff_t ext3_max_size(int blkbits, int has_huge_files)
Definition: generic.c:2301
void ext3_warning(struct super_block *sb, const char *function, char *fmt,...)
Definition: htree.c:212
unsigned long ext4_bg_num_gdb(struct super_block *sb, ext4_group_t group)
Definition: generic.c:2722
NTSTATUS Ext2ReadSymlink(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN PVOID Buffer, IN ULONG Size, OUT PULONG BytesRead)
Definition: fsctl.c:1364
NTSTATUS Ext2LockVcb(IN PEXT2_VCB Vcb, IN PFILE_OBJECT FileObject)
Definition: fsctl.c:94
struct buffer_head * ext3_bread(struct ext2_icb *icb, struct inode *inode, unsigned long block, int *err)
Definition: htree.c:230
void ext4_free_blks_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
Definition: generic.c:2539
ULONG Ext2UnicodeToOEMSize(IN PEXT2_VCB Vcb, IN PUNICODE_STRING Unicode)
Definition: misc.c:239
BOOLEAN Ext2LookupVcbExtent(IN PEXT2_VCB Vcb, IN LONGLONG Vbn, OUT PLONGLONG Lbn, OUT PLONGLONG Length)
Definition: memory.c:747
VOID Ext2FreeIrpContext(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: memory.c:114
struct ext2_icb * PEXT2_IRP_CONTEXT
INT Ext2RecoverJournal(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
Definition: recover.c:95
ULONG Ext2LinuxTime(IN LARGE_INTEGER SysTime)
Definition: misc.c:51
int ext3_add_entry(struct ext2_icb *icb, struct dentry *dentry, struct inode *inode)
Definition: htree.c:1946
NTSTATUS Ext2LockControl(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: lock.c:25
NTSTATUS Ext2LockUserBuffer(IN PIRP Irp, IN ULONG Length, IN LOCK_OPERATION Operation)
Definition: block.c:113
BOOLEAN Ext2RemoveMcbMetaExts(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Block, IN ULONG Length)
Definition: memory.c:985
int Ext2LoadAllNls()
Definition: nls.c:118
struct _EXT2_FCBVCB EXT2_FCBVCB
BOOLEAN Ext2LoadGroupBH(IN PEXT2_VCB Vcb)
Definition: generic.c:170
NTSTATUS Ext2DismountVolume(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:2521
int ext3_bg_has_super(struct super_block *sb, ext3_group_t group)
Definition: generic.c:2686
BOOLEAN Ext2IsNameValid(PUNICODE_STRING FileName)
Definition: create.c:36
void ext3_dec_count(struct inode *inode)
Definition: htree.c:312
NTSTATUS Ext2SetParentEntry(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN ULONG OldParent, IN ULONG NewParent)
Definition: generic.c:2098
NTSTATUS Ext2FlushFile(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_FCB Fcb, IN PEXT2_CCB Ccb)
Definition: flush.c:58
struct _EXT2_FCBVCB * PEXT2_FCBVCB
ULONG Ext2InodeType(PEXT2_MCB Mcb)
Definition: fileinfo.c:1906
NTSTATUS Ext2PreAcquireForCreateSection(IN PFS_FILTER_CALLBACK_DATA cd, OUT PVOID *cc)
Definition: fastio.c:1178
VOID Ext2DestroyVcb(IN PEXT2_VCB Vcb)
Definition: memory.c:2825
BOOLEAN Ext2AcquireForReadAhead(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:92
VOID Ext2VerifyVcb(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
Definition: fsctl.c:2277
BOOLEAN Ext2ZeroBuffer(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN LONGLONG Offset, IN ULONG Size)
Definition: generic.c:795
VOID Ext2UnlinkFcb(IN PEXT2_FCB Fcb)
Definition: memory.c:202
NTSTATUS Ext2PrepareToUnload(IN PEXT2_IRP_CONTEXT IrpContext)
NTSTATUS Ext2InitializeVcb(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_SUPER_BLOCK Ext2Sb, PDEVICE_OBJECT TargetDevice, PDEVICE_OBJECT VolumeDevice, PVPB Vpb)
NTSTATUS Ext2AcquireFileForCcFlush(IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1135
NTSTATUS Ext2Close(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: close.c:26
NTSTATUS Ext2FileSystemControl(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:2848
PVOID Ext2GetUserBuffer(IN PIRP Irp)
Definition: block.c:146
__u32 ext4_itable_unused_count(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2507
NTSTATUS Ext2SetDispositionInfo(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_FCB Fcb, PEXT2_CCB Ccb, BOOLEAN bDelete)
Definition: fileinfo.c:1282
VOID Ext2NotifyReportChange(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Filter, IN ULONG Action)
Definition: dirctl.c:1209
VOID Ext2ReleaseFromReadAhead(IN PVOID Context)
Definition: cmcb.c:117
enum _EXT2_IDENTIFIER_TYPE EXT2_IDENTIFIER_TYPE
__inline VOID Ext2TraceIrpContext(BOOLEAN _n, PEXT2_IRP_CONTEXT IrpContext)
Definition: ext2fs.h:1174
void ext2_destroy_linux()
Definition: linux.c:1019
unsigned long ext4_count_free_inodes(struct super_block *sb)
Definition: generic.c:3054
struct buffer_head * ext3_append(struct ext2_icb *icb, struct inode *inode, ext3_lblk_t *block, int *err)
Definition: htree.c:279
BOOLEAN Ext2FastIoUnlockAll(IN PFILE_OBJECT FileObject, IN PEPROCESS Process, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:736
struct _EXT2_ALLOC_HEADER * PEXT2_ALLOC_HEADER
NTSTATUS Ext2NotifyChangeDirectory(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: dirctl.c:1029
PEXT2_MCB Ext2LoadInternalJournal(PEXT2_VCB Vcb, ULONG jNo)
Definition: recover.c:29
int ext2_init_linux()
Definition: linux.c:1004
NTSTATUS Ext2SetVolumeInformation(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: volinfo.c:292
blkcnt_t ext3_inode_blocks(struct ext3_inode *raw_inode, struct inode *inode)
Definition: generic.c:2395
BOOLEAN Ext2SaveSuper(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
Definition: generic.c:67
BOOLEAN Ext2CheckSetBlock(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, LONGLONG Block)
Definition: memory.c:1848
static void ext3_free_blocks_count_set(struct ext3_super_block *es, ext3_fsblk_t blk)
Definition: ext2fs.h:1770
NTSTATUS Ext2DiskShutDown(PEXT2_VCB Vcb)
Definition: block.c:748
NTSTATUS Ext2ReadDisk(IN PEXT2_VCB Vcb, IN ULONGLONG Offset, IN ULONG Size, IN PVOID Buffer, IN BOOLEAN bVerify)
Definition: block.c:559
NTSTATUS Ext2DeviceControl(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: devctl.c:783
NTSTATUS Ext2Write(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: write.c:1355
VOID Ext2QueueCloseRequest(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: close.c:190
#define DbgBreak()
Definition: ext2fs.h:46
NTSTATUS Ext2GetRetrievalPointerBase(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:1160
BOOLEAN Ext2RemoveVcbExtent(IN PEXT2_VCB Vcb, IN LONGLONG Vbn, IN LONGLONG Length)
Definition: memory.c:700
int ext3_delete_entry(struct ext2_icb *icb, struct inode *dir, struct ext3_dir_entry_2 *de_del, struct buffer_head *bh)
Definition: htree.c:2005
int ext4_check_descriptors(struct super_block *sb)
Definition: generic.c:3091
BOOLEAN Ext2FastIoCheckIfPossible(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, IN BOOLEAN CheckForReadOperation, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:64
NTSTATUS Ext2UserFsRequest(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:1903
NTSTATUS Ext2DispatchRequest(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: dispatch.c:228
__le16 ext4_group_desc_csum(struct ext3_sb_info *sbi, __u32 block_group, struct ext4_group_desc *gdp)
Definition: generic.c:2619
VOID Ext2DbgPrintCall(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
void ext3_set_de_type(struct super_block *sb, struct ext3_dir_entry_2 *de, umode_t mode)
Definition: htree.c:347
VOID Ext2SetVpbFlag(IN PVPB Vpb, IN USHORT Flag)
Definition: fsctl.c:44
VOID Ext2StopReaper(PEXT2_REAPER Reaper)
Definition: memory.c:3546
NTSTATUS Ext2SetFileType(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN PEXT2_MCB Mcb, IN umode_t mode)
Definition: generic.c:1951
BOOLEAN Ext2LoadBlock(IN PEXT2_VCB Vcb, IN ULONG dwBlk, IN PVOID Buffer)
Definition: generic.c:659
__u32 ext4_free_blks_count(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2483
PEXT2_MCB Ext2FirstUnusedMcb(PEXT2_VCB Vcb, BOOLEAN Wait, ULONG Number)
Definition: memory.c:2979
struct _EXT2_VCB * PEXT2_VCB
ULONG Ext2CountExtents(IN PEXT2_EXTENT Chain)
Definition: memory.c:513
NTSTATUS Ext2UnicodeToOEM(IN PEXT2_VCB Vcb, IN OUT POEM_STRING Oem, IN PUNICODE_STRING Unicode)
Definition: misc.c:261
BOOLEAN Ext2BuildName(IN OUT PUNICODE_STRING Target, IN PUNICODE_STRING File, IN PUNICODE_STRING Parent)
Definition: memory.c:1361
void ext3_update_dx_flag(struct inode *inode)
Definition: htree.c:368
struct _EXT2_ALLOC_HEADER EXT2_ALLOC_HEADER
NTSTATUS Ext2PnpCancelRemove(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
NTSTATUS Ext2PnpSurpriseRemove(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
BOOLEAN Ext2IsEaNameValid(IN OEM_STRING Name)
Definition: ea.c:389
struct _EXT2_FILLDIR_CONTEXT EXT2_FILLDIR_CONTEXT
unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh, ext4_group_t block_group, struct ext4_group_desc *gdp)
Definition: generic.c:2877
NTSTATUS Ext2ProcessGlobalProperty(IN PDEVICE_OBJECT DeviceObject, IN PEXT2_VOLUME_PROPERTY3 Property, IN ULONG Length)
Definition: devctl.c:240
BOOLEAN Ext2RemoveMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
Definition: memory.c:1746
BOOLEAN Ext2AddBlockExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Start, IN ULONG Block, IN ULONG Number)
Definition: memory.c:1027
VOID Ext2InsertFcb(PEXT2_VCB Vcb, PEXT2_FCB Fcb)
Definition: memory.c:309
int add_dirent_to_buf(struct ext2_icb *icb, struct dentry *dentry, struct inode *inode, struct ext3_dir_entry_2 *de, struct buffer_head *bh)
Definition: htree.c:386
PEXT2_CCB Ext2AllocateCcb(ULONG Flags, PEXT2_MCB SymLink)
Definition: memory.c:320
struct _EXT2_EXTENT * PEXT2_EXTENT
VOID Ext2FcbReaperThread(PVOID Context)
Definition: memory.c:3391
VOID Ext2LockIrp(IN PVOID Context, IN PIRP Irp)
Definition: dispatch.c:94
BOOLEAN Ext2LoadInode(IN PEXT2_VCB Vcb, IN struct inode *Inode)
Definition: generic.c:508
void ext4_itable_unused_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
Definition: generic.c:2563
NTSTATUS Ex2ProcessUserPerfStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_QUERY_PERFSTAT QueryPerf, IN ULONG Length)
Definition: devctl.c:640
NTSTATUS Ext2QueryFileInformation(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fileinfo.c:48
PEXT2_MCB Ext2AllocateMcb(IN PEXT2_VCB Vcb, IN PUNICODE_STRING FileName, IN PUNICODE_STRING Parent, IN ULONG FileAttr)
Definition: memory.c:1430
struct _EXT2_FCB EXT2_FCB
NTSTATUS Ext2UpdateGroupDirStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Group)
Definition: generic.c:1728
struct _FCB_LIST_ENTRY FCB_LIST_ENTRY
NTSTATUS Ext2LoadSuper(IN PEXT2_VCB Vcb, IN BOOLEAN bVerify, OUT PEXT2_SUPER_BLOCK *Sb)
Definition: generic.c:29
int ext4_group_desc_csum_verify(struct ext3_sb_info *sbi, __u32 block_group, struct ext4_group_desc *gdp)
Definition: generic.c:2648
struct _EXT2_RW_CONTEXT * PEXT2_RW_CONTEXT
struct ext4_group_desc * PEXT2_GROUP_DESC
Definition: ext2fs.h:107
int Ext2CheckInodeAccess(PEXT2_VCB Vcb, struct inode *in, int attempt)
Definition: access.c:20
struct _EXT2_CCB * PEXT2_CCB
BOOLEAN Ext2FastIoQueryNetworkOpenInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_NETWORK_OPEN_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
NTSTATUS Ext2IsVolumeMounted(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:2494
VOID Ext2UpdateVcbStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
Definition: generic.c:997
PEXT2_MCB Ext2SearchMcb(PEXT2_VCB Vcb, PEXT2_MCB Parent, PUNICODE_STRING FileName)
Definition: memory.c:1598
void ext4_inode_bitmap_set(struct super_block *sb, struct ext4_group_desc *bg, ext4_fsblk_t blk)
Definition: generic.c:2523
VOID Ext2ReleaseForCreateSection(IN PFILE_OBJECT FileObject)
Definition: fastio.c:1062
NTSTATUS Ext2TruncateIndirect(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, PLARGE_INTEGER Size)
Definition: indirect.c:1099
NTSTATUS Ext2ExpandFile(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, PLARGE_INTEGER Size)
Definition: fileinfo.c:1152
BOOLEAN Ext2SaveGroup(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Group)
Definition: generic.c:386
PEXT2_INODE Ext2AllocateInode(PEXT2_VCB Vcb)
Definition: memory.c:387
VOID Ext2FreeCcb(IN PEXT2_VCB Vcb, IN PEXT2_CCB Ccb)
Definition: memory.c:356
VOID Ext2CheckExtent(PLARGE_MCB Zone, LONGLONG Vbn, LONGLONG Lbn, LONGLONG Length, BOOLEAN bAdded)
Definition: memory.c:583
struct _EXT2_FCB * PEXT2_FCB
unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh, ext4_group_t block_group, struct ext4_group_desc *gdp)
Definition: generic.c:2786
VOID Ext2StartFloppyFlushDpc(PEXT2_VCB Vcb, PEXT2_FCB Fcb, PFILE_OBJECT FileObject)
Definition: write.c:139
BOOLEAN Ext2CheckBitmapConsistency(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
Definition: memory.c:1899
NTSTATUS Ext2ReadWriteBlocks(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_EXTENT Extent, IN ULONG Length)
Definition: block.c:260
NTSTATUS Ext2AddEntry(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN struct inode *Inode, IN PUNICODE_STRING FileName, OUT struct dentry **dentry)
BOOLEAN Ext2ClearInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG inode)
Definition: generic.c:530
NTSTATUS Ext2MapIndirect(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Index, IN BOOLEAN bAlloc, OUT PULONG pBlock, OUT PULONG Number)
Definition: indirect.c:835
BOOLEAN Ext2RefreshGroup(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
Definition: generic.c:409
struct ext3_dir_entry_2 * ext3_next_entry(struct ext3_dir_entry_2 *p)
Definition: generic.c:2244
VOID Ext2FreeEntry(IN struct dentry *de)
Definition: memory.c:432
NTSTATUS Ext2NewInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG GroupHint, IN ULONG Type, OUT PULONG Inode)
Definition: generic.c:1366
NTSTATUS Ext2QueryGlobalParameters(IN PUNICODE_STRING RegistryPath)
Definition: init.c:199
BOOLEAN Ext2RefreshSuper(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
Definition: generic.c:92
NTSTATUS Ext2RemoveEntry(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN PEXT2_MCB Mcb)
Definition: generic.c:2021
BOOLEAN Ext2ListExtents(PLARGE_MCB Extents)
Definition: memory.c:558
void ext3_inc_count(struct inode *inode)
Definition: htree.c:307
NTSTATUS Ext2PnpRemove(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
NTSTATUS Ext2MountVolume(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:2050
VOID Ext2DropBH(IN PEXT2_VCB Vcb)
Definition: generic.c:266
loff_t ext3_max_bitmap_size(int bits, int has_huge_files)
Definition: generic.c:2337
NTSTATUS Ext2LockVolume(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:136
VOID Ext2CleanupAllMcbs(PEXT2_VCB Vcb)
Definition: memory.c:1810
VOID Ext2DeQueueRequest(IN PVOID Context)
Definition: dispatch.c:190
ULONG Ext2OEMToUnicodeSize(IN PEXT2_VCB Vcb, IN PANSI_STRING Oem)
Definition: misc.c:183
NTSTATUS Ext2ProcessEntry(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN FILE_INFORMATION_CLASS FileInformationClass, IN ULONG in, IN PVOID Buffer, IN ULONG UsedLength, IN ULONG Length, IN ULONG FileIndex, IN PUNICODE_STRING pName, OUT PULONG EntrySize, IN BOOLEAN Single)
Definition: dirctl.c:60
VOID Ext2PutGroup(IN PEXT2_VCB Vcb)
Definition: generic.c:150
int(* filldir_t)(void *, const char *, int, unsigned long, __u32, unsigned)
Definition: ext2fs.h:2609
VOID Ext2InsertVcb(PEXT2_VCB Vcb)
Definition: memory.c:1935
ext3_fsblk_t descriptor_loc(struct super_block *sb, ext3_fsblk_t logical_sb_block, unsigned int nr)
Definition: generic.c:2736
NTSTATUS Ext2PurgeFile(IN PEXT2_FCB Fcb, IN BOOLEAN FlushBeforePurge)
Definition: fsctl.c:2811
NTSTATUS Ext2DiskIoControl(IN PDEVICE_OBJECT DeviceOjbect, IN ULONG IoctlCode, IN PVOID InputBuffer, IN ULONG InputBufferSize, IN OUT PVOID OutputBuffer, IN OUT PULONG OutputBufferSize)
Definition: block.c:609
NTSTATUS Ext2CompleteIrpContext(IN PEXT2_IRP_CONTEXT IrpContext, IN NTSTATUS Status)
Definition: read.c:32
NTSTATUS Ext2SetEa(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: ea.c:436
BOOLEAN Ext2IsDirectoryEmpty(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
VOID Ext2NoOpRelease(IN PVOID Fcb)
Definition: cmcb.c:153
struct _EXT2_REAPER EXT2_REAPER
BOOLEAN Ext2LookupBlockExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Start, IN PULONG Block, IN PULONG Mapped)
Definition: memory.c:1061
VOID Ext2DeQueueCloseRequest(IN PVOID Context)
Definition: close.c:222
VOID Ext2ClearAllExtents(PLARGE_MCB Zone)
Definition: memory.c:637
__inline ULONG DEC_OBJ_CNT(PULONG _C)
Definition: ext2fs.h:982
NTSTATUS Ext2FlushFiles(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
Definition: flush.c:112
BOOLEAN Ext2AddMcbExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG Lbn, IN LONGLONG Length)
Definition: memory.c:790
#define INC_MEM_COUNT(_i, _p, _s)
Definition: ext2fs.h:607
int Ext2LinuxError(NTSTATUS Status)
Definition: misc.c:304
PMDL Ext2CreateMdl(IN PVOID Buffer, IN ULONG Length, IN LOCK_OPERATION Operation)
Definition: block.c:64
NTSTATUS Ext2BuildRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
PEXT2_FCB Ext2AllocateFcb(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
Definition: memory.c:131
VOID Ext2InsertMcb(PEXT2_VCB Vcb, PEXT2_MCB Parent, PEXT2_MCB Child)
Definition: memory.c:1686
VOID(* EXT2_REAPER_RELEASE)(PVOID)
Definition: ext2fs.h:500
BOOLEAN Ext2FastIoUnlockSingle(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN PLARGE_INTEGER Length, IN PEPROCESS Process, IN ULONG Key, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:629
IO_STACK_LOCATION * PEXTENDED_IO_STACK_LOCATION
Definition: ext2fs.h:174
struct _EXT2_RW_CONTEXT EXT2_RW_CONTEXT
void ext4_free_inodes_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
Definition: generic.c:2547
NTSTATUS Ext2CreateInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB pParentFcb, IN ULONG Type, IN ULONG FileAttr, IN PUNICODE_STRING FileName)
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)
Definition: write.c:668
struct _EXT2_GLOBAL * PEXT2_GLOBAL
VOID __cdecl Ext2Printf(PCHAR DebugMessage,...)
PUCHAR Ext2NtStatusToString(IN NTSTATUS Status)
NTSTATUS Ext2LookupFile(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PUNICODE_STRING FullName, IN PEXT2_MCB Parent, OUT PEXT2_MCB *Ext2Mcb, IN ULONG Linkdep)
Definition: create.c:273
ULONG Ext2GetInfoLength(IN FILE_INFORMATION_CLASS FileInformationClass)
Definition: dirctl.c:30
BOOLEAN Ext2GetInodeLba(IN PEXT2_VCB Vcb, IN ULONG inode, OUT PLONGLONG offset)
Definition: generic.c:418
VOID Ext2DestroyMdl(IN PMDL Mdl)
Definition: block.c:97
NTSTATUS Ext2FlushVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
Definition: flush.c:43
ULONG Ext2TotalBlocks(PEXT2_VCB Vcb, PLARGE_INTEGER Size, PULONG pMeta)
Definition: fileinfo.c:1077
int Ext2CheckFileAccess(PEXT2_VCB Vcb, PEXT2_MCB Mcb, int attempt)
Definition: access.c:51
NTSTATUS Ext2AcquireFileForModWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER EndingOffset, OUT PERESOURCE *ResourceToRelease, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1081
BOOLEAN Ext2AddVcbExtent(IN PEXT2_VCB Vcb, IN LONGLONG Vbn, IN LONGLONG Length)
Definition: memory.c:648
NTSTATUS Ext2FollowLink(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Parent, IN PEXT2_MCB Mcb, IN ULONG Linkdep)
Definition: create.c:67
NTSTATUS Ext2ProcessVolumeProperty(IN PEXT2_VCB Vcb, IN PEXT2_VOLUME_PROPERTY3 Property, IN ULONG Length)
Definition: devctl.c:368
FAST_IO_POSSIBLE Ext2IsFastIoPossible(IN PEXT2_FCB Fcb)
Definition: fastio.c:38
PVOID PBCB
Definition: ext2fs.h:487
VOID Ext2ReaperThread(PVOID Context)
unsigned long long ext4_fsblk_t
Definition: ext3_fs_i.h:27
unsigned int ext3_group_t
Definition: ext3_fs_i.h:34
unsigned long long ext3_fsblk_t
Definition: ext3_fs_i.h:26
unsigned int ext4_group_t
Definition: ext3_fs_i.h:35
__u32 ext3_lblk_t
Definition: ext3_fs_i.h:30
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG LockKey
Definition: fatprocs.h:2665
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN BOOLEAN ExclusiveLock
Definition: fatprocs.h:2714
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
Definition: fatprocs.h:1675
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN CheckForReadOperation
Definition: fatprocs.h:2666
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN FailImmediately
Definition: fatprocs.h:2713
IN PFCB IN PFILE_OBJECT FileObject IN ULONG AllocationSize
Definition: fatprocs.h:322
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:348
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1801
FP_OP Operation
Definition: fpcontrol.c:150
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
Definition: directory.c:44
_In_ LONGLONG Vbn
Definition: fsrtlfuncs.h:470
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
_Must_inspect_result_ _In_ LONGLONG _In_ LONGLONG Lbn
Definition: fsrtlfuncs.h:480
enum _FAST_IO_POSSIBLE FAST_IO_POSSIBLE
Status
Definition: gdiplustypes.h:25
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLenum mode
Definition: glext.h:6217
GLuint in
Definition: glext.h:9616
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
GLboolean GLuint group
Definition: glext.h:11120
GLfloat GLfloat p
Definition: glext.h:8902
GLintptr offset
Definition: glext.h:5920
@ Single
Definition: halhw.h:165
#define es
Definition: i386-dis.c:440
#define InterlockedExchangeAdd
Definition: interlocked.h:181
#define InterlockedOr
Definition: interlocked.h:224
#define InterlockedAnd
Definition: interlocked.h:62
volatile char *const const char modify volatile long *const const long modify volatile short *const const short modify volatile char *const const char modify _InterlockedXor
Definition: intrin_ppc.h:273
volatile char *const const char modify _InterlockedAnd
Definition: intrin_ppc.h:267
uint32_t cc
Definition: isohybrid.c:75
static DRIVER_UNLOAD DriverUnload
Definition: kbdclass.c:17
#define blk
Definition: linetest.c:70
#define error(str)
Definition: mkdosfs.c:1605
#define ASSERT(a)
Definition: mode.c:44
#define cpu_to_le32
Definition: module.h:148
#define le32_to_cpu
Definition: module.h:149
ULONG nr
Definition: thread.c:7
static LPSTR pName
Definition: security.c:75
static OUT PIO_STATUS_BLOCK OUT PVOID IN ULONG IN FILE_INFORMATION_CLASS FileInformationClass
Definition: pipe.c:75
static unsigned(__cdecl *hash_bstr)(bstr_t s)
__in UCHAR __in POWER_STATE __in_opt PVOID __in PIO_STATUS_BLOCK IoStatus
Definition: mxum.h:159
volatile BOOL bShutDown
Definition: ServiceMain.c:12
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:56
_In_opt_ PSID Group
Definition: rtlfuncs.h:1646
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2439
__GNU_EXTENSION typedef __int64 * PLONGLONG
Definition: ntbasedef.h:382
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
Definition: ntpoapi.h:207
static BOOL Set
Definition: pageheap.c:10
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
#define Vcb
Definition: cdprocs.h:1415
#define long
Definition: qsort.c:33
#define err(...)
#define __u32
Definition: types.h:15
Definition: xml2sdb.h:80
Definition: xml2sdb.h:111
EXT2_IDENTIFIER Identifier
Definition: ext2fs.h:1109
ULONG Flags
Definition: ext2fs.h:1011
UNICODE_STRING DirectorySearchPattern
Definition: ext2fs.h:1017
ULONG EaIndex
Definition: ext2fs.h:1023
PEXT2_MCB SymLink
Definition: ext2fs.h:1014
EXT2_IDENTIFIER Identifier
Definition: ext2fs.h:1008
struct file filp
Definition: ext2fs.h:1020
ULONG Length
Definition: ext2fs.h:1122
LONGLONG Lba
Definition: ext2fs.h:1120
struct _EXT2_EXTENT * Next
Definition: ext2fs.h:1124
PIRP Irp
Definition: ext2fs.h:1123
ULONG Offset
Definition: ext2fs.h:1121
ERESOURCE MainResource
Definition: ext2fs.h:637
EXT2_IDENTIFIER Identifier
Definition: ext2fs.h:633
FAST_MUTEX Mutex
Definition: ext2fs.h:629
ERESOURCE PagingIoResource
Definition: ext2fs.h:638
FSRTL_ADVANCED_FCB_HEADER Header
Definition: ext2fs.h:626
ULONG ReferenceCount
Definition: ext2fs.h:856
PEXT2_MCB Mcb
Definition: ext2fs.h:872
ULONG NonCachedOpenCount
Definition: ext2fs.h:860
SECTION_OBJECT_POINTERS SectionObject
Definition: ext2fs.h:838
LARGE_INTEGER TsDrop
Definition: ext2fs.h:836
PETHREAD LazyWriterThread
Definition: ext2fs.h:850
struct inode * Inode
Definition: ext2fs.h:866
OPLOCK Oplock
Definition: ext2fs.h:847
PEXT2_VCB Vcb
Definition: ext2fs.h:869
ULONG OpenHandleCount
Definition: ext2fs.h:853
SHARE_ACCESS ShareAccess
Definition: ext2fs.h:841
ULONG Flags
Definition: ext2fs.h:863
FILE_LOCK FileLockAnchor
Definition: ext2fs.h:844
LIST_ENTRY Next
Definition: ext2fs.h:835
EXT2_FCBVCB
Definition: ext2fs.h:832
PEXT2_IRP_CONTEXT efc_irp
Definition: ext2fs.h:1187
FILE_INFORMATION_CLASS efc_fi
Definition: ext2fs.h:1193
NTSTATUS efc_status
Definition: ext2fs.h:1192
FAST_IO_DISPATCH FastIoDispatch
Definition: ext2fs.h:526
UNICODE_STRING RegistryPath
Definition: ext2fs.h:577
CACHE_MANAGER_CALLBACKS CacheManagerNoOpCallbacks
Definition: ext2fs.h:533
UCHAR AnsiName[CODEPAGE_MAXLEN]
Definition: ext2fs.h:564
NPAGED_LOOKASIDE_LIST Ext2ExtLookasideList
Definition: ext2fs.h:557
NPAGED_LOOKASIDE_LIST Ext2McbLookasideList
Definition: ext2fs.h:556
NPAGED_LOOKASIDE_LIST Ext2IrpContextLookasideList
Definition: ext2fs.h:553
NPAGED_LOOKASIDE_LIST Ext2FcbLookasideList
Definition: ext2fs.h:554
EXT2_IDENTIFIER Identifier
Definition: ext2fs.h:516
struct _EXT2_GLOBAL::@688 Codepage
WCHAR PageName[CODEPAGE_MAXLEN]
Definition: ext2fs.h:563
FS_FILTER_CALLBACKS FilterCallbacks
Definition: ext2fs.h:529
PDEVICE_OBJECT DiskdevObject
Definition: ext2fs.h:539
NPAGED_LOOKASIDE_LIST Ext2DentryLookasideList
Definition: ext2fs.h:558
PDRIVER_OBJECT DriverObject
Definition: ext2fs.h:536
EXT2_REAPER bhReaper
Definition: ext2fs.h:550
USHORT MaxDepth
Definition: ext2fs.h:559
WCHAR wHidingSuffix[HIDINGPAT_LEN]
Definition: ext2fs.h:570
EXT2_PERF_STATISTICS_V2 PerfStat
Definition: ext2fs.h:582
CHAR sHidingSuffix[HIDINGPAT_LEN]
Definition: ext2fs.h:574
NPAGED_LOOKASIDE_LIST Ext2CcbLookasideList
Definition: ext2fs.h:555
BOOLEAN bHidingSuffix
Definition: ext2fs.h:573
ERESOURCE Resource
Definition: ext2fs.h:519
struct nls_table * PageTable
Definition: ext2fs.h:565
ULONG Flags
Definition: ext2fs.h:523
WCHAR wHidingPrefix[HIDINGPAT_LEN]
Definition: ext2fs.h:569
BOOLEAN bHidingPrefix
Definition: ext2fs.h:571
EXT2_REAPER McbReaper
Definition: ext2fs.h:549
CHAR sHidingPrefix[HIDINGPAT_LEN]
Definition: ext2fs.h:572
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
Definition: ext2fs.h:532
LIST_ENTRY VcbList
Definition: ext2fs.h:545
EXT2_REAPER FcbReaper
Definition: ext2fs.h:548
PDEVICE_OBJECT CdromdevObject
Definition: ext2fs.h:542
EXT2_IDENTIFIER_TYPE Type
Definition: ext2fs.h:477
struct dentry * de
Definition: ext2fs.h:946
LARGE_MCB Extents
Definition: ext2fs.h:929
LARGE_INTEGER LastWriteTime
Definition: ext2fs.h:936
LARGE_MCB MetaExts
Definition: ext2fs.h:932
UNICODE_STRING ShortName
Definition: ext2fs.h:917
ULONG FileAttr
Definition: ext2fs.h:923
ULONG Refercount
Definition: ext2fs.h:926
PEXT2_MCB Parent
Definition: ext2fs.h:903
LARGE_INTEGER CreationTime
Definition: ext2fs.h:935
LARGE_INTEGER LastAccessTime
Definition: ext2fs.h:938
LIST_ENTRY Link
Definition: ext2fs.h:941
PEXT2_FCB Fcb
Definition: ext2fs.h:914
PEXT2_MCB Child
Definition: ext2fs.h:907
ULONG Flags
Definition: ext2fs.h:900
PEXT2_MCB Next
Definition: ext2fs.h:904
PEXT2_MCB Target
Definition: ext2fs.h:908
struct inode Inode
Definition: ext2fs.h:945
UNICODE_STRING FullName
Definition: ext2fs.h:920
EXT2_IDENTIFIER Identifier
Definition: ext2fs.h:897
LARGE_INTEGER ChangeTime
Definition: ext2fs.h:937
struct _EXT2_PERF_STATISTICS_V2::@685 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
EXT2_STAT_ARRAY_V2 Total
Definition: common.h:140
EXT2_STAT_ARRAY_V2 Size
Definition: common.h:137
KEVENT Engine
Definition: ext2fs.h:505
ULONG Flags
Definition: ext2fs.h:508
EXT2_REAPER_RELEASE Free
Definition: ext2fs.h:507
KEVENT Wait
Definition: ext2fs.h:506
PETHREAD Thread
Definition: ext2fs.h:504
PERESOURCE Resource
Definition: ext2fs.h:3207
KEVENT Event
Definition: ext2fs.h:3204
BOOLEAN Wait
Definition: ext2fs.h:3211
ERESOURCE_THREAD ThreadId
Definition: ext2fs.h:3208
PFILE_OBJECT FileObject
Definition: ext2fs.h:3209
gid_t gid
Definition: ext2fs.h:765
struct ext3_sb_info sbi
Definition: ext2fs.h:776
struct nls_table * PageTable
Definition: ext2fs.h:754
PDEVICE_OBJECT RealDevice
Definition: ext2fs.h:718
LIST_ENTRY Next
Definition: ext2fs.h:675
ULONG SectorBits
Definition: ext2fs.h:731
gid_t egid
Definition: ext2fs.h:769
ULONG max_data_blocks
Definition: ext2fs.h:780
PNOTIFY_SYNC NotifySync
Definition: ext2fs.h:709
SECTION_OBJECT_POINTERS SectionObject
Definition: ext2fs.h:678
PARTITION_INFORMATION PartitionInformation
Definition: ext2fs.h:722
struct block_device bd
Definition: ext2fs.h:774
ULONG OpenVolumeCount
Definition: ext2fs.h:693
loff_t max_bitmap_bytes
Definition: ext2fs.h:781
PEXT2_SUPER_BLOCK SuperBlock
Definition: ext2fs.h:725
loff_t max_bytes
Definition: ext2fs.h:782
ULONG BlockSize
Definition: ext2fs.h:728
BOOLEAN bHidingPrefix
Definition: ext2fs.h:758
PDEVICE_OBJECT DeviceObject
Definition: ext2fs.h:712
BOOLEAN bHidingSuffix
Definition: ext2fs.h:760
LIST_ENTRY NotifyList
Definition: ext2fs.h:706
BOOLEAN IsExt3fs
Definition: ext2fs.h:724
LIST_ENTRY FcbList
Definition: ext2fs.h:664
UCHAR DrvLetter
Definition: ext2fs.h:772
ULONG Flags
Definition: ext2fs.h:746
PFILE_OBJECT Volume
Definition: ext2fs.h:749
ULONG ReferenceCount
Definition: ext2fs.h:690
uid_t uid
Definition: ext2fs.h:764
EXT2_FCBVCB
Definition: ext2fs.h:651
CHAR sHidingPrefix[HIDINGPAT_LEN]
Definition: ext2fs.h:759
ULONGLONG IoUnitSize
Definition: ext2fs.h:734
ULONG FcbCount
Definition: ext2fs.h:665
PFILE_OBJECT LockFile
Definition: ext2fs.h:703
UCHAR AnsiName[CODEPAGE_MAXLEN]
Definition: ext2fs.h:753
ULONG OpenHandleCount
Definition: ext2fs.h:691
ULONG IoUnitBits
Definition: ext2fs.h:737
CHAR sHidingSuffix[HIDINGPAT_LEN]
Definition: ext2fs.h:761
ERESOURCE McbLock
Definition: ext2fs.h:660
LARGE_MCB Extents
Definition: ext2fs.h:681
ERESOURCE FcbLock
Definition: ext2fs.h:663
ERESOURCE MetaInode
Definition: ext2fs.h:654
ULONG NumOfMcb
Definition: ext2fs.h:668
PDEVICE_OBJECT TargetDeviceObject
Definition: ext2fs.h:715
ULONG InodeSize
Definition: ext2fs.h:740
ULONG ChangeCount
Definition: ext2fs.h:696
PVPB Vpb
Definition: ext2fs.h:699
PVPB Vpb2
Definition: ext2fs.h:700
SHARE_ACCESS ShareAccess
Definition: ext2fs.h:685
ULONG max_blocks_per_layer[EXT2_BLOCK_TYPES]
Definition: ext2fs.h:779
DISK_GEOMETRY DiskGeometry
Definition: ext2fs.h:721
uid_t euid
Definition: ext2fs.h:768
NPAGED_LOOKASIDE_LIST InodeLookasideList