ReactOS  0.4.12-dev-916-gffc4e30
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 \
167 CTL_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
204 LONG
206  IN OUT LONG volatile *Target,
207  IN LONG Set
208 );
209 
210 #pragma intrinsic (_InterlockedAnd)
211 #define InterlockedAnd _InterlockedAnd
212 
213 LONG
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 #define SetLongFlag(_F,_SF) Ext2SetFlag((PULONG)&(_F), (ULONG)(_SF))
227 #define ClearLongFlag(_F,_SF) Ext2ClearFlag((PULONG)&(_F), (ULONG)(_SF))
228 
229 #ifdef __REACTOS__
230 static
231 #endif
232 __inline
233 VOID
234 Ext2SetFlag(PULONG Flags, ULONG FlagBit)
235 {
236  ULONG _ret = InterlockedOr(Flags, FlagBit);
237  ASSERT(*Flags == (_ret | FlagBit));
238 }
239 
240 #ifdef __REACTOS__
241 static
242 #endif
243 __inline
244 VOID
245 Ext2ClearFlag(PULONG Flags, ULONG FlagBit)
246 {
247  ULONG _ret = InterlockedAnd(Flags, ~FlagBit);
248  ASSERT(*Flags == (_ret & (~FlagBit)));
249 }
250 
251 #else
252 
253 #define SetLongFlag(_F,_SF) InterlockedOr(&(_F), (ULONG)(_SF))
254 #define ClearLongFlag(_F,_SF) InterlockedAnd(&(_F), ~((ULONG)(_SF)))
255 
256 #endif /* release */
257 
258 #define Ext2RaiseStatus(IRPCONTEXT,STATUS) { \
259  (IRPCONTEXT)->ExceptionCode = (STATUS); \
260  ExRaiseStatus((STATUS)); \
261 }
262 
263 #define Ext2NormalizeAndRaiseStatus(IRPCONTEXT,STATUS) { \
264  (IRPCONTEXT)->ExceptionCode = STATUS; \
265  if ((STATUS) == STATUS_VERIFY_REQUIRED) { ExRaiseStatus((STATUS)); } \
266  ExRaiseStatus(FsRtlNormalizeNtstatus((STATUS),STATUS_UNEXPECTED_IO_ERROR)); \
267 }
268 
269 //
270 // Define IsWritingToEof for write (append) operations
271 //
272 
273 #define FILE_WRITE_TO_END_OF_FILE 0xffffffff
274 
275 #define IsWritingToEof(Pos) (((Pos).LowPart == FILE_WRITE_TO_END_OF_FILE) && \
276  ((Pos).HighPart == -1 ))
277 
278 #define IsDirectory(Fcb) IsMcbDirectory((Fcb)->Mcb)
279 #define IsSpecialFile(Fcb) IsMcbSpecialFile((Fcb)->Mcb)
280 #define IsSymLink(Fcb) IsMcbSymLink((Fcb)->Mcb)
281 #define IsInodeSymLink(I) S_ISLNK((I)->i_mode)
282 #define IsRoot(Fcb) IsMcbRoot((Fcb)->Mcb)
283 
284 //
285 // Pool Tags
286 //
287 
288 #define TAG_VPB ' bpV'
289 #define VPB_SIZE sizeof(VPB)
290 
291 #define EXT2_DATA_MAGIC 'BD2E'
292 #define EXT2_INAME_MAGIC 'NI2E'
293 #define EXT2_FNAME_MAGIC 'NF2E'
294 #define EXT2_VNAME_MAGIC 'NV2E'
295 #define EXT2_DENTRY_MAGIC 'ED2E'
296 #define EXT2_DIRSP_MAGIC 'SD2E'
297 #define EXT2_SB_MAGIC 'BS2E'
298 #define EXT2_GD_MAGIC 'DG2E'
299 #define EXT2_FLIST_MAGIC 'LF2E'
300 #define EXT2_PARAM_MAGIC 'PP2E'
301 #define EXT2_RWC_MAGIC 'WR2E'
302 
303 //
304 // Bug Check Codes Definitions
305 //
306 
307 #define EXT2_FILE_SYSTEM (FILE_SYSTEM)
308 
309 #define EXT2_BUGCHK_BLOCK (0x00010000)
310 #define EXT2_BUGCHK_CLEANUP (0x00020000)
311 #define EXT2_BUGCHK_CLOSE (0x00030000)
312 #define EXT2_BUGCHK_CMCB (0x00040000)
313 #define EXT2_BUGCHK_CREATE (0x00050000)
314 #define EXT2_BUGCHK_DEBUG (0x00060000)
315 #define EXT2_BUGCHK_DEVCTL (0x00070000)
316 #define EXT2_BUGCHK_DIRCTL (0x00080000)
317 #define EXT2_BUGCHK_DISPATCH (0x00090000)
318 #define EXT2_BUGCHK_EXCEPT (0x000A0000)
319 #define EXT2_BUGCHK_EXT2 (0x000B0000)
320 #define EXT2_BUGCHK_FASTIO (0x000C0000)
321 #define EXT2_BUGCHK_FILEINFO (0x000D0000)
322 #define EXT2_BUGCHK_FLUSH (0x000E0000)
323 #define EXT2_BUGCHK_FSCTL (0x000F0000)
324 #define EXT2_BUGCHK_INIT (0x00100000)
325 #define EXT2_BUGCHK_LOCK (0x0011000)
326 #define EXT2_BUGCHK_MEMORY (0x0012000)
327 #define EXT2_BUGCHK_MISC (0x0013000)
328 #define EXT2_BUGCHK_READ (0x00140000)
329 #define EXT2_BUGCHK_SHUTDOWN (0x00150000)
330 #define EXT2_BUGCHK_VOLINFO (0x00160000)
331 #define EXT2_BUGCHK_WRITE (0x00170000)
332 
333 #define EXT2_BUGCHK_LAST (0x00170000)
334 
335 #define Ext2BugCheck(A,B,C,D) { KeBugCheckEx(EXT2_FILE_SYSTEM, A | __LINE__, B, C, D ); }
336 
337 
338 /* Ext2 file system definions *******************************************/
339 
340 //
341 // The second extended file system magic number
342 //
343 
344 #define EXT2_SUPER_MAGIC 0xEF53
345 
346 #define EXT2_MIN_BLOCK 1024
347 #define EXT2_MIN_FRAG 1024
348 #define EXT2_MAX_USER_BLKSIZE 65536
349 //
350 // Inode flags (Linux uses octad number, but why ? strange!!!)
351 //
352 
353 #define S_IFMT 0x0F000 /* 017 0000 */
354 #define S_IFSOCK 0x0C000 /* 014 0000 */
355 #define S_IFLNK 0x0A000 /* 012 0000 */
356 #define S_IFREG 0x08000 /* 010 0000 */
357 #define S_IFBLK 0x06000 /* 006 0000 */
358 #define S_IFDIR 0x04000 /* 004 0000 */
359 #define S_IFCHR 0x02000 /* 002 0000 */
360 #define S_IFIFO 0x01000 /* 001 0000 */
361 
362 #define S_ISUID 0x00800 /* 000 4000 */
363 #define S_ISGID 0x00400 /* 000 2000 */
364 #define S_ISVTX 0x00200 /* 000 1000 */
365 
366 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
367 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
368 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
369 #define S_ISFIL(m) (((m) & S_IFMT) == S_IFFIL)
370 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
371 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
372 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
373 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
374 
375 #define S_IPERMISSION_MASK 0x1FF /* */
376 
377 #define S_IRWXU 0x1C0 /* 0 0700 */
378 #define S_IRWNU 0x180 /* 0 0600 */
379 #define S_IRUSR 0x100 /* 0 0400 */
380 #define S_IWUSR 0x080 /* 0 0200 */
381 #define S_IXUSR 0x040 /* 0 0100 */
382 
383 #define S_IRWXG 0x038 /* 0 0070 */
384 #define S_IRWNG 0x030 /* 0 0060 */
385 #define S_IRGRP 0x020 /* 0 0040 */
386 #define S_IWGRP 0x010 /* 0 0020 */
387 #define S_IXGRP 0x008 /* 0 0010 */
388 
389 #define S_IRWXO 0x007 /* 0 0007 */
390 #define S_IRWNO 0x006 /* 0 0006 */
391 #define S_IROTH 0x004 /* 0 0004 */
392 #define S_IWOTH 0x002 /* 0 0002 */
393 #define S_IXOTH 0x001 /* 0 0001 */
394 
395 #define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO)
396 #define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
397 #define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
398 #define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
399 #define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
400 #define S_IFATTR (S_IRWNU|S_IRWNG|S_IRWNO)
401 
402 #define S_ISREADABLE(m) (((m) & S_IPERMISSION_MASK) == (S_IRUSR | S_IRGRP | S_IROTH))
403 #define S_ISWRITABLE(m) (((m) & S_IPERMISSION_MASK) == (S_IWUSR | S_IWGRP | S_IWOTH))
404 
405 #define Ext2SetReadable(m) do {(m) = (m) | (S_IRUSR | S_IRGRP | S_IROTH);} while(0)
406 #define Ext2SetWritable(m) do {(m) = (m) | (S_IWUSR | S_IWGRP | S_IWOTH);} while(0)
407 
408 #define Ext2SetOwnerWritable(m) do {(m) |= S_IWUSR;} while(0)
409 #define Ext2SetOwnerReadOnly(m) do {(m) &= ~S_IWUSR;} while(0)
410 
411 #define Ext2IsOwnerWritable(m) (((m) & S_IWUSR) == S_IWUSR)
412 #define Ext2IsOwnerReadable(m) (((m) & S_IRUSR) == S_IRUSR)
413 #define Ext2IsOwnerReadOnly(m) (!(Ext2IsOwnerWritable(m)) && Ext2IsOwnerReadable(m))
414 
415 #define Ext2IsGroupWritable(m) (((m) & S_IWGRP) == S_IWGRP)
416 #define Ext2IsGroupReadable(m) (((m) & S_IRGRP) == S_IRGRP)
417 #define Ext2IsGroupReadOnly(m) (!(Ext2IsGroupWritable(m)) && Ext2IsGroupReadable(m))
418 
419 #define Ext2IsOtherWritable(m) (((m) & S_IWOTH) == S_IWOTH)
420 #define Ext2IsOtherReadable(m) (((m) & S_IROTH) == S_IROTH)
421 #define Ext2IsOtherReadOnly(m) (!(Ext2IsOtherWritable(m)) && Ext2IsOtherReadable(m))
422 
423 #define Ext2SetReadOnly(m) do {(m) &= ~(S_IWUSR | S_IWGRP | S_IWOTH);} while(0)
424 
425 
426 #define Ext2FileCanRead (0x1)
427 #define Ext2FileCanWrite (0x2)
428 #define Ext2FileCanExecute (0x4)
429 
430 
431 /*
432  * We need 8-bytes aligned for all the sturctures
433  * It's a must for all ERESOURCE allocations
434  */
435 
436 //
437 // Ext2Fsd Driver Definitions
438 //
439 
440 //
441 // EXT2_IDENTIFIER_TYPE
442 //
443 // Identifiers used to mark the structures
444 //
445 
446 typedef enum _EXT2_IDENTIFIER_TYPE {
447 #ifdef _MSC_VER
448  EXT2FGD = ':DGF',
449  EXT2VCB = ':BCV',
450  EXT2FCB = ':BCF',
451  EXT2CCB = ':BCC',
452  EXT2ICX = ':XCI',
453  EXT2FSD = ':DSF',
454  EXT2MCB = ':BCM'
455 #else
456  EXT2FGD = 0xE2FD0001,
457  EXT2VCB = 0xE2FD0002,
458  EXT2FCB = 0xE2FD0003,
459  EXT2CCB = 0xE2FD0004,
460  EXT2ICX = 0xE2FD0005,
461  EXT2FSD = 0xE2FD0006,
462  EXT2MCB = 0xE2FD0007
463 #endif
465 
466 //
467 // EXT2_IDENTIFIER
468 //
469 // Header used to mark the structures
470 //
471 typedef struct _EXT2_IDENTIFIER {
475 
476 
477 #define NodeType(Ptr) (*((EXT2_IDENTIFIER_TYPE *)(Ptr)))
478 
479 typedef struct _EXT2_MCB EXT2_MCB, *PEXT2_MCB;
480 
481 
482 typedef PVOID PBCB;
483 
484 //
485 
486 //
487 // EXT2_GLOBAL_DATA
488 //
489 // Data that is not specific to a mounted volume
490 //
491 
493 
494 typedef struct _EXT2_REAPER {
501 
502 #define EXT2_REAPER_FLAG_STOP (1 << 0)
503 
504 typedef struct _EXT2_GLOBAL {
505 
506  /* Identifier for this structure */
508 
509  /* Syncronization primitive for this structure */
511 
512  /* Global flags for the driver: I put it since
513  FastIoDispatch isn't 8bytes aligned. */
515 
516  /* Table of pointers to the fast I/O entry points */
518 
519  /* Filter callbacks */
521 
522  /* Table of pointers to the Cache Manager callbacks */
525 
526  /* Pointer to the driver object */
528 
529  /* Pointer to the disk device object */
531 
532  /* Pointer to the cdrom device object */
534 
535  /* List of mounted volumes */
537 
538  /* Cleaning thread related: resource cleaner */
542 
543  /* Look Aside table of IRP_CONTEXT, FCB, MCB, CCB */
551 
552  /* User specified global codepage name */
553  struct {
557  } Codepage;
558 
559  /* global hiding patterns */
566 
567  /* Registery path */
569 
570  /* global memory and i/o statistics and memory allocations
571  of various sturctures */
572 
574 
576 
577 //
578 // Flags for EXT2_GLOBAL_DATA
579 //
580 
581 #define EXT2_UNLOAD_PENDING 0x00000001
582 #define EXT2_SUPPORT_WRITING 0x00000002
583 #define EXT3_FORCE_WRITING 0x00000004
584 #define EXT2_CHECKING_BITMAP 0x00000008
585 #define EXT2_AUTO_MOUNT 0x00000010
586 
587 //
588 // Glboal Ext2Fsd Memory Block
589 //
590 
591 extern PEXT2_GLOBAL Ext2Global;
592 
593 //
594 // memory allocation statistics
595 //
596 
597 
598 #define INC_MEM_COUNT(_i, _p, _s) do { ASSERT(_p); Ext2TraceMemory(TRUE, (int) (_i), (PVOID)(_p), (LONG)(_s)); } while(0)
599 #define DEC_MEM_COUNT(_i, _p, _s) do { ASSERT(_p); Ext2TraceMemory(FALSE, (int) (_i), (PVOID)(_p), (LONG)(_s)); } while(0)
600 #define INC_IRP_COUNT(IrpContext) Ext2TraceIrpContext(TRUE, (IrpContext))
601 #define DEC_IRP_COUNT(IrpContext) Ext2TraceIrpContext(FALSE, (IrpContext))
602 
603 //
604 // Driver Extension define
605 //
606 
607 #define IsExt2FsDevice(DO) ((DO == Ext2Global->DiskdevObject) || \
608  (DO == Ext2Global->CdromdevObject) )
609 
610 #ifdef _WIN2K_TARGET_
611 #define FSRTL_ADVANCED_FCB_HEADER FSRTL_COMMON_FCB_HEADER
612 #endif
613 
614 typedef struct _EXT2_FCBVCB {
615 
616  // Command header for Vcb and Fcb
618 
619 #ifndef _WIN2K_TARGET_
621 #endif
622 
623  // Ext2Fsd identifier
625 
626 
627  // Locking resources
630 
632 
633 //
634 // EXT2_VCB Volume Control Block
635 //
636 // Data that represents a mounted logical volume
637 // It is allocated as the device extension of the volume device object
638 //
639 typedef struct _EXT2_VCB {
640 
641  /* Common header */
643 
644  // Resource for metadata (inode)
646 
647  // Resource for metadata (block)
649 
650  // Resource for Mcb (Meta data control block)
652 
653  // List of FCBs for open files on this volume
657 
658  // Mcb list
661 
662  // Entry of Mcb Tree (Root Node)
664 
665  // Link list to Global
667 
668  // Section objects
670 
671  // Dirty Mcbs of modifications for volume stream
673 
674 
675  // Share Access for the file object
677 
678  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLOSE
679  // for both files on this volume and open instances of the
680  // volume itself.
681  ULONG ReferenceCount; /* total ref count */
682  ULONG OpenHandleCount; /* all handles */
683 
684  ULONG OpenVolumeCount; /* volume handle */
685 
686  // Disk change count
688 
689  // Pointer to the VPB in the target device object
692 
693  // The FileObject of Volume used to lock the volume
695 
696  // List of IRPs pending on directory change notify requests
698 
699  // Pointer to syncronization primitive for this list
701 
702  // This volumes device object
704 
705  // The physical device object (the disk)
707 
708  // The physical device object (the disk)
710 
711  // Information about the physical device object
714 
717 
718  // Block / Cluster size
720 
721  // Sector size in bits
723 
724  // Minimal i/o size: min(PageSize, BlockSize)
726 
727  // Bits of aligned size
729 
730  // Inode size
732 
733  // Inode lookaside list
735 
736  // Flags for the volume
738 
739  // Streaming File Object
741 
742  // User specified codepage name per volume
743  struct {
746  } Codepage;
747 
748  /* patterns to hiding files */
753 
754  /* User to impersanate */
757 
758  /* User to act as */
761 
762  /* mountpoint: symlink to DesDevices */
764 
765  struct block_device bd;
766  struct super_block sb;
768 
769  /* Maximum file size in blocks ... */
774 } EXT2_VCB, *PEXT2_VCB;
775 
776 //
777 // Flags for EXT2_VCB
778 //
779 #define VCB_INITIALIZED 0x00000001
780 #define VCB_VOLUME_LOCKED 0x00000002
781 #define VCB_MOUNTED 0x00000004
782 #define VCB_DISMOUNT_PENDING 0x00000008
783 #define VCB_NEW_VPB 0x00000010
784 #define VCB_BEING_CLOSED 0x00000020
785 #define VCB_USER_IDS 0x00000040 /* uid/gid specified by user */
786 #define VCB_USER_EIDS 0x00000080 /* euid/egid specified by user */
787 #define VCB_GD_LOADED 0x00000100 /* group desc loaded */
788 
789 #define VCB_BEING_DROPPED 0x00002000
790 #define VCB_FORCE_WRITING 0x00004000
791 #define VCB_DEVICE_REMOVED 0x00008000
792 #define VCB_JOURNAL_RECOVER 0x00080000
793 #define VCB_ARRIVAL_NOTIFIED 0x00800000
794 #define VCB_RO_COMPAT_READ_ONLY 0x01000000
795 #define VCB_READ_ONLY 0x08000000
796 #define VCB_WRITE_PROTECTED 0x10000000
797 #define VCB_FLOPPY_DISK 0x20000000
798 #define VCB_REMOVAL_PREVENTED 0x40000000
799 #define VCB_REMOVABLE_MEDIA 0x80000000
800 
801 
802 #define IsVcbInited(Vcb) (IsFlagOn((Vcb)->Flags, VCB_INITIALIZED))
803 #define IsMounted(Vcb) (IsFlagOn((Vcb)->Flags, VCB_MOUNTED))
804 #define IsDispending(Vcb) (IsFlagOn((Vcb)->Flags, VCB_DISMOUNT_PENDING))
805 #define IsVcbReadOnly(Vcb) (IsFlagOn((Vcb)->Flags, VCB_READ_ONLY) || \
806  IsFlagOn((Vcb)->Flags, VCB_RO_COMPAT_READ_ONLY) || \
807  IsFlagOn((Vcb)->Flags, VCB_WRITE_PROTECTED))
808 
809 
810 #define IsExt3ForceWrite() (IsFlagOn(Ext2Global->Flags, EXT3_FORCE_WRITING))
811 #define IsVcbForceWrite(Vcb) (IsFlagOn((Vcb)->Flags, VCB_FORCE_WRITING))
812 #define CanIWrite(Vcb) (IsExt3ForceWrite() || (!IsVcbReadOnly(Vcb) && IsVcbForceWrite(Vcb)))
813 #define IsLazyWriter(Fcb) ((Fcb)->LazyWriterThread == PsGetCurrentThread())
814 //
815 // EXT2_FCB File Control Block
816 //
817 // Data that represents an open file
818 // There is a single instance of the FCB for every open file
819 //
820 typedef struct _EXT2_FCB {
821 
822  /* Common header */
824 
825  // List of FCBs for this volume
827  LARGE_INTEGER TsDrop; /* drop time */
828 
830 
831  // Share Access for the file object
833 
834  // List of byte-range locks for this file
836 
837  // oplock information management structure
839 
840  // Lazy writer thread context
842 
843  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP
845 
846  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLOSE
848 
849  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP
850  // But only for Files with FO_NO_INTERMEDIATE_BUFFERING flag
852 
853  // Flags for the FCB
855 
856  // Pointer to the inode
857  struct inode *Inode;
858 
859  // Vcb
861 
862  // Mcb Node ...
864 
865 } EXT2_FCB, *PEXT2_FCB;
866 
867 //
868 // Flags for EXT2_FCB
869 //
870 
871 #define FCB_FROM_POOL 0x00000001
872 #define FCB_PAGE_FILE 0x00000002
873 #define FCB_FILE_MODIFIED 0x00000020
874 
875 #define FCB_ALLOC_IN_CREATE 0x00000080
876 #define FCB_ALLOC_IN_WRITE 0x00000100
877 #define FCB_ALLOC_IN_SETINFO 0x00000200
878 
879 #define FCB_DELETE_PENDING 0x80000000
880 
881 //
882 // Mcb Node
883 //
884 
885 struct _EXT2_MCB {
886 
887  // Identifier for this structure
889 
890  // Flags
892 
893  // Link List Info
894  PEXT2_MCB Parent; // Parent
895  PEXT2_MCB Next; // Siblings
896 
897  union {
898  PEXT2_MCB Child; // Children Mcb nodes
899  PEXT2_MCB Target; // Target Mcb of symlink
900  };
901 
902  // Mcb Node Info
903 
904  // -> Fcb
906 
907  // Short name
909 
910  // Full name with path
912 
913  // File attribute
915 
916  // reference count
918 
919  // Extents zone
921 
922  // Metablocks
924 
925  // Time stamps
930 
931  // List Link to Vcb->McbList
933 
934 
935 
936  struct inode Inode;
937  struct dentry *de;
938 };
939 
940 //
941 // Flags for MCB
942 //
943 #define MCB_FROM_POOL 0x00000001
944 #define MCB_VCB_LINK 0x00000002
945 #define MCB_ENTRY_TREE 0x00000004
946 #define MCB_FILE_DELETED 0x00000008
947 
948 #define MCB_ZONE_INITED 0x20000000
949 #define MCB_TYPE_SPECIAL 0x40000000 /* unresolved symlink + device node */
950 #define MCB_TYPE_SYMLINK 0x80000000
951 
952 #define IsMcbUsed(Mcb) ((Mcb)->Refercount > 0)
953 #define IsMcbSymLink(Mcb) IsFlagOn((Mcb)->Flags, MCB_TYPE_SYMLINK)
954 #define IsZoneInited(Mcb) IsFlagOn((Mcb)->Flags, MCB_ZONE_INITED)
955 #define IsMcbSpecialFile(Mcb) IsFlagOn((Mcb)->Flags, MCB_TYPE_SPECIAL)
956 #define IsMcbRoot(Mcb) ((Mcb)->Inode.i_ino == EXT2_ROOT_INO)
957 #define IsMcbReadonly(Mcb) IsFlagOn((Mcb)->FileAttr, FILE_ATTRIBUTE_READONLY)
958 #define IsMcbDirectory(Mcb) IsFlagOn((Mcb)->FileAttr, FILE_ATTRIBUTE_DIRECTORY)
959 #define IsFileDeleted(Mcb) IsFlagOn((Mcb)->Flags, MCB_FILE_DELETED)
960 
961 #define IsLinkInvalid(Mcb) (IsMcbSymLink(Mcb) && IsFileDeleted(Mcb->Target))
962 
963 /*
964  * routines for reference count management
965  */
966 
967 #define Ext2ReferXcb(_C) InterlockedIncrement(_C)
968 #define Ext2DerefXcb(_C) DEC_OBJ_CNT(_C)
969 
970 #ifdef __REACTOS__
971 static
972 #endif
973 __inline ULONG DEC_OBJ_CNT(PULONG _C) {
974  if (*_C <= 0) {
975  DbgBreak();
976  }
977  return InterlockedDecrement(_C);
978 }
979 
980 #if EXT2_DEBUG
981 VOID
982 Ext2TraceMcb(PCHAR fn, USHORT lc, USHORT add, PEXT2_MCB Mcb);
983 #define Ext2ReferMcb(Mcb) Ext2TraceMcb(__FUNCTION__, __LINE__, TRUE, Mcb)
984 #define Ext2DerefMcb(Mcb) Ext2TraceMcb(__FUNCTION__, __LINE__, FALSE, Mcb)
985 #else
986 #define Ext2ReferMcb(Mcb) Ext2ReferXcb(&Mcb->Refercount)
987 #define Ext2DerefMcb(Mcb) Ext2DerefXcb(&Mcb->Refercount)
988 #endif
989 
990 //
991 // EXT2_CCB Context Control Block
992 //
993 // Data that represents one instance of an open file
994 // There is one instance of the CCB for every instance of an open file
995 //
996 typedef struct _EXT2_CCB {
997 
998  // Identifier for this structure
1000 
1001  // Flags
1003 
1004  // Mcb of it's symbol link
1006 
1007  // State that may need to be maintained
1009 
1010  /* Open handle control block */
1011  struct file filp;
1012 
1013  /* The EA index we are on */
1015 
1016 } EXT2_CCB, *PEXT2_CCB;
1017 
1018 //
1019 // Flags for CCB
1020 //
1021 
1022 #define CCB_FROM_POOL 0x00000001
1023 #define CCB_VOLUME_DASD_PURGE 0x00000002
1024 #define CCB_LAST_WRITE_UPDATED 0x00000004
1025 #define CCB_OPEN_REPARSE_POINT 0x00000008
1026 #define CCB_DELETE_ON_CLOSE 0x00000010
1027 
1028 #define CCB_ALLOW_EXTENDED_DASD_IO 0x80000000
1029 
1030 //
1031 // EXT2_IRP_CONTEXT
1032 //
1033 // Used to pass information about a request between the drivers functions
1034 //
1035 typedef struct ext2_icb {
1036 
1037  // Identifier for this structure
1039 
1040  // Pointer to the IRP this request describes
1042 
1043  // Flags
1045 
1046  // The major and minor function code for the request
1049 
1050  // The device object
1052 
1053  // The real device object
1055 
1056  // The file object
1058 
1061 
1062  // If the request is top level
1064 
1065  // Used if the request needs to be queued for later processing
1067 
1068  // If an exception is currently in progress
1070 
1071  // The exception code when an exception is in progress
1073 
1075 
1076 
1077 #define IRP_CONTEXT_FLAG_FROM_POOL (0x00000001)
1078 #define IRP_CONTEXT_FLAG_WAIT (0x00000002)
1079 #define IRP_CONTEXT_FLAG_WRITE_THROUGH (0x00000004)
1080 #define IRP_CONTEXT_FLAG_FLOPPY (0x00000008)
1081 #define IRP_CONTEXT_FLAG_DISABLE_POPUPS (0x00000020)
1082 #define IRP_CONTEXT_FLAG_DEFERRED (0x00000040)
1083 #define IRP_CONTEXT_FLAG_VERIFY_READ (0x00000080)
1084 #define IRP_CONTEXT_STACK_IO_CONTEXT (0x00000100)
1085 #define IRP_CONTEXT_FLAG_REQUEUED (0x00000200)
1086 #define IRP_CONTEXT_FLAG_USER_IO (0x00000400)
1087 #define IRP_CONTEXT_FLAG_DELAY_CLOSE (0x00000800)
1088 #define IRP_CONTEXT_FLAG_FILE_BUSY (0x00001000)
1089 
1090 
1091 #define Ext2CanIWait() (!IrpContext || IsFlagOn(IrpContext->Flags, IRP_CONTEXT_FLAG_WAIT))
1092 
1093 //
1094 // EXT2_ALLOC_HEADER
1095 //
1096 // In the checked version of the driver this header is put in the beginning of
1097 // every memory allocation
1098 //
1099 typedef struct _EXT2_ALLOC_HEADER {
1102 
1103 typedef struct _FCB_LIST_ENTRY {
1107 
1108 
1109 // Block Description List
1110 typedef struct _EXT2_EXTENT {
1115  struct _EXT2_EXTENT * Next;
1117 
1118 
1119 /* FUNCTIONS DECLARATION *****************************************************/
1120 
1121 // Include this so we don't need the latest WDK to build the driver.
1122 #ifndef FSCTL_GET_RETRIEVAL_POINTER_BASE
1123 #define FSCTL_GET_RETRIEVAL_POINTER_BASE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 141, METHOD_BUFFERED, FILE_ANY_ACCESS) // RETRIEVAL_POINTER_BASE
1124 #endif
1125 
1126 #ifndef FILE_SUPPORTS_EXTENDED_ATTRIBUTES
1127 #define FILE_SUPPORTS_EXTENDED_ATTRIBUTES 0x00800000
1128 #endif
1129 
1130 //
1131 // The following macro is used to determine if an FSD thread can block
1132 // for I/O or wait for a resource. It returns TRUE if the thread can
1133 // block and FALSE otherwise. This attribute can then be used to call
1134 // the FSD & FSP common work routine with the proper wait value.
1135 //
1136 
1137 #define CanExt2Wait(IRP) IoIsOperationSynchronous(Irp)
1138 
1139 //
1140 // memory allocation statistics
1141 //
1142 
1143 #ifdef __REACTOS__
1144 static
1145 #endif
1146 __inline
1147 VOID
1148 Ext2TraceMemory(BOOLEAN _n, int _i, PVOID _p, LONG _s)
1149 {
1150  if (_n) {
1154  } else {
1157  }
1158 }
1159 
1160 #ifdef __REACTOS__
1161 static
1162 #endif
1163 __inline
1164 VOID
1166 {
1167  if (_n) {
1168  INC_MEM_COUNT(PS_IRP_CONTEXT, IrpContext, sizeof(EXT2_IRP_CONTEXT));
1169  InterlockedIncrement(&(Ext2Global->PerfStat.Irps[IrpContext->MajorFunction].Current));
1170  } else {
1171  DEC_MEM_COUNT(PS_IRP_CONTEXT, IrpContext, sizeof(EXT2_IRP_CONTEXT));
1172  InterlockedIncrement(&Ext2Global->PerfStat.Irps[IrpContext->MajorFunction].Processed);
1173  InterlockedDecrement(&Ext2Global->PerfStat.Irps[IrpContext->MajorFunction].Current);
1174  }
1175 }
1176 
1177 typedef struct _EXT2_FILLDIR_CONTEXT {
1187 
1188 //
1189 // Access.c
1190 //
1191 
1192 
1193 int Ext2CheckInodeAccess(PEXT2_VCB Vcb, struct inode *in, int attempt);
1194 int Ext2CheckFileAccess (PEXT2_VCB Vcb, PEXT2_MCB Mcb, int attempt);
1195 
1196 //
1197 // Block.c
1198 //
1199 
1200 PMDL
1201 Ext2CreateMdl (
1202  IN PVOID Buffer,
1203  IN ULONG Length,
1205 );
1206 
1207 VOID
1208 Ext2DestroyMdl (IN PMDL Mdl);
1209 
1210 NTSTATUS
1212  IN PIRP Irp,
1213  IN ULONG Length,
1215 PVOID
1217 
1218 
1219 NTSTATUS
1221  IN PEXT2_IRP_CONTEXT IrpContext,
1222  IN PEXT2_VCB Vcb,
1224  IN ULONG Length
1225  );
1226 
1227 NTSTATUS
1228 Ext2ReadSync(
1229  IN PEXT2_VCB Vcb,
1231  IN ULONG Length,
1232  OUT PVOID Buffer,
1233  IN BOOLEAN bVerify );
1234 
1235 NTSTATUS
1236 Ext2ReadDisk(
1237  IN PEXT2_VCB Vcb,
1239  IN ULONG Size,
1240  IN PVOID Buffer,
1241  IN BOOLEAN bVerify );
1242 
1243 NTSTATUS
1245  IN PDEVICE_OBJECT DeviceOjbect,
1246  IN ULONG IoctlCode,
1248  IN ULONG InputBufferSize,
1250  IN OUT PULONG OutputBufferSize );
1251 
1252 VOID
1254  IN PEXT2_IRP_CONTEXT IrpContext,
1255  IN PEXT2_VCB Vcb,
1256  IN BOOLEAN bPrevent );
1257 
1258 NTSTATUS
1260 
1261 
1262 //
1263 // Cleanup.c
1264 //
1265 
1266 NTSTATUS
1267 Ext2Cleanup (IN PEXT2_IRP_CONTEXT IrpContext);
1268 
1269 //
1270 // Close.c
1271 //
1272 
1273 NTSTATUS
1274 Ext2Close (IN PEXT2_IRP_CONTEXT IrpContext);
1275 
1276 VOID
1278 
1279 VOID NTAPI
1281 
1282 //
1283 // Cmcb.c
1284 //
1285 
1286 BOOLEAN NTAPI
1288  IN PVOID Context,
1289  IN BOOLEAN Wait );
1290 VOID NTAPI
1292 
1293 BOOLEAN NTAPI
1295  IN PVOID Context,
1296  IN BOOLEAN Wait );
1297 
1298 VOID NTAPI
1300 
1301 BOOLEAN NTAPI
1303  IN PVOID Fcb,
1304  IN BOOLEAN Wait );
1305 
1306 VOID NTAPI
1308 
1309 //
1310 // Create.c
1311 //
1312 
1313 
1314 BOOLEAN
1316 
1317 NTSTATUS
1319  IN PEXT2_IRP_CONTEXT IrpContext,
1320  IN PEXT2_VCB Vcb,
1322  IN PEXT2_MCB Mcb,
1323  IN ULONG Linkdep
1324 );
1325 
1326 NTSTATUS
1327 Ext2ScanDir (
1328  IN PEXT2_IRP_CONTEXT IrpContext,
1329  IN PEXT2_VCB Vcb,
1332  OUT PULONG Inode,
1333  struct dentry **dentry
1334 );
1335 
1336 BOOLEAN
1339  IN BOOLEAN bDirectory
1340 );
1341 
1342 #define EXT2_LOOKUP_FLAG_MASK (0xFF00000)
1343 #define EXT2_LOOKUP_NOT_FOLLOW (0x8000000)
1344 
1345 NTSTATUS
1347  IN PEXT2_IRP_CONTEXT IrpContext,
1348  IN PEXT2_VCB Vcb,
1351  OUT PEXT2_MCB * Ext2Mcb,
1352  IN ULONG Linkdep
1353 );
1354 
1355 NTSTATUS
1357  IN PEXT2_IRP_CONTEXT IrpContext,
1358  IN PEXT2_VCB Vcb,
1359  OUT PBOOLEAN OpPostIrp
1360 );
1361 
1362 NTSTATUS
1364  IN PEXT2_IRP_CONTEXT IrpContext,
1365  IN PEXT2_VCB Vcb );
1366 
1367 NTSTATUS
1368 Ext2Create (IN PEXT2_IRP_CONTEXT IrpContext);
1369 
1370 NTSTATUS
1372  IN PEXT2_IRP_CONTEXT IrpContext,
1373  IN PEXT2_VCB Vcb,
1374  IN PEXT2_FCB pParentFcb,
1375  IN ULONG Type,
1376  IN ULONG FileAttr,
1378 
1379 
1380 NTSTATUS
1382  IN PEXT2_IRP_CONTEXT IrpContext,
1384  IN PEXT2_VCB Vcb,
1385  IN PEXT2_FCB Fcb,
1388 );
1389 
1390 //
1391 // Debug.c
1392 //
1393 
1394 /* debug levels */
1395 #define DL_NVR 0
1396 #define DL_VIT 0x00000001
1397 #define DL_ERR 0x00000002
1398 #define DL_DBG 0x00000004
1399 #define DL_INF 0x00000008
1400 #define DL_FUN 0x00000010
1401 #define DL_LOW 0x00000020
1402 #define DL_REN 0x00000040 /* renaming operation */
1403 #define DL_RES 0x00000080 /* entry reference managment */
1404 #define DL_BLK 0x00000100 /* data block allocation / free */
1405 #define DL_CP 0x00000200 /* code pages (create, querydir) */
1406 #define DL_EXT 0x00000400 /* mcb extents */
1407 #define DL_MAP 0x00000800 /* retrieval points */
1408 #define DL_JNL 0x00001000 /* dump journal operations */
1409 #define DL_HTI 0x00002000 /* htree index */
1410 #define DL_WRN 0x00004000 /* warning */
1411 #define DL_BH 0x00008000 /* buffer head */
1412 #define DL_PNP 0x00010000 /* pnp */
1413 #define DL_IO 0x00020000 /* file i/o */
1414 
1415 #define DL_DEFAULT (DL_ERR|DL_VIT)
1416 
1417 #if EXT2_DEBUG
1418 extern ULONG DebugFilter;
1419 
1420 VOID
1421 __cdecl
1422 Ext2NiPrintf(
1423  PCHAR DebugMessage,
1424  ...
1425 );
1426 
1427 #define DEBUG(_DL, arg) do {if ((_DL) & DebugFilter) Ext2Printf arg;} while(0)
1428 #define DEBUGNI(_DL, arg) do {if ((_DL) & DebugFilter) Ext2NiPrintf arg;} while(0)
1429 
1430 #define Ext2CompleteRequest(Irp, bPrint, PriorityBoost) \
1431  Ext2DbgPrintComplete(Irp, bPrint); \
1432  IoCompleteRequest(Irp, PriorityBoost)
1433 
1434 #else
1435 
1436 #define DEBUG(_DL, arg) do {if ((_DL) & DL_ERR) DbgPrint arg;} while(0)
1437 
1438 #define Ext2CompleteRequest(Irp, bPrint, PriorityBoost) \
1439  IoCompleteRequest(Irp, PriorityBoost)
1440 
1441 #endif // EXT2_DEBUG
1442 
1443 VOID
1444 __cdecl
1445 Ext2Printf(
1446  PCHAR DebugMessage,
1447  ...
1448 );
1449 
1450 extern ULONG ProcessNameOffset;
1451 
1452 #define Ext2GetCurrentProcessName() ( \
1453  (PUCHAR) PsGetCurrentProcess() + ProcessNameOffset \
1454 )
1455 
1456 ULONG
1458 
1459 VOID
1462  IN PIRP Irp );
1463 
1464 VOID
1466  IN PIRP Irp,
1467  IN BOOLEAN bPrint
1468 );
1469 
1470 PUCHAR
1472 
1476  IN ULONG Tag
1477 );
1478 
1479 VOID
1480 Ext2FreePool(
1481  IN PVOID P,
1482  IN ULONG Tag
1483 );
1484 
1485 //
1486 // Devctl.c
1487 //
1488 
1489 NTSTATUS
1493  IN ULONG Length
1494 );
1495 
1496 NTSTATUS
1498  IN PEXT2_VCB Vcb,
1500  IN ULONG Length
1501 );
1502 
1503 NTSTATUS
1505  IN PEXT2_IRP_CONTEXT IrpContext,
1507  IN ULONG Length
1508 );
1509 
1510 NTSTATUS
1512  IN PEXT2_IRP_CONTEXT IrpContext,
1513  IN PEXT2_QUERY_PERFSTAT QueryPerf,
1514  IN ULONG Length
1515 );
1516 
1517 NTSTATUS
1519  IN PEXT2_IRP_CONTEXT IrpContext,
1520  IN PEXT2_MOUNT_POINT MountPoint,
1521  IN ULONG Length
1522 );
1523 
1524 NTSTATUS
1526 
1527 NTSTATUS
1529 
1530 NTSTATUS
1532 
1533 //
1534 // Dirctl.c
1535 //
1536 
1537 ULONG
1539 
1540 NTSTATUS
1542  IN PEXT2_IRP_CONTEXT IrpContext,
1543  IN PEXT2_VCB Vcb,
1544  IN PEXT2_FCB Dcb,
1546  IN ULONG in,
1547  IN PVOID Buffer,
1548  IN ULONG UsedLength,
1549  IN ULONG Length,
1550  IN ULONG FileIndex,
1553  IN BOOLEAN Single
1554 );
1555 
1556 BOOLEAN
1558  IN PEXT2_VCB Vcb,
1559  IN POEM_STRING OeName
1560 );
1561 
1563 
1564 NTSTATUS
1566  IN PEXT2_IRP_CONTEXT IrpContext
1567 );
1568 
1569 VOID
1571  IN PEXT2_IRP_CONTEXT IrpContext,
1572  IN PEXT2_VCB Vcb,
1573  IN PEXT2_MCB Mcb,
1574  IN ULONG Filter,
1575  IN ULONG Action
1576 );
1577 
1578 NTSTATUS
1580 
1581 BOOLEAN
1583  IN PEXT2_IRP_CONTEXT IrpContext,
1584  IN PEXT2_VCB Vcb,
1585  IN PEXT2_MCB Mcb
1586 );
1587 
1588 //
1589 // Dispatch.c
1590 //
1591 
1592 VOID NTAPI
1594  IN PVOID Context,
1595  IN PIRP Irp
1596 );
1597 
1598 VOID NTAPI
1599 Ext2LockIrp (
1600  IN PVOID Context,
1601  IN PIRP Irp
1602 );
1603 
1604 NTSTATUS
1606 
1607 VOID NTAPI
1609 
1610 NTSTATUS
1612 
1616  IN PIRP Irp
1617 );
1618 
1619 //
1620 // ea.c
1621 //
1622 
1623 NTSTATUS
1624 Ext2QueryEa(
1625  IN PEXT2_IRP_CONTEXT IrpContext
1626 );
1627 
1628 BOOLEAN
1631 );
1632 
1633 NTSTATUS
1634 Ext2SetEa(
1635  IN PEXT2_IRP_CONTEXT IrpContext
1636 );
1637 
1638 
1639 //
1640 // Except.c
1641 //
1642 
1643 NTSTATUS
1645  IN PEXT2_IRP_CONTEXT IrpContext,
1646  IN PEXCEPTION_POINTERS ExceptionPointer
1647 );
1648 
1649 NTSTATUS
1651 
1652 
1653 //
1654 // Extents.c
1655 //
1656 
1657 
1658 NTSTATUS
1660  IN PEXT2_IRP_CONTEXT IrpContext,
1661  IN PEXT2_VCB Vcb,
1662  IN PEXT2_MCB Mcb,
1663  IN ULONG Index,
1664  IN BOOLEAN Alloc,
1665  OUT PULONG Block,
1666  OUT PULONG Number
1667  );
1668 
1669 NTSTATUS
1671  PEXT2_IRP_CONTEXT IrpContext,
1672  PEXT2_VCB Vcb,
1673  PEXT2_MCB Mcb,
1674  ULONG Start,
1675  ULONG End,
1677  );
1678 
1679 NTSTATUS
1681  PEXT2_IRP_CONTEXT IrpContext,
1682  PEXT2_VCB Vcb,
1683  PEXT2_MCB Mcb,
1685  );
1686 
1687 
1688 //
1689 // generic.c
1690 //
1691 
1693 {
1694  return ((ext3_fsblk_t)le32_to_cpu(es->s_blocks_count_hi) << 32) |
1695  le32_to_cpu(es->s_blocks_count);
1696 }
1697 
1699 {
1700  return ((ext3_fsblk_t)le32_to_cpu(es->s_r_blocks_count_hi) << 32) |
1701  le32_to_cpu(es->s_r_blocks_count);
1702 }
1703 
1705 {
1706  return ((ext3_fsblk_t)le32_to_cpu(es->s_free_blocks_count_hi) << 32) |
1707  le32_to_cpu(es->s_free_blocks_count);
1708 }
1709 
1710 static inline void ext3_blocks_count_set(struct ext3_super_block *es,
1711  ext3_fsblk_t blk)
1712 {
1713  es->s_blocks_count = cpu_to_le32((u32)blk);
1714  es->s_blocks_count_hi = cpu_to_le32(blk >> 32);
1715 }
1716 
1718  ext3_fsblk_t blk)
1719 {
1720  es->s_free_blocks_count = cpu_to_le32((u32)blk);
1721  es->s_free_blocks_count_hi = cpu_to_le32(blk >> 32);
1722 }
1723 
1724 static inline void ext3_r_blocks_count_set(struct ext3_super_block *es,
1725  ext3_fsblk_t blk)
1726 {
1727  es->s_r_blocks_count = cpu_to_le32((u32)blk);
1728  es->s_r_blocks_count_hi = cpu_to_le32(blk >> 32);
1729 }
1730 
1731 blkcnt_t ext3_inode_blocks(struct ext3_inode *raw_inode,
1732  struct inode *inode);
1733 
1734 int ext3_inode_blocks_set(struct ext3_inode *raw_inode,
1735  struct inode * inode);
1737  struct ext4_group_desc *bg);
1738 
1740  struct ext4_group_desc *bg);
1742  struct ext4_group_desc *bg);
1744  struct ext4_group_desc *bg);
1746  struct ext4_group_desc *bg);
1748  struct ext4_group_desc *bg);
1750  struct ext4_group_desc *bg);
1751 void ext4_block_bitmap_set(struct super_block *sb,
1752  struct ext4_group_desc *bg, ext4_fsblk_t blk);
1753 void ext4_inode_bitmap_set(struct super_block *sb,
1754  struct ext4_group_desc *bg, ext4_fsblk_t blk);
1755 void ext4_inode_table_set(struct super_block *sb,
1756  struct ext4_group_desc *bg, ext4_fsblk_t blk);
1757 void ext4_free_blks_set(struct super_block *sb,
1758  struct ext4_group_desc *bg, __u32 count);
1759 void ext4_free_inodes_set(struct super_block *sb,
1760  struct ext4_group_desc *bg, __u32 count);
1761 void ext4_used_dirs_set(struct super_block *sb,
1762  struct ext4_group_desc *bg, __u32 count);
1764  struct ext4_group_desc *bg, __u32 count);
1765 
1767 unsigned long ext4_bg_num_gdb(struct super_block *sb, ext4_group_t group);
1768 unsigned ext4_init_inode_bitmap(struct super_block *sb, struct buffer_head *bh,
1769  ext4_group_t block_group,
1770  struct ext4_group_desc *gdp);
1771 unsigned ext4_init_block_bitmap(struct super_block *sb, struct buffer_head *bh,
1772  ext4_group_t block_group, struct ext4_group_desc *gdp);
1774  ext4_group_t block_group, struct buffer_head **bh);
1776 unsigned long ext4_count_free_inodes(struct super_block *sb);
1778 
1779 NTSTATUS
1781  IN PEXT2_VCB Vcb,
1782  IN BOOLEAN bVerify,
1783  OUT PEXT2_SUPER_BLOCK * Sb
1784 );
1785 
1786 
1787 BOOLEAN
1789  IN PEXT2_IRP_CONTEXT IrpContext,
1790  IN PEXT2_VCB Vcb
1791 );
1792 
1793 BOOLEAN
1795  IN PEXT2_IRP_CONTEXT IrpContext,
1796  IN PEXT2_VCB Vcb
1797 );
1798 
1799 BOOLEAN
1801 
1802 BOOLEAN
1804 
1805 VOID
1807 
1808 VOID
1810 
1811 VOID
1813 
1814 NTSTATUS
1816 
1817 BOOLEAN
1819  IN PEXT2_IRP_CONTEXT IrpContext,
1820  IN PEXT2_VCB Vcb,
1821  IN ULONG Group
1822 );
1823 
1824 BOOLEAN
1826  IN PEXT2_IRP_CONTEXT IrpContext,
1827  IN PEXT2_VCB Vcb
1828 );
1829 
1830 BOOLEAN
1832  IN PEXT2_VCB Vcb,
1833  IN ULONG inode,
1835 );
1836 
1837 BOOLEAN
1838 Ext2LoadInode (
1839  IN PEXT2_VCB Vcb,
1840  IN struct inode *Inode
1841 );
1842 
1843 BOOLEAN
1845  IN PEXT2_IRP_CONTEXT IrpContext,
1846  IN PEXT2_VCB Vcb,
1847  IN ULONG inode
1848 );
1849 
1850 BOOLEAN
1851 Ext2SaveInode (
1852  IN PEXT2_IRP_CONTEXT IrpContext,
1853  IN PEXT2_VCB Vcb,
1854  IN struct inode *Inode
1855 );
1856 
1857 BOOLEAN
1859  IN struct inode *Inode,
1860  IN PEXT2_INODE InodeXattr);
1861 
1862 BOOLEAN
1864  IN PEXT2_VCB Vcb,
1865  IN struct inode *Inode,
1866  IN PEXT2_INODE InodeXattr);
1867 
1868 BOOLEAN
1869 Ext2LoadBlock (
1870  IN PEXT2_VCB Vcb,
1871  IN ULONG dwBlk,
1872  IN PVOID Buffer
1873 );
1874 
1875 BOOLEAN
1876 Ext2SaveBlock (
1877  IN PEXT2_IRP_CONTEXT IrpContext,
1878  IN PEXT2_VCB Vcb,
1879  IN ULONG dwBlk,
1880  IN PVOID Buf
1881 );
1882 
1883 BOOLEAN
1885  IN PEXT2_IRP_CONTEXT IrpContext,
1886  IN PEXT2_VCB Vcb,
1887  IN LONGLONG Offset,
1888  IN ULONG Size,
1889  IN PVOID Buf
1890 );
1891 
1892 BOOLEAN
1894  IN PEXT2_IRP_CONTEXT IrpContext,
1895  IN PEXT2_VCB Vcb,
1896  IN LONGLONG Offset,
1897  IN ULONG Size
1898 );
1899 
1900 BOOLEAN
1902  IN PEXT2_IRP_CONTEXT IrpContext,
1903  IN PEXT2_VCB Vcb,
1904  IN LONGLONG Offset,
1905  IN ULONG Size,
1906  IN PVOID Buf
1907 );
1908 
1909 NTSTATUS
1910 Ext2GetBlock(
1911  IN PEXT2_IRP_CONTEXT IrpContext,
1912  IN PEXT2_VCB Vcb,
1913  IN PEXT2_MCB Mcb,
1914  IN ULONG Base,
1915  IN ULONG Layer,
1916  IN ULONG Start,
1917  IN ULONG SizeArray,
1918  IN PULONG BlockArray,
1919  IN BOOLEAN bAlloc,
1920  IN OUT PULONG Hint,
1921  OUT PULONG Block,
1922  OUT PULONG Number
1923 );
1924 
1925 NTSTATUS
1926 Ext2BlockMap(
1927  IN PEXT2_IRP_CONTEXT IrpContext,
1928  IN PEXT2_VCB Vcb,
1929  IN PEXT2_MCB Mcb,
1930  IN ULONG Index,
1931  IN BOOLEAN bAlloc,
1932  OUT PULONG pBlock,
1933  OUT PULONG Number
1934 );
1935 
1936 VOID
1938  IN PEXT2_IRP_CONTEXT IrpContext,
1939  IN PEXT2_VCB Vcb
1940 );
1941 
1942 NTSTATUS
1943 Ext2NewBlock(
1944  IN PEXT2_IRP_CONTEXT IrpContext,
1945  IN PEXT2_VCB Vcb,
1946  IN ULONG GroupHint,
1947  IN ULONG BlockHint,
1948  OUT PULONG Block,
1950 );
1951 
1952 NTSTATUS
1954  IN PEXT2_IRP_CONTEXT IrpContext,
1955  IN PEXT2_VCB Vcb,
1956  IN ULONG Block,
1957  IN ULONG Number
1958 );
1959 
1960 
1961 NTSTATUS
1962 Ext2NewInode(
1963  IN PEXT2_IRP_CONTEXT IrpContext,
1964  IN PEXT2_VCB Vcb,
1965  IN ULONG GroupHint,
1966  IN ULONG Type,
1967  OUT PULONG Inode
1968 );
1969 
1970 NTSTATUS
1972  IN PEXT2_IRP_CONTEXT IrpContext,
1973  IN PEXT2_VCB Vcb,
1974  IN ULONG Group
1975 );
1976 
1977 NTSTATUS
1979  IN PEXT2_IRP_CONTEXT IrpContext,
1980  IN PEXT2_VCB Vcb,
1981  IN ULONG Inode,
1982  IN ULONG Type
1983 );
1984 
1985 NTSTATUS
1986 Ext2AddEntry (
1987  IN PEXT2_IRP_CONTEXT IrpContext,
1988  IN PEXT2_VCB Vcb,
1989  IN PEXT2_FCB Dcb,
1990  IN struct inode *Inode,
1992  OUT struct dentry **dentry
1993 );
1994 
1995 NTSTATUS
1997  IN PEXT2_IRP_CONTEXT IrpContext,
1998  IN PEXT2_VCB Vcb,
1999  IN PEXT2_FCB Dcb,
2000  IN PEXT2_MCB Mcb,
2001  IN umode_t mode
2002 );
2003 
2004 NTSTATUS
2006  IN PEXT2_IRP_CONTEXT IrpContext,
2007  IN PEXT2_VCB Vcb,
2008  IN PEXT2_FCB Dcb,
2009  IN PEXT2_MCB Mcb
2010 );
2011 
2012 NTSTATUS
2014  IN PEXT2_IRP_CONTEXT IrpContext,
2015  IN PEXT2_VCB Vcb,
2016  IN PEXT2_FCB Dcb,
2017  IN ULONG OldParent,
2018  IN ULONG NewParent );
2019 
2020 
2021 NTSTATUS
2023  IN PEXT2_IRP_CONTEXT IrpContext,
2024  IN PEXT2_VCB Vcb,
2025  IN PEXT2_MCB Mcb,
2026  IN ULONG Base,
2027  IN ULONG Start,
2028  IN ULONG Layer,
2029  IN ULONG SizeArray,
2030  IN PULONG BlockArray,
2031  IN PULONG Extra
2032 );
2033 
2035 
2036 int ext3_check_dir_entry (const char * function, struct inode * dir,
2037  struct ext3_dir_entry_2 * de,
2038  struct buffer_head * bh,
2039  unsigned long offset);
2040 
2041 loff_t ext3_max_size(int blkbits, int has_huge_files);
2042 loff_t ext3_max_bitmap_size(int bits, int has_huge_files);
2043 
2044 
2045 __le16 ext4_group_desc_csum(struct ext3_sb_info *sbi, __u32 block_group,
2046  struct ext4_group_desc *gdp);
2047 int ext4_group_desc_csum_verify(struct ext3_sb_info *sbi, __u32 block_group,
2048  struct ext4_group_desc *gdp);
2049 
2051  ext3_fsblk_t logical_sb_block, unsigned int nr);
2053  ext4_group_t block_group, struct buffer_head **bh);
2055 
2056 //
2057 // Fastio.c
2058 //
2059 
2062  IN PEXT2_FCB Fcb
2063 );
2064 
2065 BOOLEAN NTAPI
2069  IN ULONG Length,
2070  IN BOOLEAN Wait,
2071  IN ULONG LockKey,
2075 );
2076 
2077 
2078 BOOLEAN NTAPI
2081  IN ULONG Length,
2082  IN BOOLEAN Wait,
2083  IN ULONG LockKey,
2084  OUT PVOID Buffer,
2087 
2088 BOOLEAN NTAPI
2092  IN ULONG Length,
2093  IN BOOLEAN Wait,
2094  IN ULONG LockKey,
2095  OUT PVOID Buffer,
2098 
2099 BOOLEAN NTAPI
2102  IN BOOLEAN Wait,
2106 
2107 BOOLEAN NTAPI
2110  IN BOOLEAN Wait,
2114 
2115 BOOLEAN NTAPI
2121  IN ULONG Key,
2126 );
2127 
2128 BOOLEAN NTAPI
2134  IN ULONG Key,
2137 );
2138 
2139 BOOLEAN NTAPI
2145 );
2146 
2147 BOOLEAN NTAPI
2150 #ifdef __REACTOS__
2151  IN PVOID Process,
2152 #else
2154 #endif
2155  IN ULONG Key,
2158 );
2159 
2160 
2161 BOOLEAN NTAPI
2164  IN BOOLEAN Wait,
2168 
2169 BOOLEAN NTAPI
2172  IN BOOLEAN Wait,
2176 
2177 VOID
2178 NTAPI
2181 );
2182 
2183 VOID
2184 NTAPI
2187 );
2188 
2189 NTSTATUS
2190 NTAPI
2196 );
2197 
2198 NTSTATUS
2199 NTAPI
2204 );
2205 
2206 NTSTATUS
2207 NTAPI
2211 );
2212 
2213 NTSTATUS
2214 NTAPI
2218 );
2219 
2220 
2221 NTSTATUS
2222 NTAPI
2225  OUT PVOID *cc
2226  );
2227 
2228 //
2229 // FileInfo.c
2230 //
2231 
2232 
2233 NTSTATUS
2235 
2236 NTSTATUS
2238 
2239 ULONG
2241  PEXT2_VCB Vcb,
2243  PULONG pMeta
2244 );
2245 
2246 NTSTATUS
2248  PEXT2_IRP_CONTEXT IrpContext,
2249  PEXT2_VCB Vcb,
2250  PEXT2_MCB Mcb,
2252 );
2253 
2254 NTSTATUS
2256  PEXT2_IRP_CONTEXT IrpContext,
2257  PEXT2_VCB Vcb,
2258  PEXT2_MCB Mcb,
2260 
2261 NTSTATUS
2263  IN PEXT2_IRP_CONTEXT IrpContext,
2264  IN PEXT2_VCB Vcb,
2265  IN PEXT2_FCB Fcb,
2266  IN PEXT2_CCB Ccb
2267 );
2268 
2269 NTSTATUS
2271  PEXT2_IRP_CONTEXT IrpContext,
2272  PEXT2_VCB Vcb,
2273  PEXT2_FCB Fcb,
2274  PEXT2_CCB Ccb,
2275  BOOLEAN bDelete
2276 );
2277 
2278 NTSTATUS
2280  PEXT2_IRP_CONTEXT IrpContext,
2281  PEXT2_VCB Vcb,
2282  PEXT2_FCB Fcb,
2283  PEXT2_CCB Ccb
2284 );
2285 
2286 NTSTATUS
2288  PEXT2_IRP_CONTEXT IrpContext,
2289  PEXT2_VCB Vcb,
2290  PEXT2_FCB Fcb,
2291  PEXT2_CCB Ccb
2292 );
2293 
2294 ULONG
2296 
2297 NTSTATUS
2299  PEXT2_IRP_CONTEXT IrpContext,
2300  PEXT2_VCB Vcb,
2301  PEXT2_FCB Fcb,
2302  PEXT2_MCB Mcb
2303 );
2304 
2305 
2306 //
2307 // Flush.c
2308 //
2309 
2310 NTSTATUS
2312  IN PEXT2_IRP_CONTEXT IrpContext,
2313  IN PEXT2_VCB Vcb,
2315 );
2316 
2317 NTSTATUS
2319  IN PEXT2_IRP_CONTEXT IrpContext,
2320  IN PEXT2_VCB Vcb,
2322 );
2323 
2324 NTSTATUS
2325 Ext2FlushFile (
2326  IN PEXT2_IRP_CONTEXT IrpContext,
2327  IN PEXT2_FCB Fcb,
2328  IN PEXT2_CCB Ccb
2329 );
2330 
2331 NTSTATUS
2332 Ext2Flush (IN PEXT2_IRP_CONTEXT IrpContext);
2333 
2334 
2335 //
2336 // Fsctl.c
2337 //
2338 
2339 NTSTATUS
2341  IN PEXT2_IRP_CONTEXT IrpContext,
2342  IN PEXT2_VCB Vcb,
2343  IN PEXT2_MCB Mcb,
2344  IN PVOID Buffer,
2345  IN ULONG Size,
2347  );
2348 
2349 NTSTATUS
2351  IN PEXT2_IRP_CONTEXT IrpContext,
2352  IN PEXT2_VCB Vcb,
2353  IN PEXT2_MCB Mcb,
2354  IN PVOID Buffer,
2355  IN ULONG Size,
2357 );
2358 
2359 NTSTATUS
2361  PEXT2_IRP_CONTEXT IrpContext,
2362  PEXT2_VCB Vcb,
2363  PEXT2_MCB Mcb,
2364  ULONG Size
2365 );
2366 
2367 //
2368 // MountPoint process workitem
2369 //
2370 
2371 VOID
2373  IN USHORT Flag );
2374 
2375 VOID
2377  IN USHORT Flag );
2378 
2379 BOOLEAN
2381  IN PEXT2_IRP_CONTEXT IrpContext,
2382  IN PEXT2_VCB Vcb,
2383  IN BOOLEAN bForce );
2384 
2385 NTSTATUS
2387  IN BOOLEAN FlushBeforePurge);
2388 
2389 NTSTATUS
2391  IN BOOLEAN FlushBeforePurge);
2392 
2393 BOOLEAN
2395 
2396 NTSTATUS
2399 
2400 NTSTATUS
2401 Ext2LockVolume (IN PEXT2_IRP_CONTEXT IrpContext);
2402 
2403 NTSTATUS
2406 
2407 NTSTATUS
2409 
2410 NTSTATUS
2412 
2413 NTSTATUS
2415 
2416 NTSTATUS
2418  IN PEXT2_IRP_CONTEXT IrpContext,
2419  IN PEXT2_VCB Vcb,
2420  IN PEXT2_FCB Fcb,
2421  IN PLARGE_INTEGER RequestVbn,
2422  OUT PLARGE_INTEGER * pMappedRuns
2423 );
2424 
2425 NTSTATUS
2427 
2428 NTSTATUS
2430 
2431 NTSTATUS
2433 
2434 NTSTATUS
2436 
2437 BOOLEAN
2439  IN PEXT2_IRP_CONTEXT IrpContext,
2441 );
2442 
2443 NTSTATUS
2444 Ext2MountVolume (IN PEXT2_IRP_CONTEXT IrpContext);
2445 
2446 VOID
2447 Ext2VerifyVcb (IN PEXT2_IRP_CONTEXT IrpContext,
2448  IN PEXT2_VCB Vcb );
2449 NTSTATUS
2451 
2452 NTSTATUS
2454 
2455 NTSTATUS
2457 
2458 NTSTATUS
2460 
2461 //
2462 // HTree.c
2463 //
2464 
2465 struct buffer_head *ext3_append(struct ext2_icb *icb, struct inode *inode,
2466  ext3_lblk_t *block, int *err);
2467 
2468 void ext3_set_de_type(struct super_block *sb,
2469  struct ext3_dir_entry_2 *de,
2470  umode_t mode);
2471 
2472 __u32 ext3_current_time(struct inode *in);
2473 void ext3_warning (struct super_block * sb, const char * function,
2474  char * fmt, ...);
2475 #define ext3_error ext3_warning
2476 #define ext4_error ext3_error
2477 
2478 void ext3_update_dx_flag(struct inode *inode);
2479 int ext3_mark_inode_dirty(struct ext2_icb *icb, struct inode *in);
2480 
2481 void ext3_inc_count(struct inode *inode);
2482 void ext3_dec_count(struct inode *inode);
2483 
2484 struct buffer_head *
2485  ext3_find_entry (struct ext2_icb *icb, struct dentry *dentry,
2486  struct ext3_dir_entry_2 ** res_dir);
2487 struct buffer_head *
2488  ext3_dx_find_entry(struct ext2_icb *, struct dentry *dentry,
2489  struct ext3_dir_entry_2 **res_dir, int *err);
2490 
2491 typedef int (*filldir_t)(void *, const char *, int, unsigned long, __u32, unsigned);
2492 int ext3_dx_readdir(struct file *filp, filldir_t filldir, void * context);
2493 
2494 struct buffer_head *ext3_bread(struct ext2_icb *icb, struct inode *inode,
2495  unsigned long block, int *err);
2496 int add_dirent_to_buf(struct ext2_icb *icb, struct dentry *dentry,
2497  struct inode *inode, struct ext3_dir_entry_2 *de,
2498  struct buffer_head *bh);
2499 #if !defined(__REACTOS__) || (defined(_MSC_VER) && !defined(__clang__))
2500 /* FIXME: Inspect the clang-cl code path */
2501 struct ext3_dir_entry_2 *
2502  do_split(struct ext2_icb *icb, struct inode *dir,
2503  struct buffer_head **bh,struct dx_frame *frame,
2504  struct dx_hash_info *hinfo, int *error);
2505 #endif
2506 
2507 int ext3_add_entry(struct ext2_icb *icb, struct dentry *dentry, struct inode *inode);
2508 
2509 int ext3_delete_entry(struct ext2_icb *icb, struct inode *dir,
2510  struct ext3_dir_entry_2 *de_del,
2511  struct buffer_head *bh);
2512 
2513 int ext3_is_dir_empty(struct ext2_icb *icb, struct inode *inode);
2514 
2515 //
2516 // Init.c
2517 //
2518 
2519 NTSTATUS
2521 BOOLEAN
2523 
2524 VOID NTAPI
2526 
2527 //
2528 // Indirect.c
2529 //
2530 
2531 NTSTATUS
2533  IN PEXT2_IRP_CONTEXT IrpContext,
2534  IN PEXT2_VCB Vcb,
2535  IN PEXT2_MCB Mcb,
2536  IN ULONG Index,
2537  IN BOOLEAN bAlloc,
2538  OUT PULONG pBlock,
2539  OUT PULONG Number
2540 );
2541 
2542 NTSTATUS
2544  PEXT2_IRP_CONTEXT IrpContext,
2545  PEXT2_VCB Vcb,
2546  PEXT2_MCB Mcb,
2547  ULONG Start,
2548  ULONG End,
2550 );
2551 
2552 NTSTATUS
2554  PEXT2_IRP_CONTEXT IrpContext,
2555  PEXT2_VCB Vcb,
2556  PEXT2_MCB Mcb,
2558 );
2559 
2560 
2561 //
2562 // linux.c: linux lib implemenation
2563 //
2564 
2565 int
2566 ext2_init_linux();
2567 
2568 void
2570 
2571 
2572 //
2573 // Lock.c
2574 //
2575 
2576 NTSTATUS
2577 Ext2LockControl (IN PEXT2_IRP_CONTEXT IrpContext);
2578 
2579 
2580 //
2581 // Memory.c
2582 //
2583 
2584 VOID
2585 NTAPI
2587  PVOID Context
2588 );
2589 
2590 VOID
2591 NTAPI
2593  PVOID Context
2594 );
2595 
2596 VOID
2597 NTAPI
2599  PVOID Context
2600 );
2601 
2602 
2605  IN PIRP Irp );
2606 
2607 VOID
2609 
2610 
2611 PEXT2_FCB
2613  IN PEXT2_VCB Vcb,
2614  IN PEXT2_MCB Mcb
2615 );
2616 
2617 VOID
2619 
2620 VOID
2622 VOID
2624 
2625 VOID
2627 
2628 PEXT2_CCB
2630 
2631 VOID
2632 Ext2FreeMcb (
2633  IN PEXT2_VCB Vcb,
2634  IN PEXT2_MCB Mcb
2635 );
2636 
2637 VOID
2639 
2642 
2643 VOID
2645 
2646 struct dentry * Ext2AllocateEntry();
2647 VOID Ext2FreeEntry (IN struct dentry *de);
2649 
2652 
2653 VOID
2655 
2656 ULONG
2658 
2659 VOID
2661  IN PEXT2_EXTENT Chain,
2663 );
2664 
2665 VOID
2667 
2668 NTSTATUS
2670  IN PEXT2_IRP_CONTEXT IrpContext,
2671  IN PEXT2_VCB Vcb,
2672  IN PEXT2_MCB Mcb,
2674  IN ULONG Size,
2675  IN BOOLEAN bAlloc,
2676  OUT PEXT2_EXTENT * Chain
2677 );
2678 
2679 BOOLEAN
2680 Ext2ListExtents(PLARGE_MCB Extents);
2681 
2682 VOID
2684  PLARGE_MCB Zone,
2685  LONGLONG Vbn,
2686  LONGLONG Lbn,
2687  LONGLONG Length,
2688  BOOLEAN bAdded
2689 );
2690 
2691 VOID
2693 
2694 BOOLEAN
2696  IN PEXT2_VCB Vcb,
2697  IN LONGLONG Vbn,
2699 );
2700 
2701 BOOLEAN
2703  IN PEXT2_VCB Vcb,
2704  IN LONGLONG Vbn,
2706 );
2707 
2708 BOOLEAN
2710  IN PEXT2_VCB Vcb,
2711  IN LONGLONG Vbn,
2712  OUT PLONGLONG Lbn,
2714 );
2715 
2716 BOOLEAN
2718  IN PEXT2_VCB Vcb,
2719  IN PEXT2_MCB Mcb,
2720  IN LONGLONG Vbn,
2721  IN LONGLONG Lbn,
2723 );
2724 
2725 BOOLEAN
2727  IN PEXT2_VCB Vcb,
2728  IN PEXT2_MCB Mcb,
2729  IN LONGLONG Vbn,
2731 );
2732 
2733 BOOLEAN
2735  IN PEXT2_VCB Vcb,
2736  IN PEXT2_MCB Mcb,
2737  IN LONGLONG Vbn,
2738  OUT PLONGLONG Lbn,
2740 );
2741 
2742 BOOLEAN
2744  IN PEXT2_VCB Vcb,
2745  IN PEXT2_MCB Mcb,
2746  IN ULONG Block,
2747  IN ULONG Length
2748 );
2749 
2750 BOOLEAN
2752  IN PEXT2_VCB Vcb,
2753  IN PEXT2_MCB Mcb,
2754  IN ULONG Block,
2755  IN ULONG Length
2756 );
2757 
2758 BOOLEAN
2760  IN PEXT2_VCB Vcb,
2761  IN PEXT2_MCB Mcb,
2762  IN ULONG Start,
2763  IN ULONG Block,
2764  IN ULONG Number
2765 );
2766 
2767 BOOLEAN
2769  IN PEXT2_VCB Vcb,
2770  IN PEXT2_MCB Mcb,
2771  IN ULONG Start,
2772  IN PULONG Block,
2773  IN PULONG Mapped
2774 );
2775 
2776 BOOLEAN
2778  IN PEXT2_VCB Vcb,
2779  IN PEXT2_MCB Mcb,
2780  IN ULONG Start,
2781  IN ULONG Number
2782 );
2783 
2784 NTSTATUS
2786  IN PEXT2_IRP_CONTEXT IrpContext,
2787  IN PEXT2_VCB Vcb,
2788  IN PEXT2_MCB Mcb
2789 );
2790 
2791 BOOLEAN
2796 );
2797 
2798 
2799 PEXT2_MCB
2801  IN PEXT2_VCB Vcb,
2804  IN ULONG FileAttr
2805 );
2806 
2807 PEXT2_MCB
2809  PEXT2_VCB Vcb,
2810  PEXT2_MCB Parent,
2812 );
2813 
2814 PEXT2_MCB
2816  PEXT2_MCB Parent,
2818 );
2819 
2820 VOID
2822  PEXT2_VCB Vcb,
2823  PEXT2_MCB Parent,
2825 );
2826 
2827 BOOLEAN
2829  PEXT2_VCB Vcb,
2830  PEXT2_MCB Mcb
2831 );
2832 
2833 VOID
2835  PEXT2_VCB Vcb
2836 );
2837 
2838 BOOLEAN
2840  PEXT2_IRP_CONTEXT IrpContext,
2841  PEXT2_VCB Vcb, LONGLONG Block
2842 );
2843 
2844 BOOLEAN
2846  PEXT2_IRP_CONTEXT IrpContext,
2847  PEXT2_VCB Vcb
2848 );
2849 
2850 VOID
2852 
2853 VOID
2855 
2856 NTSTATUS
2858  IN PEXT2_VCB Vcb,
2860 );
2861 
2862 NTSTATUS
2864  PEXT2_IRP_CONTEXT IrpContext,
2865  PEXT2_VCB Vcb,
2866  PEXT2_SUPER_BLOCK Ext2Sb,
2868  PDEVICE_OBJECT VolumeDevice,
2869  PVPB Vpb );
2870 
2871 VOID
2873 
2874 VOID
2876 
2877 NTSTATUS
2879  IN PEXT2_IRP_CONTEXT IrpContext,
2880  IN NTSTATUS Status );
2881 
2882 VOID
2885 
2886 VOID
2888 
2889 
2890 VOID
2892 
2893 VOID
2895 
2896 PEXT2_MCB
2898  PEXT2_VCB Vcb,
2899  BOOLEAN Wait,
2900  ULONG Number
2901 );
2902 
2903 VOID NTAPI
2905  PVOID Context
2906 );
2907 
2908 NTSTATUS
2910 VOID
2911 NTAPI
2913 
2914 //
2915 // Misc.c
2916 //
2917 
2918 ULONG
2920 
2922 Ext2NtTime (IN ULONG i_time);
2923 
2924 ULONG
2925 Ext2LinuxTime (IN LARGE_INTEGER SysTime);
2926 
2927 ULONG
2929  IN PEXT2_VCB Vcb,
2930  IN PANSI_STRING Oem
2931 );
2932 
2933 NTSTATUS
2935  IN PEXT2_VCB Vcb,
2936  IN OUT PUNICODE_STRING Oem,
2937  IN POEM_STRING Unicode
2938 );
2939 
2940 ULONG
2942  IN PEXT2_VCB Vcb,
2943  IN PUNICODE_STRING Unicode
2944 );
2945 
2946 NTSTATUS
2948  IN PEXT2_VCB Vcb,
2949  IN OUT POEM_STRING Oem,
2950  IN PUNICODE_STRING Unicode
2951 );
2952 
2953 VOID
2954 Ext2Sleep(ULONG ms);
2955 
2957 NTSTATUS Ext2WinntError(int rc);
2958 
2961 //
2962 // nls/nls_rtl.c
2963 //
2964 
2965 int
2966 Ext2LoadAllNls();
2967 
2968 VOID
2970 
2971 //
2972 // Pnp.c
2973 //
2974 
2975 NTSTATUS
2976 Ext2Pnp(IN PEXT2_IRP_CONTEXT IrpContext);
2977 
2978 NTSTATUS
2980  PEXT2_IRP_CONTEXT IrpContext,
2981  PEXT2_VCB Vcb );
2982 
2983 NTSTATUS
2985  PEXT2_IRP_CONTEXT IrpContext,
2986  PEXT2_VCB Vcb );
2987 
2988 NTSTATUS
2990  PEXT2_IRP_CONTEXT IrpContext,
2991  PEXT2_VCB Vcb );
2992 
2993 NTSTATUS
2995  PEXT2_IRP_CONTEXT IrpContext,
2996  PEXT2_VCB Vcb );
2997 
2998 
2999 //
3000 // Read.c
3001 //
3002 
3003 NTSTATUS
3004 Ext2ReadInode (
3005  IN PEXT2_IRP_CONTEXT IrpContext,
3006  IN PEXT2_VCB Vcb,
3007  IN PEXT2_MCB Mcb,
3009  IN PVOID Buffer,
3010  IN ULONG Size,
3011  IN BOOLEAN bDirectIo,
3012  OUT PULONG dwReturn
3013 );
3014 
3015 NTSTATUS
3016 Ext2Read (IN PEXT2_IRP_CONTEXT IrpContext);
3017 
3018 
3019 //
3020 // ext3\recover.c
3021 //
3022 
3023 PEXT2_MCB
3025  PEXT2_VCB Vcb,
3026  ULONG jNo
3027 );
3028 
3029 INT
3031  PEXT2_VCB Vcb,
3032  PULONG jNo
3033 );
3034 
3035 INT
3037  PEXT2_IRP_CONTEXT IrpContext,
3038  PEXT2_VCB Vcb
3039 );
3040 
3041 //
3042 // Shutdown.c
3043 //
3044 
3045 
3046 NTSTATUS
3047 Ext2ShutDown (IN PEXT2_IRP_CONTEXT IrpContext);
3048 
3049 
3050 //
3051 // Volinfo.c
3052 //
3053 
3054 NTSTATUS
3056 
3057 NTSTATUS
3059 
3060 //
3061 // Write.c
3062 //
3063 
3064 typedef struct _EXT2_RW_CONTEXT {
3074 
3076 
3077 #define EXT2_RW_CONTEXT_WRITE 1
3078 
3079 NTSTATUS
3081  IN PEXT2_IRP_CONTEXT IrpContext,
3082  IN PEXT2_VCB Vcb,
3083  IN PEXT2_MCB Mcb,
3085  IN PVOID Buffer,
3086  IN ULONG Size,
3087  IN BOOLEAN bDirectIo,
3088  OUT PULONG dwReturn
3089 );
3090 
3091 
3092 VOID
3094  PEXT2_VCB Vcb,
3095  PEXT2_FCB Fcb,
3097 
3098 BOOLEAN
3099 Ext2ZeroData (
3100  IN PEXT2_IRP_CONTEXT IrpContext,
3101  IN PEXT2_VCB Vcb,
3104  IN PLARGE_INTEGER End );
3105 
3106 NTSTATUS
3107 Ext2Write (IN PEXT2_IRP_CONTEXT IrpContext);
3108 
3109 #endif /* _EXT2_HEADER_ */
static unsigned int block
Definition: xmlmemory.c:118
void ext4_block_bitmap_set(struct super_block *sb, struct ext4_group_desc *bg, ext4_fsblk_t blk)
Definition: generic.c:2448
Definition: ext2fs.h:1103
NTSTATUS Ext2WinntError(int rc)
Definition: misc.c:410
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
signed char * PCHAR
Definition: retypes.h:7
int add
Definition: i386-dis.c:3122
ULONG ReferenceCount
Definition: ext2fs.h:847
LIST_ENTRY Link
Definition: ext2fs.h:932
struct _EXT2_FCB * PEXT2_FCB
_In_ PLARGE_INTEGER EndingOffset
Definition: iotypes.h:1553
struct _EXT2_EXTENT * Next
Definition: ext2fs.h:1115
NTSTATUS Ext2LoadSuper(IN PEXT2_VCB Vcb, IN BOOLEAN bVerify, OUT PEXT2_SUPER_BLOCK *Sb)
Definition: generic.c:25
ULONG Flags
Definition: ext2fs.h:854
BOOLEAN Ext2RemoveVcbExtent(IN PEXT2_VCB Vcb, IN LONGLONG Vbn, IN LONGLONG Length)
Definition: memory.c:700
DISK_GEOMETRY DiskGeometry
Definition: ext2fs.h:712
Definition: ext3_fs.h:761
ULONG_PTR ERESOURCE_THREAD
Definition: extypes.h:208
#define IN
Definition: typedefs.h:38
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:941
NTSTATUS Ext2QueryRetrievalPointers(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:774
VOID Ext2FreeFcb(IN PEXT2_FCB Fcb)
Definition: memory.c:240
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:624
PEXT2_CCB Ext2AllocateCcb(ULONG Flags, PEXT2_MCB SymLink)
Definition: memory.c:320
ext4_fsblk_t ext4_inode_table(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2408
PEXT2_INODE Ext2AllocateInode(PEXT2_VCB Vcb)
Definition: memory.c:387
#define InterlockedAnd
Definition: interlocked.h:62
NPAGED_LOOKASIDE_LIST Ext2McbLookasideList
Definition: ext2fs.h:547
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ FLT_IO_OPERATION_FLAGS _Out_opt_ PULONG BytesWritten
Definition: fltkernel.h:1293
NTSTATUS Ext2DeleteFile(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_FCB Fcb, PEXT2_MCB Mcb)
Definition: fileinfo.c:1915
PEXT2_FCB Fcb
Definition: ext2fs.h:905
BOOLEAN NTAPI 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:493
Definition: halp.h:205
struct _FCB_LIST_ENTRY * PFCB_LIST_ENTRY
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
PEXT2_MCB Target
Definition: ext2fs.h:899
NTSTATUS Ext2NotifyChangeDirectory(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: dirctl.c:1029
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST NPAGED_LOOKASIDE_LIST
NTSTATUS Ext2Cleanup(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: cleanup.c:21
BOOLEAN Ext2RefreshSuper(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
Definition: generic.c:88
ERESOURCE MetaBlock
Definition: ext2fs.h:648
struct inode Inode
Definition: ext2fs.h:936
ULONG InodeSize
Definition: ext2fs.h:731
unsigned long ext4_count_free_inodes(struct super_block *sb)
Definition: generic.c:2987
NTSTATUS Ext2DismountVolume(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:2521
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:589
NTSTATUS Ext2DiskShutDown(PEXT2_VCB Vcb)
Definition: block.c:724
NTSTATUS Ext2OplockRequest(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:451
BOOLEAN Ext2SaveInodeXattr(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN struct inode *Inode, IN PEXT2_INODE InodeXattr)
Definition: generic.c:617
PEXT2_MCB Ext2AllocateMcb(IN PEXT2_VCB Vcb, IN PUNICODE_STRING FileName, IN PUNICODE_STRING Parent, IN ULONG FileAttr)
Definition: memory.c:1430
Type
Definition: Type.h:6
USHORT MaxDepth
Definition: ext2fs.h:550
__inline ULONG DEC_OBJ_CNT(PULONG _C)
Definition: ext2fs.h:973
ULONG BlockSize
Definition: ext2fs.h:719
EXT2_FCBVCB
Definition: ext2fs.h:823
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:2810
#define error(str)
Definition: mkdosfs.c:1605
struct nls_table * PageTable
Definition: ext2fs.h:556
struct buffer_head * ext3_dx_find_entry(struct ext2_icb *, struct dentry *dentry, struct ext3_dir_entry_2 **res_dir, int *err)
NTSTATUS Ext2FileSystemControl(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:2848
#define __cdecl
Definition: accygwin.h:79
void ext4_free_blks_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
Definition: generic.c:2472
NTSTATUS efc_status
Definition: ext2fs.h:1183
BOOLEAN Ext2IsHandleCountZero(IN PEXT2_VCB Vcb)
Definition: fsctl.c:68
#define HIDINGPAT_LEN
Definition: common.h:160
loff_t max_bytes
Definition: ext2fs.h:773
#define DEC_MEM_COUNT(_i, _p, _s)
Definition: ext2fs.h:599
ULONG Ext2TotalBlocks(PEXT2_VCB Vcb, PLARGE_INTEGER Size, PULONG pMeta)
Definition: fileinfo.c:1072
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT _In_ PDEVICE_OBJECT TargetDevice
Definition: iofuncs.h:688
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
ULONG nr
Definition: thread.c:7
EXT2_IDENTIFIER Identifier
Definition: ext2fs.h:1100
void ext3_update_dx_flag(struct inode *inode)
Definition: htree.c:368
BOOLEAN Ext2SaveSuper(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
Definition: generic.c:63
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN OUT PIO_STATUS_BLOCK IoStatus
Definition: fatprocs.h:2650
Definition: http.c:6587
VOID Ext2SetVpbFlag(IN PVPB Vpb, IN USHORT Flag)
Definition: fsctl.c:44
LIST_ENTRY Next
Definition: ext2fs.h:826
struct ext3_inode * PEXT2_INODE
Definition: ext2fs.h:106
static GLenum _GLUfuncptr fn
Definition: wgl_font.c:159
LARGE_INTEGER Ext2NtTime(IN ULONG i_time)
Definition: misc.c:40
struct ext3_dir_entry * PEXT2_DIR_ENTRY
Definition: ext2fs.h:108
_In_ PIRP Irp
Definition: csq.h:116
struct _EXT2_GLOBAL::@646 Codepage
enum _FAST_IO_POSSIBLE FAST_IO_POSSIBLE
superblock * sb
Definition: btrfs.c:3876
VOID(NTAPI * EXT2_REAPER_RELEASE)(PVOID)
Definition: ext2fs.h:492
int ext4_check_descriptors(struct super_block *sb)
Definition: generic.c:3024
_In_ PLARGE_INTEGER _Out_ struct _ERESOURCE ** ResourceToRelease
Definition: iotypes.h:1554
loff_t ext3_max_size(int blkbits, int has_huge_files)
Definition: generic.c:2234
BOOLEAN Ext2LoadGroupBH(IN PEXT2_VCB Vcb)
Definition: generic.c:166
VOID Ext2DropGroupBH(IN PEXT2_VCB Vcb)
Definition: generic.c:128
#define EXT2_BLOCK_TYPES
Definition: ext2fs.h:77
SECTION_OBJECT_POINTERS SectionObject
Definition: ext2fs.h:829
Definition: ext3_fs.h:774
NPAGED_LOOKASIDE_LIST Ext2IrpContextLookasideList
Definition: ext2fs.h:544
gid_t gid
Definition: ext2fs.h:756
PFILE_OBJECT Volume
Definition: ext2fs.h:740
VOID NTAPI Ext2StopReaper(PEXT2_REAPER Reaper)
Definition: memory.c:3512
ext4_fsblk_t ext4_inode_bitmap(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2400
VOID NTAPI DriverUnload(IN PDRIVER_OBJECT DriverObject)
Definition: green.c:15
PDEVICE_OBJECT DeviceObject
Definition: ext2fs.h:1051
static struct cd_image cd
Definition: cdmake.c:182
GLuint GLuint GLsizei count
Definition: gl.h:1545
ULONG Ext2InodeType(PEXT2_MCB Mcb)
Definition: fileinfo.c:1901
ERESOURCE Resource
Definition: ext2fs.h:510
Definition: fs.h:64
_In_opt_ PSID Group
Definition: rtlfuncs.h:1606
PEXT2_MCB Ext2LoadInternalJournal(PEXT2_VCB Vcb, ULONG jNo)
Definition: recover.c:29
unsigned char * PUCHAR
Definition: retypes.h:3
ULONG ReferenceCount
Definition: ext2fs.h:681
char CHAR
Definition: xmlstorage.h:175
LONGLONG Lba
Definition: ext2fs.h:1111
unsigned long ext4_bg_num_gdb(struct super_block *sb, ext4_group_t group)
Definition: generic.c:2655
int(* filldir_t)(void *, const char *, int, unsigned long, __u32, unsigned)
Definition: ext2fs.h:2491
FILE_LOCK FileLockAnchor
Definition: ext2fs.h:835
VOID Ext2ClearAllExtents(PLARGE_MCB Zone)
Definition: memory.c:637
EXT2_REAPER bhReaper
Definition: ext2fs.h:541
EXT2_STAT_ARRAY_V2 Size
Definition: common.h:137
LONG NTSTATUS
Definition: precomp.h:26
ULONG Ext2CountExtents(IN PEXT2_EXTENT Chain)
Definition: memory.c:513
ULONG OpenVolumeCount
Definition: ext2fs.h:684
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
GLintptr offset
Definition: glext.h:5920
_In_opt_ ULONG Base
Definition: rtlfuncs.h:2327
volatile BOOL bShutDown
Definition: ServiceMain.c:12
NTSTATUS Ext2ReadDisk(IN PEXT2_VCB Vcb, IN ULONGLONG Offset, IN ULONG Size, IN PVOID Buffer, IN BOOLEAN bVerify)
Definition: block.c:539
struct block_device bd
Definition: ext2fs.h:765
struct buffer_head * ext3_bread(struct ext2_icb *icb, struct inode *inode, unsigned long block, int *err)
Definition: htree.c:230
struct _EXT2_RW_CONTEXT EXT2_RW_CONTEXT
_Must_inspect_result_ _In_ LONGLONG _In_ LONGLONG Lbn
Definition: fsrtlfuncs.h:479
ext3_fsblk_t descriptor_loc(struct super_block *sb, ext3_fsblk_t logical_sb_block, unsigned int nr)
Definition: generic.c:2669
PIRP Irp
Definition: ext2fs.h:1041
BOOLEAN NTAPI Ext2AcquireForLazyWrite(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:23
VOID NTAPI Ext2ReaperThread(PVOID Context)
struct _EXT2_PERF_STATISTICS_V2::@643 Irps[IRP_MJ_MAXIMUM_FUNCTION+1]
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
PDEVICE_OBJECT DeviceObject
Definition: ext2fs.h:703
NPAGED_LOOKASIDE_LIST Ext2FcbLookasideList
Definition: ext2fs.h:545
NTSTATUS Ext2FlushFile(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_FCB Fcb, IN PEXT2_CCB Ccb)
Definition: flush.c:54
VOID Ext2DestroyVcb(IN PEXT2_VCB Vcb)
Definition: memory.c:2807
VOID Ext2FreeMcb(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
Definition: memory.c:1538
NTSTATUS Ext2LockUserBuffer(IN PIRP Irp, IN ULONG Length, IN LOCK_OPERATION Operation)
Definition: block.c:101
ERESOURCE MetaInode
Definition: ext2fs.h:645
VOID Ext2JointExtents(IN PEXT2_EXTENT Chain, IN PEXT2_EXTENT Extent)
Definition: memory.c:527
VOID Ext2DbgPrintComplete(IN PIRP Irp, IN BOOLEAN bPrint)
ULONG Flags
Definition: ext2fs.h:1044
BOOLEAN Ext2IsDirectoryEmpty(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
NTSTATUS Ext2CreateFile(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, OUT PBOOLEAN OpPostIrp)
ext4_fsblk_t ext4_count_free_blocks(struct super_block *sb)
Definition: generic.c:2966
NTSTATUS Ext2SetEa(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: ea.c:436
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
LARGE_MCB MetaExts
Definition: ext2fs.h:923
struct ext3_sb_info sbi
Definition: ext2fs.h:767
EXT2_PERF_STATISTICS_V2 PerfStat
Definition: ext2fs.h:573
NTSTATUS Ext2FlushVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
Definition: flush.c:39
static OUT PIO_STATUS_BLOCK OUT PVOID IN ULONG IN FILE_INFORMATION_CLASS FileInformationClass
Definition: pipe.c:75
PEXT2_GLOBAL Ext2Global
Definition: init.c:16
PEXT2_MCB Parent
Definition: ext2fs.h:894
LIST_ENTRY VcbList
Definition: ext2fs.h:536
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical 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:716
ERESOURCE McbLock
Definition: ext2fs.h:651
STRING OEM_STRING
Definition: umtypes.h:203
EXT2_IDENTIFIER Identifier
Definition: ext2fs.h:507
BOOLEAN Ext2SaveBlock(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG dwBlk, IN PVOID Buf)
Definition: generic.c:694
NTSTATUS Ext2CreateVolume(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
ULONG OpenHandleCount
Definition: ext2fs.h:844
PEXT2_MCB McbTree
Definition: ext2fs.h:663
_In_ UCHAR EntrySize
Definition: iofuncs.h:640
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
NTSTATUS Ext2ProcessVolumeProperty(IN PEXT2_VCB Vcb, IN PEXT2_VOLUME_PROPERTY3 Property, IN ULONG Length)
Definition: devctl.c:360
NTSTATUS Ext2FlushVcb(IN PEXT2_VCB Vcb)
Definition: generic.c:319
VOID Ext2QueueCloseRequest(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: close.c:190
PEXT2_MCB Mcb
Definition: ext2fs.h:863
long uid_t
Definition: various.h:8
NTSTATUS Ext2ReadSync(IN PEXT2_VCB Vcb, IN ULONGLONG Offset, IN ULONG Length, OUT PVOID Buffer, IN BOOLEAN bVerify)
BOOLEAN Ext2IsEaNameValid(IN OEM_STRING Name)
Definition: ea.c:389
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
int32_t INT
Definition: typedefs.h:56
BOOLEAN Ext2CheckSetBlock(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, LONGLONG Block)
Definition: memory.c:1844
NTSTATUS NTAPI Ext2AcquireFileForModWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER EndingOffset, OUT PERESOURCE *ResourceToRelease, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1029
ERESOURCE_THREAD ThreadId
Definition: ext2fs.h:3070
VOID Ext2UnlinkMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
Definition: memory.c:2939
ULONG32 u32
Definition: btrfs.h:14
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN CheckForReadOperation
Definition: fatprocs.h:2650
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:50
BOOLEAN Ext2IsDot(PUNICODE_STRING name)
Definition: misc.c:524
LIST_ENTRY McbList
Definition: ext2fs.h:660
ULONG ProcessNameOffset
struct _EXT2_FCBVCB EXT2_FCBVCB
CHAR InputBuffer[80]
Definition: conmgr.c:33
struct super_block sb
Definition: ext2fs.h:766
static BOOL Set
Definition: pageheap.c:10
NPAGED_LOOKASIDE_LIST Ext2CcbLookasideList
Definition: ext2fs.h:546
PEXT2_CCB Ccb
Definition: ext2fs.h:1060
PEXT2_MCB SymLink
Definition: ext2fs.h:1005
NTSTATUS Ext2LockVcb(IN PEXT2_VCB Vcb, IN PFILE_OBJECT FileObject)
Definition: fsctl.c:94
unsigned long long ext4_fsblk_t
Definition: ext3_fs_i.h:27
void ext3_dec_count(struct inode *inode)
Definition: htree.c:312
NTSTATUS Ext2TruncateFile(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, PLARGE_INTEGER AllocationSize)
Definition: fileinfo.c:1199
VOID Ext2SyncUninitializeCacheMap(IN PFILE_OBJECT FileObject)
Definition: memory.c:2865
NTSTATUS Ext2LockControl(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: lock.c:25
EXT2_IDENTIFIER_TYPE Type
Definition: ext2fs.h:472
NTSTATUS Ext2QueryEa(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: ea.c:94
int ext3_inode_blocks_set(struct ext3_inode *raw_inode, struct inode *inode)
Definition: generic.c:2351
BOOLEAN Ext2RemoveMcbMetaExts(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Block, IN ULONG Length)
Definition: memory.c:985
Definition: fs.h:78
NPAGED_LOOKASIDE_LIST Ext2DentryLookasideList
Definition: ext2fs.h:549
ULONG FileAttr
Definition: ext2fs.h:914
EXT2_REAPER_RELEASE Free
Definition: ext2fs.h:498
UCHAR AnsiName[CODEPAGE_MAXLEN]
Definition: ext2fs.h:555
PDEVICE_OBJECT RealDevice
Definition: ext2fs.h:1054
__GNU_EXTENSION typedef __int64 * PLONGLONG
Definition: ntbasedef.h:389
NTSTATUS Ext2DispatchRequest(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: dispatch.c:216
CHAR sHidingPrefix[HIDINGPAT_LEN]
Definition: ext2fs.h:563
VOID Ext2FreeEntry(IN struct dentry *de)
Definition: memory.c:432
CHAR sHidingSuffix[HIDINGPAT_LEN]
Definition: ext2fs.h:752
BOOLEAN Ext2CheckDismount(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bForce)
Definition: fsctl.c:2592
int ext3_dx_readdir(struct file *filp, filldir_t filldir, void *context)
NTSTATUS Ext2GetRetrievalPointers(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:911
NTSTATUS Ex2ProcessMountPoint(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_MOUNT_POINT MountPoint, IN ULONG Length)
Definition: devctl.c:699
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
int Ext2CheckFileAccess(PEXT2_VCB Vcb, PEXT2_MCB Mcb, int attempt)
Definition: access.c:51
VOID Ext2InsertMcb(PEXT2_VCB Vcb, PEXT2_MCB Parent, PEXT2_MCB Child)
Definition: memory.c:1686
NPAGED_LOOKASIDE_LIST Ext2ExtLookasideList
Definition: ext2fs.h:548
BOOLEAN NTAPI 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:601
ERESOURCE * PERESOURCE
Definition: env_spec_w32.h:595
BOOLEAN NTAPI 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:60
NTSTATUS Ext2QueueRequest(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: dispatch.c:150
struct inode * Inode
Definition: ext2fs.h:857
VOID NTAPI Ext2bhReaperThread(PVOID Context)
Definition: memory.c:3213
PEXT2_SUPER_BLOCK SuperBlock
Definition: ext2fs.h:716
struct _EXT2_GLOBAL * PEXT2_GLOBAL
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
ULONG max_data_blocks
Definition: ext2fs.h:771
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
VOID NTAPI Ext2DeQueueRequest(IN PVOID Context)
Definition: dispatch.c:178
NTSTATUS Ext2IsFileRemovable(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Fcb, IN PEXT2_CCB Ccb)
Definition: fileinfo.c:1234
ULONG Offset
Definition: ext2fs.h:1112
int ext3_mark_inode_dirty(struct ext2_icb *icb, struct inode *in)
Definition: htree.c:360
BOOLEAN Ext2LookupBlockExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Start, IN PULONG Block, IN PULONG Mapped)
Definition: memory.c:1061
BOOLEAN Ext2QueryRegistrySettings(IN PUNICODE_STRING RegistryPath)
Definition: init.c:294
UINT gid_t
Definition: types.h:89
NTSTATUS NTAPI Ext2ReleaseFileForCcFlush(IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1092
LARGE_INTEGER CreationTime
Definition: ext2fs.h:926
void ext4_used_dirs_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
Definition: generic.c:2488
long LONG
Definition: pedump.c:60
BOOLEAN Ext2LoadGroup(IN PEXT2_VCB Vcb)
Definition: generic.c:203
VOID Ext2FreeIrpContext(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: memory.c:114
EXT2_IDENTIFIER Identifier
Definition: ext2fs.h:624
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
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN FailImmediately
Definition: fatprocs.h:2697
unsigned __int64 blkcnt_t
Definition: types.h:79
int Ext2LoadAllNls()
Definition: nls.c:118
PNOTIFY_SYNC NotifySync
Definition: ext2fs.h:700
IO_STACK_LOCATION EXTENDED_IO_STACK_LOCATION
Definition: ext2fs.h:174
void ext4_free_inodes_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
Definition: generic.c:2480
NTSTATUS Ext2FreeInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Inode, IN ULONG Type)
Definition: generic.c:1699
VOID Ext2CheckExtent(PLARGE_MCB Zone, LONGLONG Vbn, LONGLONG Lbn, LONGLONG Length, BOOLEAN bAdded)
Definition: memory.c:583
NTSTATUS ExceptionCode
Definition: ext2fs.h:1072
PETHREAD Thread
Definition: ext2fs.h:495
BOOLEAN Ext2BuildName(IN OUT PUNICODE_STRING Target, IN PUNICODE_STRING File, IN PUNICODE_STRING Parent)
Definition: memory.c:1361
void ext4_itable_unused_set(struct super_block *sb, struct ext4_group_desc *bg, __u32 count)
Definition: generic.c:2496
struct _FCB_LIST_ENTRY FCB_LIST_ENTRY
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:652
#define le32_to_cpu
Definition: module.h:147
ULONG Flags
Definition: ext2fs.h:891
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 Ext2UnlinkFcb(IN PEXT2_FCB Fcb)
Definition: memory.c:202
VOID Ext2StartFloppyFlushDpc(PEXT2_VCB Vcb, PEXT2_FCB Fcb, PFILE_OBJECT FileObject)
Definition: write.c:123
NTSTATUS Ext2UnicodeToOEM(IN PEXT2_VCB Vcb, IN OUT POEM_STRING Oem, IN PUNICODE_STRING Unicode)
Definition: misc.c:261
ULONG EaIndex
Definition: ext2fs.h:1014
NTSTATUS Ext2PnpRemove(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
VOID Ext2DropBH(IN PEXT2_VCB Vcb)
Definition: generic.c:262
WCHAR wHidingPrefix[HIDINGPAT_LEN]
Definition: ext2fs.h:560
PDEVICE_OBJECT DiskdevObject
Definition: ext2fs.h:530
unsigned char BOOLEAN
KEVENT Event
Definition: ext2fs.h:3066
LARGE_INTEGER TsDrop
Definition: ext2fs.h:827
#define __le16
Definition: types.h:39
NTSTATUS Ext2FreeBlock(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Block, IN ULONG Number)
Definition: generic.c:1150
#define INC_MEM_COUNT(_i, _p, _s)
Definition: ext2fs.h:598
LIST_ENTRY FcbList
Definition: ext2fs.h:655
BOOLEAN Ext2RemoveMcbExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG Length)
Definition: memory.c:848
NTSTATUS NTAPI Ext2BuildRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
static void ext3_blocks_count_set(struct ext3_super_block *es, ext3_fsblk_t blk)
Definition: ext2fs.h:1710
int ext3_bg_has_super(struct super_block *sb, ext3_group_t group)
Definition: generic.c:2619
PEXT2_FCB Ext2AllocateFcb(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
Definition: memory.c:131
struct _EXT2_CCB EXT2_CCB
BOOLEAN Ext2LoadInode(IN PEXT2_VCB Vcb, IN struct inode *Inode)
Definition: generic.c:504
FAST_IO_DISPATCH FastIoDispatch
Definition: ext2fs.h:517
NTSTATUS Ext2DeviceControl(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: devctl.c:759
struct _EXT2_IDENTIFIER EXT2_IDENTIFIER
static ext3_fsblk_t ext3_r_blocks_count(struct ext3_super_block *es)
Definition: ext2fs.h:1698
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:2142
Definition: bufpool.h:45
NTSTATUS Ext2SetLinkInfo(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_FCB Fcb, PEXT2_CCB Ccb)
Definition: fileinfo.c:1660
struct _EXT2_VCB::@647 Codepage
ULONGLONG IoUnitSize
Definition: ext2fs.h:725
FAST_IO_POSSIBLE Ext2IsFastIoPossible(IN PEXT2_FCB Fcb)
Definition: fastio.c:38
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
struct _EXT2_ALLOC_HEADER EXT2_ALLOC_HEADER
VOID Ext2CleanupAllMcbs(PEXT2_VCB Vcb)
Definition: memory.c:1810
BOOLEAN Ext2LoadInodeXattr(IN PEXT2_VCB Vcb, IN struct inode *Inode, IN PEXT2_INODE InodeXattr)
Definition: generic.c:586
Definition: fs.h:117
unsigned int dir
Definition: maze.c:112
NTSTATUS Ext2IsVolumeMounted(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:2494
void * PVOID
Definition: retypes.h:9
BOOLEAN Ext2IsNameValid(PUNICODE_STRING FileName)
Definition: create.c:36
NTSTATUS Ex2ProcessUserPerfStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_QUERY_PERFSTAT QueryPerf, IN ULONG Length)
Definition: devctl.c:616
PDEVICE_OBJECT CdromdevObject
Definition: ext2fs.h:533
ERESOURCE PagingIoResource
Definition: ext2fs.h:629
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
uid_t euid
Definition: ext2fs.h:759
NTSTATUS Ext2UnlockVcb(IN PEXT2_VCB Vcb, IN PFILE_OBJECT FileObject)
Definition: fsctl.c:206
#define InterlockedExchangeAdd
Definition: interlocked.h:181
PVPB Vpb2
Definition: ext2fs.h:691
NTSTATUS Ext2QueryVolumeInformation(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: volinfo.c:27
NTSTATUS Ext2Write(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: write.c:1339
NTSTATUS Ext2QueryFileInformation(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fileinfo.c:43
static BOOL bVerify
Definition: verify.c:27
BOOLEAN Ext2RemoveBlockExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Start, IN ULONG Number)
Definition: memory.c:1097
ULONG Ext2OEMToUnicodeSize(IN PEXT2_VCB Vcb, IN PANSI_STRING Oem)
Definition: misc.c:183
NTSTATUS Ext2SetRenameInfo(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_FCB Fcb, PEXT2_CCB Ccb)
Definition: fileinfo.c:1320
EXT2_IDENTIFIER Identifier
Definition: ext2fs.h:1038
int ext4_group_desc_csum_verify(struct ext3_sb_info *sbi, __u32 block_group, struct ext4_group_desc *gdp)
Definition: generic.c:2581
struct ext4_group_desc * ext4_get_group_desc(struct super_block *sb, ext4_group_t block_group, struct buffer_head **bh)
Definition: generic.c:2909
ULONG Slot[PS_MAX_TYPE_V2]
Definition: common.h:67
NTSTATUS Ext2VerifyVolume(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:2378
struct _EXT2_FCB EXT2_FCB
VOID Ext2Sleep(ULONG ms)
Definition: misc.c:297
FAST_MUTEX
Definition: extypes.h:17
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)
GLboolean GLuint group
Definition: glext.h:11120
EXT2_STAT_ARRAY_V2 Total
Definition: common.h:140
ULONG ChangeCount
Definition: ext2fs.h:687
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG LockKey
Definition: fatprocs.h:2650
int64_t LONGLONG
Definition: typedefs.h:66
NTSTATUS Ext2ShutDown(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: shutdown.c:25
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
Definition: directory.c:44
NTSTATUS Ext2InitializeZone(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb)
Definition: memory.c:1121
NTSTATUS Ext2DeviceControlNormal(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: devctl.c:57
PEXT2_MCB Next
Definition: ext2fs.h:895
static LPSTR pName
Definition: security.c:75
NPAGED_LOOKASIDE_LIST InodeLookasideList
Definition: ext2fs.h:734
NTSTATUS Ext2Close(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: close.c:26
UNICODE_STRING FullName
Definition: ext2fs.h:911
BOOLEAN Ext2LookupMcbExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN LONGLONG Vbn, OUT PLONGLONG Lbn, OUT PLONGLONG Length)
Definition: memory.c:897
BOOLEAN Ext2AddMcbExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN LONGLONG Vbn, IN LONGLONG Lbn, IN LONGLONG Length)
Definition: memory.c:790
#define CODEPAGE_MAXLEN
Definition: common.h:159
FILE_INFORMATION_CLASS efc_fi
Definition: ext2fs.h:1184
NTSTATUS Ext2ProcessGlobalProperty(IN PDEVICE_OBJECT DeviceObject, IN PEXT2_VOLUME_PROPERTY3 Property, IN ULONG Length)
Definition: devctl.c:232
CHAR sHidingPrefix[HIDINGPAT_LEN]
Definition: ext2fs.h:750
volatile char *const const char modify _InterlockedAnd
Definition: intrin_ppc.h:267
BOOLEAN IsTopLevel
Definition: ext2fs.h:1063
NTSTATUS Ext2DirectoryControl(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: dirctl.c:1236
__wchar_t WCHAR
Definition: xmlstorage.h:180
KEVENT Wait
Definition: ext2fs.h:497
NTSTATUS Ext2ExceptionHandler(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: except.c:112
struct ext2_icb EXT2_IRP_CONTEXT
NTSTATUS Ext2QueryGlobalParameters(IN PUNICODE_STRING RegistryPath)
Definition: init.c:188
PEXT2_FCB Fcb
Definition: ext2fs.h:1104
NTSTATUS Ext2Read(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: read.c:863
INT POOL_TYPE
Definition: typedefs.h:76
BOOLEAN bHidingPrefix
Definition: ext2fs.h:562
void ext3_warning(struct super_block *sb, const char *function, char *fmt,...)
Definition: htree.c:212
PETHREAD LazyWriterThread
Definition: ext2fs.h:841
uint64_t ULONGLONG
Definition: typedefs.h:65
NTSTATUS Ext2ExceptionFilter(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXCEPTION_POINTERS ExceptionPointer)
Definition: except.c:21
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:170
BOOLEAN Ext2RefreshGroup(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
Definition: generic.c:405
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG Action
Definition: fsrtlfuncs.h:738
#define Vcb
Definition: cdprocs.h:1425
struct dentry * de
Definition: ext2fs.h:937
__le16 ext4_group_desc_csum(struct ext3_sb_info *sbi, __u32 block_group, struct ext4_group_desc *gdp)
Definition: generic.c:2552
WORK_QUEUE_ITEM WorkQueueItem
Definition: ext2fs.h:1066
SECTION_OBJECT_POINTERS SectionObject
Definition: ext2fs.h:669
struct _EXT2_VCB EXT2_VCB
Definition: xml2sdb.h:79
struct ext3_dir_entry_2 * PEXT2_DIR_ENTRY2
Definition: ext2fs.h:109
BOOLEAN Ext2AddVcbExtent(IN PEXT2_VCB Vcb, IN LONGLONG Vbn, IN LONGLONG Length)
Definition: memory.c:648
static const UCHAR Index[8]
Definition: usbohci.c:18
VOID Ext2UpdateVcbStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
Definition: generic.c:930
PVOID Alloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
Definition: main.c:63
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:414
ULONG Ext2UnicodeToOEMSize(IN PEXT2_VCB Vcb, IN PUNICODE_STRING Unicode)
Definition: misc.c:239
NTSTATUS Ext2ExpandIndirect(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, ULONG Start, ULONG End, PLARGE_INTEGER Size)
Definition: indirect.c:932
struct _EXT2_FCBVCB * PEXT2_FCBVCB
VOID __cdecl Ext2Printf(PCHAR DebugMessage,...)
VOID Ext2LinkHeadMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
Definition: memory.c:2917
_In_ PSTRING FullName
Definition: rtlfuncs.h:1649
__u32 ext3_current_time(struct inode *in)
Definition: htree.c:204
NTSTATUS Ext2PnpCancelRemove(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
LARGE_MCB Extents
Definition: ext2fs.h:672
PARTITION_INFORMATION PartitionInformation
Definition: ext2fs.h:713
unsigned int __u32
Definition: compat.h:90
PERESOURCE Resource
Definition: ext2fs.h:3069
NTSTATUS Ext2LockVolume(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:136
PVPB Vpb
Definition: ext2fs.h:690
LIST_ENTRY Next
Definition: ext2fs.h:1105
EXT2_IDENTIFIER Identifier
Definition: ext2fs.h:888
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NTSTATUS Ext2InitializeLabel(IN PEXT2_VCB Vcb, IN PEXT2_SUPER_BLOCK Sb)
Definition: memory.c:2235
VOID Ext2LinkTailMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
Definition: memory.c:2894
NTSTATUS Ext2PurgeFile(IN PEXT2_FCB Fcb, IN BOOLEAN FlushBeforePurge)
Definition: fsctl.c:2811
_Must_inspect_result_ typedef _In_ ULONG _In_ BOOLEAN Target
Definition: iotypes.h:1067
* PFILE_OBJECT
Definition: iotypes.h:1954
Definition: partlist.h:33
PMDL Ext2CreateMdl(IN PVOID Buffer, IN ULONG Length, IN LOCK_OPERATION Operation)
Definition: block.c:52
LIST_ENTRY Next
Definition: ext2fs.h:666
struct _EXT2_FILLDIR_CONTEXT EXT2_FILLDIR_CONTEXT
NTSTATUS Ext2UserFsRequest(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:1903
VOID Ext2InsertVcb(PEXT2_VCB Vcb)
Definition: memory.c:1931
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
PEXT2_IRP_CONTEXT efc_irp
Definition: ext2fs.h:1178
uid_t uid
Definition: ext2fs.h:755
unsigned __int64 loff_t
Definition: types.h:80
BOOLEAN Ext2IsSpecialSystemFile(IN PUNICODE_STRING FileName, IN BOOLEAN bDirectory)
Definition: create.c:224
loff_t ext3_max_bitmap_size(int bits, int has_huge_files)
Definition: generic.c:2270
VOID Ext2FreeExtent(IN PEXT2_EXTENT Extent)
Definition: memory.c:505
unsigned char UCHAR
Definition: xmlstorage.h:181
unsigned int ext3_group_t
Definition: ext3_fs_i.h:34
blkcnt_t ext3_inode_blocks(struct ext3_inode *raw_inode, struct inode *inode)
Definition: generic.c:2328
char * PBOOLEAN
Definition: retypes.h:11
loff_t max_bitmap_bytes
Definition: ext2fs.h:772
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
static ext3_fsblk_t ext3_free_blocks_count(struct ext3_super_block *es)
Definition: ext2fs.h:1704
PFILE_OBJECT FileObject
Definition: ext2fs.h:1057
PDEVICE_OBJECT RealDevice
Definition: ext2fs.h:709
PEXT2_MCB Ext2FirstUnusedMcb(PEXT2_VCB Vcb, BOOLEAN Wait, ULONG Number)
Definition: memory.c:2961
struct buffer_head * ext3_find_entry(struct ext2_icb *icb, struct dentry *dentry, struct ext3_dir_entry_2 **res_dir)
Definition: htree.c:2166
#define InterlockedDecrement
Definition: armddk.h:52
NTSTATUS Ext2CompleteIrpContext(IN PEXT2_IRP_CONTEXT IrpContext, IN NTSTATUS Status)
Definition: read.c:32
void ext3_inc_count(struct inode *inode)
Definition: htree.c:307
int ext3_add_entry(struct ext2_icb *icb, struct dentry *dentry, struct inode *inode)
Definition: htree.c:1946
ULONG Refercount
Definition: ext2fs.h:917
void ext2_destroy_linux()
Definition: linux.c:1011
void ext4_inode_table_set(struct super_block *sb, struct ext4_group_desc *bg, ext4_fsblk_t blk)
Definition: generic.c:2464
SHARE_ACCESS ShareAccess
Definition: ext2fs.h:832
__u32 ext3_lblk_t
Definition: ext3_fs_i.h:30
NTSTATUS NTAPI Ext2ReleaseFileForModWrite(IN PFILE_OBJECT FileObject, IN PERESOURCE ResourceToRelease, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1054
VOID Ext2TearDownStream(IN PEXT2_VCB Vcb)
Definition: memory.c:2780
struct ext4_group_desc * PEXT2_GROUP_DESC
Definition: ext2fs.h:107
BOOLEAN NTAPI Ext2FastIoUnlockAllByKey(IN PFILE_OBJECT FileObject, IN PEPROCESS Process, IN ULONG Key, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:795
BOOLEAN NTAPI Ext2FastIoUnlockAll(IN PFILE_OBJECT FileObject, IN PEPROCESS Process, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:704
#define VOID
Definition: acefi.h:82
PEXT2_MCB Ext2SearchMcb(PEXT2_VCB Vcb, PEXT2_MCB Parent, PUNICODE_STRING FileName)
Definition: memory.c:1598
VOID NTAPI Ext2DeQueueCloseRequest(IN PVOID Context)
Definition: close.c:222
#define blk
Definition: linetest.c:70
BOOLEAN Ext2ListExtents(PLARGE_MCB Extents)
Definition: memory.c:558
NTSTATUS Ext2PurgeVolume(IN PEXT2_VCB Vcb, IN BOOLEAN FlushBeforePurge)
Definition: fsctl.c:2704
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
Definition: cdprocs.h:593
#define InterlockedOr
Definition: interlocked.h:224
EXT2_IDENTIFIER Identifier
Definition: ext2fs.h:999
PEXT2_FCB Fcb
Definition: ext2fs.h:1059
NTSTATUS Ext2GetRetrievalPointerBase(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:1160
NTSTATUS Ext2AllowExtendedDasdIo(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:407
Definition: typedefs.h:117
VOID NTAPI Ext2ReleaseForCreateSection(IN PFILE_OBJECT FileObject)
Definition: fastio.c:1014
#define err(...)
static void ext3_free_blocks_count_set(struct ext3_super_block *es, ext3_fsblk_t blk)
Definition: ext2fs.h:1717
static void ext3_r_blocks_count_set(struct ext3_super_block *es, ext3_fsblk_t blk)
Definition: ext2fs.h:1724
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
NTSTATUS Ext2SetDispositionInfo(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_FCB Fcb, PEXT2_CCB Ccb, BOOLEAN bDelete)
Definition: fileinfo.c:1277
NTSTATUS Ext2NewInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG GroupHint, IN ULONG Type, OUT PULONG Inode)
Definition: generic.c:1299
GLenum mode
Definition: glext.h:6217
__u32 ext4_used_dirs_count(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2432
_In_opt_ PENTER_STATE_SYSTEM_HANDLER _In_opt_ PVOID _In_ LONG _In_opt_ LONG volatile * Number
Definition: ntpoapi.h:204
BOOLEAN NTAPI 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:376
VOID Ext2DestroyInode(IN PEXT2_VCB Vcb, IN PEXT2_INODE inode)
Definition: memory.c:406
NTSTATUS Ext2OEMToUnicode(IN PEXT2_VCB Vcb, IN OUT PUNICODE_STRING Oem, IN POEM_STRING Unicode)
Definition: misc.c:206
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)
BOOLEAN Ext2RemoveMcb(PEXT2_VCB Vcb, PEXT2_MCB Mcb)
Definition: memory.c:1746
#define P(row, col)
NTSTATUS Ext2StartReaper(PEXT2_REAPER, EXT2_REAPER_RELEASE)
Definition: memory.c:3448
BOOLEAN Ext2ZeroBuffer(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN LONGLONG Offset, IN ULONG Size)
Definition: generic.c:791
__u32 ext4_free_inodes_count(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2424
LARGE_INTEGER LastAccessTime
Definition: ext2fs.h:929
Status
Definition: gdiplustypes.h:24
BOOLEAN NTAPI Ext2NoOpAcquire(IN PVOID Fcb, IN BOOLEAN Wait)
Definition: cmcb.c:118
VOID Ext2RemoveVcb(PEXT2_VCB Vcb)
Definition: memory.c:1939
BOOLEAN NTAPI 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:264
BOOLEAN Ext2CheckBitmapConsistency(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
Definition: memory.c:1895
BOOLEAN bHidingSuffix
Definition: ext2fs.h:564
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
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)
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
FSRTL_ADVANCED_FCB_HEADER Header
Definition: ext2fs.h:617
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)
IN PFCB IN PFILE_OBJECT FileObject IN ULONG AllocationSize
Definition: fatprocs.h:310
BOOLEAN Ext2SaveBuffer(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN LONGLONG Offset, IN ULONG Size, IN PVOID Buf)
Definition: generic.c:862
uint32_t cc
Definition: isohybrid.c:75
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
NTSTATUS Ext2SetParentEntry(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN ULONG OldParent, IN ULONG NewParent)
Definition: generic.c:2031
ULONG Length
Definition: ext2fs.h:1113
ULONG_PTR SIZE_T
Definition: typedefs.h:78
BOOLEAN Wait
Definition: ext2fs.h:3073
ULONG Ext2GetProcessNameOffset(VOID)
BOOLEAN NTAPI Ext2AcquireForReadAhead(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:80
PEXT2_EXTENT Ext2AllocateExtent()
Definition: memory.c:488
NTSTATUS NTAPI Ext2AcquireFileForCcFlush(IN PFILE_OBJECT FileObject, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1075
PDEVICE_OBJECT TargetDeviceObject
Definition: ext2fs.h:706
struct _EXT2_ALLOC_HEADER * PEXT2_ALLOC_HEADER
VOID Ext2UnloadAllNls()
Definition: nls.c:181
unsigned int ext4_group_t
Definition: ext3_fs_i.h:35
NTSTATUS Ext2ProcessUserProperty(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VOLUME_PROPERTY3 Property, IN ULONG Length)
Definition: devctl.c:567
ext4_fsblk_t ext4_block_bitmap(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2392
struct ext3_dir_entry_2 * ext3_next_entry(struct ext3_dir_entry_2 *p)
Definition: generic.c:2177
struct ext3_super_block * PEXT2_SUPER_BLOCK
Definition: ext2fs.h:105
BOOLEAN Ext2ClearInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG inode)
Definition: generic.c:526
#define InterlockedIncrement
Definition: armddk.h:53
NTSTATUS Ext2FlushFiles(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bShutDown)
Definition: flush.c:108
ULONG max_blocks_per_layer[EXT2_BLOCK_TYPES]
Definition: ext2fs.h:770
PEXT2_VCB Vcb
Definition: ext2fs.h:860
GLuint in
Definition: glext.h:9616
enum _LOCK_OPERATION LOCK_OPERATION
NTSTATUS NTAPI Ext2PreAcquireForCreateSection(IN PFS_FILTER_CALLBACK_DATA cd, OUT PVOID *cc)
Definition: fastio.c:1110
PEXT2_MCB Ext2SearchMcbWithoutLock(PEXT2_MCB Parent, PUNICODE_STRING FileName)
Definition: memory.c:1622
unsigned short USHORT
Definition: pedump.c:61
NTSTATUS Ext2MountVolume(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:2050
NTSTATUS Ext2Create(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: create.c:1951
UCHAR DrvLetter
Definition: ext2fs.h:763
struct nls_table * PageTable
Definition: ext2fs.h:745
BOOLEAN NTAPI 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:195
ULONG Ext2Log2(ULONG Value)
Definition: misc.c:25
NTSTATUS Ext2ExpandFile(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, PLARGE_INTEGER Size)
Definition: fileinfo.c:1147
BOOLEAN bHidingPrefix
Definition: ext2fs.h:749
ULONG Flags
Definition: ext2fs.h:1002
VOID NTAPI Ext2AcquireForCreateSection(IN PFILE_OBJECT FileObject)
Definition: fastio.c:999
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
ULONG Flags
Definition: ext2fs.h:499
UCHAR MajorFunction
Definition: ext2fs.h:1047
LARGE_INTEGER LastWriteTime
Definition: ext2fs.h:927
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:334
#define long
Definition: qsort.c:33
VOID Ext2MediaEjectControl(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN BOOLEAN bPrevent)
Definition: block.c:661
ULONG IoUnitBits
Definition: ext2fs.h:728
NTSTATUS Ext2UpdateGroupDirStat(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Group)
Definition: generic.c:1661
int ext3_is_dir_empty(struct ext2_icb *icb, struct inode *inode)
Definition: htree.c:2038
struct ext2_icb * PEXT2_IRP_CONTEXT
LARGE_INTEGER ChangeTime
Definition: ext2fs.h:928
NTSTATUS Ext2QueryDirectory(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: dirctl.c:525
ULONG NonCachedOpenCount
Definition: ext2fs.h:851
unsigned int * PULONG
Definition: retypes.h:1
PEXT2_MCB Child
Definition: ext2fs.h:898
PUCHAR Ext2NtStatusToString(IN NTSTATUS Status)
int Ext2LinuxError(NTSTATUS Status)
Definition: misc.c:304
FAST_MUTEX Mutex
Definition: ext2fs.h:620
BOOLEAN Ext2LoadBlock(IN PEXT2_VCB Vcb, IN ULONG dwBlk, IN PVOID Buffer)
Definition: generic.c:655
ULONG OpenHandleCount
Definition: ext2fs.h:682
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:823
struct buffer_head * ext3_append(struct ext2_icb *icb, struct inode *inode, ext3_lblk_t *block, int *err)
Definition: htree.c:279
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:1122
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:2719
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN BOOLEAN ExclusiveLock
Definition: fatprocs.h:2697
VOID NTAPI Ext2McbReaperThread(PVOID Context)
Definition: memory.c:3033
_In_ LONGLONG Vbn
Definition: fsrtlfuncs.h:470
UNICODE_STRING DirectorySearchPattern
Definition: ext2fs.h:1008
VOID NTAPI Ext2LockIrp(IN PVOID Context, IN PIRP Irp)
Definition: dispatch.c:86
NTSTATUS Ext2ReadWriteBlocks(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_EXTENT Extent, IN ULONG Length)
Definition: block.c:240
VOID NTAPI Ext2ReleaseFromLazyWrite(IN PVOID Context)
Definition: cmcb.c:55
__inline VOID Ext2TraceMemory(BOOLEAN _n, int _i, PVOID _p, LONG _s)
Definition: ext2fs.h:1148
NTSTATUS Ext2SetVolumeInformation(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: volinfo.c:292
IN ULONG IN ULONG Tag
Definition: evtlib.h:159
struct _EXT2_REAPER EXT2_REAPER
ERESOURCE MainResource
Definition: ext2fs.h:628
NTSTATUS Ext2PrepareToUnload(IN PEXT2_IRP_CONTEXT IrpContext)
SHARE_ACCESS ShareAccess
Definition: ext2fs.h:676
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
PIRP Irp
Definition: ext2fs.h:1114
__u32 ext4_free_blks_count(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2416
VOID Ext2ReleaseFcb(IN PEXT2_FCB Fcb)
Definition: memory.c:276
Definition: name.c:36
Definition: iotypes.h:166
#define OUT
Definition: typedefs.h:39
NTSTATUS Ext2SetFileInformation(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fileinfo.c:509
int Ext2CheckInodeAccess(PEXT2_VCB Vcb, struct inode *in, int attempt)
Definition: access.c:20
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
__u32 ext4_itable_unused_count(struct super_block *sb, struct ext4_group_desc *bg)
Definition: generic.c:2440
VOID Ext2PutGroup(IN PEXT2_VCB Vcb)
Definition: generic.c:146
BOOLEAN Ext2SaveGroup(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN ULONG Group)
Definition: generic.c:382
struct _EXT2_IDENTIFIER * PEXT2_IDENTIFIER
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:997
BOOLEAN bHidingSuffix
Definition: ext2fs.h:751
PDRIVER_OBJECT DriverObject
Definition: ext2fs.h:527
NTSTATUS Ext2InitializeVcb(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_SUPER_BLOCK Ext2Sb, PDEVICE_OBJECT TargetDevice, PDEVICE_OBJECT VolumeDevice, PVPB Vpb)
ULONG ERESOURCE
Definition: env_spec_w32.h:594
EXT2_FCBVCB
Definition: ext2fs.h:642
UNICODE_STRING RegistryPath
Definition: ext2fs.h:568
unsigned int ULONG
Definition: retypes.h:1
INT Ext2RecoverJournal(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
Definition: recover.c:95
NTSTATUS Ext2Flush(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: flush.c:144
_In_ FLT_SET_CONTEXT_OPERATION Operation
Definition: fltkernel.h:1468
WCHAR PageName[CODEPAGE_MAXLEN]
Definition: ext2fs.h:554
BOOLEAN Ext2LookupVcbExtent(IN PEXT2_VCB Vcb, IN LONGLONG Vbn, OUT PLONGLONG Lbn, OUT PLONGLONG Length)
Definition: memory.c:747
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical 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 ACPI_HANDLE Child
Definition: acpixf.h:716
KEVENT Engine
Definition: ext2fs.h:496
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
NTSTATUS Ext2RemoveEntry(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN PEXT2_FCB Dcb, IN PEXT2_MCB Mcb)
Definition: generic.c:1954
NTSTATUS Ext2UnlockVolume(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: fsctl.c:241
#define DbgBreak()
Definition: ext2fs.h:46
VOID Ext2FreePool(IN PVOID P, IN ULONG Tag)
Definition: debug.c:2697
UCHAR AnsiName[CODEPAGE_MAXLEN]
Definition: ext2fs.h:744
PEXT2_IRP_CONTEXT Ext2AllocateIrpContext(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: memory.c:35
OPLOCK Oplock
Definition: ext2fs.h:838
NTSTATUS Ext2PnpQueryRemove(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)
struct _EXT2_VCB * PEXT2_VCB
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:1884
PFILE_OBJECT FileObject
Definition: ext2fs.h:3071
BOOLEAN Ext2AddMcbMetaExts(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Block, IN ULONG Length)
Definition: memory.c:941
PFILE_OBJECT LockFile
Definition: ext2fs.h:694
unsigned long long ext3_fsblk_t
Definition: ext3_fs_i.h:26
VOID Ext2DestroyExtentChain(IN PEXT2_EXTENT Chain)
Definition: memory.c:546
CACHE_MANAGER_CALLBACKS CacheManagerNoOpCallbacks
Definition: ext2fs.h:524
Definition: File.h:15
BOOLEAN NTAPI 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:164
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
WCHAR wHidingSuffix[HIDINGPAT_LEN]
Definition: ext2fs.h:561
IO_STACK_LOCATION * PEXTENDED_IO_STACK_LOCATION
Definition: ext2fs.h:174
VOID Ext2FreeCcb(IN PEXT2_VCB Vcb, IN PEXT2_CCB Ccb)
Definition: memory.c:356
BOOLEAN Ext2IsDotDot(PUNICODE_STRING name)
Definition: misc.c:529
#define _ret
void ext4_inode_bitmap_set(struct super_block *sb, struct ext4_group_desc *bg, ext4_fsblk_t blk)
Definition: generic.c:2456
NTSTATUS Ext2Pnp(IN PEXT2_IRP_CONTEXT IrpContext)
Definition: xml2sdb.h:110
struct _EXT2_MCB * PEXT2_MCB
Definition: ext2fs.h:479
GLfloat GLfloat p
Definition: glext.h:8902
struct _EXT2_EXTENT EXT2_EXTENT
ULONG FcbCount
Definition: ext2fs.h:656
EXT2_REAPER McbReaper
Definition: ext2fs.h:540
UCHAR MinorFunction
Definition: ext2fs.h:1048
INT Ext2CheckJournal(PEXT2_VCB Vcb, PULONG jNo)
Definition: recover.c:55
NTSTATUS Ext2TruncateExtent(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, PLARGE_INTEGER Size)
Definition: extents.c:200
_In_ PFCB Fcb
Definition: cdprocs.h:151
struct _EXT2_RW_CONTEXT * PEXT2_RW_CONTEXT
LIST_ENTRY NotifyList
Definition: ext2fs.h:697
static ext3_fsblk_t ext3_blocks_count(struct ext3_super_block *es)
Definition: ext2fs.h:1692
ULONG SectorBits
Definition: ext2fs.h:722
__inline VOID Ext2TraceIrpContext(BOOLEAN _n, PEXT2_IRP_CONTEXT IrpContext)
Definition: ext2fs.h:1165
CHAR sHidingSuffix[HIDINGPAT_LEN]
Definition: ext2fs.h:565
#define es
Definition: i386-dis.c:431
struct _EXT2_CCB * PEXT2_CCB
_Must_inspect_result_ _In_ FLT_CONTEXT_TYPE _In_ SIZE_T _In_ POOL_TYPE PoolType
Definition: fltkernel.h:1444
PVOID Ext2AllocatePool(IN POOL_TYPE PoolType, IN SIZE_T NumberOfBytes, IN ULONG Tag)
Definition: debug.c:2684
NTSTATUS Ext2TruncateSymlink(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, ULONG Size)
Definition: fsctl.c:1751
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
Definition: ext2fs.h:523
BOOLEAN IsExt3fs
Definition: ext2fs.h:715
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 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
EXT2_REAPER FcbReaper
Definition: ext2fs.h:539
UNICODE_STRING ShortName
Definition: ext2fs.h:908
VOID Ext2DestroyMdl(IN PMDL Mdl)
Definition: block.c:85
BOOLEAN NTAPI Ext2FastIoQueryNetworkOpenInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_NETWORK_OPEN_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
NTSTATUS Ext2TruncateIndirect(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, PLARGE_INTEGER Size)
Definition: indirect.c:1079
VOID Ext2DbgPrintCall(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB * Dcb
Definition: create.c:4157
struct _EXT2_EXTENT * PEXT2_EXTENT
VOID NTAPI Ext2OplockComplete(IN PVOID Context, IN PIRP Irp)
Definition: dispatch.c:41
#define PS_IRP_CONTEXT
Definition: common.h:16
struct _EXT2_REAPER * PEXT2_REAPER
BOOLEAN Ext2SaveInode(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN struct inode *Inode)
Definition: generic.c:548
Definition: dsound.c:943
struct file filp
Definition: ext2fs.h:1011
BOOLEAN Ext2AddBlockExtent(IN PEXT2_VCB Vcb, IN PEXT2_MCB Mcb, IN ULONG Start, IN ULONG Block, IN ULONG Number)
Definition: memory.c:1027
BOOLEAN Ext2LoadBuffer(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb, IN LONGLONG Offset, IN ULONG Size, IN PVOID Buf)
Definition: generic.c:729
VOID Ext2VerifyVcb(IN PEXT2_IRP_CONTEXT IrpContext, IN PEXT2_VCB Vcb)
Definition: fsctl.c:2277
ULONG Flags
Definition: ext2fs.h:737
VOID Ext2ClearVpbFlag(IN PVPB Vpb, IN USHORT Flag)
Definition: fsctl.c:56
struct _EXT2_GLOBAL EXT2_GLOBAL
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ FLT_IO_OPERATION_FLAGS _Out_opt_ PULONG BytesRead
Definition: fltkernel.h:1255
ULONG Ext2LinuxTime(IN LARGE_INTEGER SysTime)
Definition: misc.c:51
PVOID Ext2GetUserBuffer(IN PIRP Irp)
Definition: block.c:134
#define cpu_to_le32
Definition: module.h:146
PVOID PBCB
Definition: ext2fs.h:482
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
Definition: fatprocs.h:1664
enum _EXT2_IDENTIFIER_TYPE EXT2_IDENTIFIER_TYPE
ERESOURCE FcbLock
Definition: ext2fs.h:654
struct _EXT2_FILLDIR_CONTEXT * PEXT2_FILLDIR_CONTEXT
ULONG NumOfMcb
Definition: ext2fs.h:659
_EXT2_IDENTIFIER_TYPE
Definition: ext2fs.h:446
VOID Ext2InsertFcb(PEXT2_VCB Vcb, PEXT2_FCB Fcb)
Definition: memory.c:309
void ext3_set_de_type(struct super_block *sb, struct ext3_dir_entry_2 *de, umode_t mode)
Definition: htree.c:347
BOOLEAN Ext2IsMediaWriteProtected(IN PEXT2_IRP_CONTEXT IrpContext, IN PDEVICE_OBJECT TargetDevice)
Definition: fsctl.c:2005
ULONG Flags
Definition: ext2fs.h:514
struct dentry * Ext2AllocateEntry()
Definition: memory.c:416
VOID NTAPI Ext2FcbReaperThread(PVOID Context)
Definition: memory.c:3361
VOID NTAPI Ext2ReleaseFromReadAhead(IN PVOID Context)
Definition: cmcb.c:101
FS_FILTER_CALLBACKS FilterCallbacks
Definition: ext2fs.h:520
int ext2_init_linux()
Definition: linux.c:996
LARGE_MCB Extents
Definition: ext2fs.h:920
NTSTATUS Ext2ExpandExtent(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb, PEXT2_MCB Mcb, ULONG Start, ULONG End, PLARGE_INTEGER Size)
Definition: extents.c:151
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
struct dentry * Ext2BuildEntry(PEXT2_VCB Vcb, PEXT2_MCB Dcb, PUNICODE_STRING FileName)
Definition: memory.c:444
IN BOOLEAN Wait
Definition: fatprocs.h:1529
gid_t egid
Definition: ext2fs.h:760
unsigned short umode_t
Definition: types.h:71
Definition: fci.c:126
BOOLEAN ExceptionInProgress
Definition: ext2fs.h:1069
VOID NTAPI Ext2NoOpRelease(IN PVOID Fcb)
Definition: cmcb.c:129
BOOLEAN Ext2IsWearingCloak(IN PEXT2_VCB Vcb, IN POEM_STRING OeName)
Definition: dirctl.c:372
NTSTATUS Ext2PnpSurpriseRemove(PEXT2_IRP_CONTEXT IrpContext, PEXT2_VCB Vcb)