ReactOS  0.4.14-dev-41-g31d7680
ffsdrv.h
Go to the documentation of this file.
1 /*
2  * FFS File System Driver for Windows
3  *
4  * ffsdrv.h
5  *
6  * 2004.5.6 ~
7  *
8  * Lee Jae-Hong, http://www.pyrasis.com
9  *
10  */
11 
12 #ifndef _FFS_HEADER_
13 #define _FFS_HEADER_
14 
15 /* include files */
16 #ifdef __REACTOS__
17 #include <ntifs.h>
18 #include <ntddk.h>
19 #include <ntdddisk.h>
20 #include <pseh/pseh2.h>
21 #endif
22 #include "fs.h"
23 #include "dinode.h"
24 #include "dir.h"
25 #include "disklabel.h"
26 #ifndef __REACTOS__
27 #include <ntdddisk.h>
28 #endif
29 
30 #ifndef _PREFAST_
31 #ifdef _MSC_VER
32 #pragma warning(disable:4068)
33 #endif
34 #define __drv_mustHoldCriticalRegion
35 #endif // !_PREFAST_
36 
37 #pragma pack(1)
38 
39 /* debug */
40 #if DBG
41  #define FFSBreakPoint() /*__asm int 3*/ //DbgBreakPoint()
42 #else
43  #define FFSBreakPoint()
44 #endif
45 
46 /* Structs & Consts */
47 
48 #define FFSDRV_VERSION "0.5.2"
49 
50 /*
51  * ffsdrv build options
52  */
53 
54 /* To build read-only driver */
55 
56 #define FFS_READ_ONLY TRUE
57 
58 
59 /* To support driver dynamics unload */
60 
61 #define FFS_UNLOAD TRUE
62 
63 /*
64  * Constants
65  */
66 
67 #define FFS_BLOCK_TYPES (0x04)
68 
69 #define MAXIMUM_RECORD_LENGTH (0x10000)
70 
71 #define SECTOR_BITS (Vcb->SectorBits)
72 #define SECTOR_SIZE (Vcb->DiskGeometry.BytesPerSector)
73 #define DEFAULT_SECTOR_SIZE (0x200)
74 
75 #define SUPER_BLOCK_OFFSET (0x2000)
76 #define SUPER_BLOCK_SIZE SBLOCKSIZE
77 
78 #define READ_AHEAD_GRANULARITY (0x10000)
79 
80 #define SUPER_BLOCK (Vcb->ffs_super_block)
81 #define FS_VERSION (Vcb->FSVersion)
82 
83 #define BLOCK_SIZE (Vcb->BlockSize)
84 #define BLOCK_BITS FFSLog2(Vcb->BlockSize)
85 
86 #define INODES_COUNT (Vcb->ffs_super_block->s_inodes_count)
87 
88 #define INODES_PER_GROUP (SUPER_BLOCK->fs_ipg)
89 #define BLOCKS_PER_GROUP (SUPER_BLOCK->fs_fpg)
90 #define TOTAL_BLOCKS (SUPER_BLOCK->fs_size)
91 
92 
93 
94 /* File System Releated */
95 
96 #define DRIVER_NAME "FFS"
97 #ifndef __REACTOS__
98 #define DEVICE_NAME L"\\FileSystem\\FFS"
99 #else
100 #define DEVICE_NAME L"\\FFS"
101 #endif
102 
103 /* Registry */
104 
105 #define PARAMETERS_KEY L"\\Parameters"
106 
107 #define WRITING_SUPPORT L"WritingSupport"
108 #define CHECKING_BITMAP L"CheckingBitmap"
109 #define PARTITION_NUMBER L"PartitionNumber"
110 
111 /* To support select BSD partition and ffsdrv unload routine */
112 #define DOS_DEVICE_NAME L"\\DosDevices\\ffs"
113 
114 /*
115  * Private IOCTL to make the driver ready to unload
116  */
117 #if FFS_UNLOAD
118 #define IOCTL_PREPARE_TO_UNLOAD \
119 CTL_CODE(FILE_DEVICE_UNKNOWN, 2048, METHOD_NEITHER, FILE_WRITE_ACCESS)
120 #endif // FFS_UNLOAD
121 
122 /*
123  * Private IOCTL to select BSD partition.
124  */
125 #define IOCTL_SELECT_BSD_PARTITION \
126 CTL_CODE(FILE_DEVICE_UNKNOWN, 2049, METHOD_BUFFERED, FILE_WRITE_ACCESS)
127 
128 
129 #ifndef SetFlag
130 #define SetFlag(x,f) ((x) |= (f))
131 #endif
132 
133 #ifndef ClearFlag
134 #define ClearFlag(x,f) ((x) &= ~(f))
135 #endif
136 
137 #define IsFlagOn(a,b) ((BOOLEAN)(FlagOn(a,b) == b))
138 
139 #define FFSRaiseStatus(IRPCONTEXT,STATUS) { \
140  (IRPCONTEXT)->ExceptionCode = (STATUS); \
141  ExRaiseStatus( (STATUS) ); \
142 }
143 
144 #define FFSNormalizeAndRaiseStatus(IRPCONTEXT,STATUS) { \
145  /* (IRPCONTEXT)->ExceptionStatus = (STATUS); */ \
146  if ((STATUS) == STATUS_VERIFY_REQUIRED) { ExRaiseStatus((STATUS)); } \
147  ExRaiseStatus(FsRtlNormalizeNtstatus((STATUS),STATUS_UNEXPECTED_IO_ERROR)); \
148 }
149 
150 /*
151  * Define IsEndofFile for read and write operations
152  */
153 
154 #define FILE_WRITE_TO_END_OF_FILE 0xffffffff
155 #define FILE_USE_FILE_POINTER_POSITION 0xfffffffe
156 
157 #define IsEndOfFile(Pos) ((Pos.LowPart == FILE_WRITE_TO_END_OF_FILE) && \
158  (Pos.HighPart == FILE_USE_FILE_POINTER_POSITION ))
159 
160 #define IsDirectory(Fcb) IsFlagOn(Fcb->FFSMcb->FileAttr, FILE_ATTRIBUTE_DIRECTORY)
161 
162 /*
163  * Bug Check Codes Definitions
164  */
165 
166 #define FFS_FILE_SYSTEM (FILE_SYSTEM)
167 
168 #define FFS_BUGCHK_BLOCK (0x00010000)
169 #define FFS_BUGCHK_CLEANUP (0x00020000)
170 #define FFS_BUGCHK_CLOSE (0x00030000)
171 #define FFS_BUGCHK_CMCB (0x00040000)
172 #define FFS_BUGCHK_CREATE (0x00050000)
173 #define FFS_BUGCHK_DEBUG (0x00060000)
174 #define FFS_BUGCHK_DEVCTL (0x00070000)
175 #define FFS_BUGCHK_DIRCTL (0x00080000)
176 #define FFS_BUGCHK_DISPATCH (0x00090000)
177 #define FFS_BUGCHK_EXCEPT (0x000A0000)
178 #define FFS_BUGCHK_FFS (0x000B0000)
179 #define FFS_BUGCHK_FASTIO (0x000C0000)
180 #define FFS_BUGCHK_FILEINFO (0x000D0000)
181 #define FFS_BUGCHK_FLUSH (0x000E0000)
182 #define FFS_BUGCHK_FSCTL (0x000F0000)
183 #define FFS_BUGCHK_INIT (0x00100000)
184 #define FFS_BUGCHK_LOCK (0x0011000)
185 #define FFS_BUGCHK_MEMORY (0x0012000)
186 #define FFS_BUGCHK_MISC (0x0013000)
187 #define FFS_BUGCHK_READ (0x00140000)
188 #define FFS_BUGCHK_SHUTDOWN (0x00150000)
189 #define FFS_BUGCHK_VOLINFO (0x00160000)
190 #define FFS_BUGCHK_WRITE (0x00170000)
191 
192 #define FFS_BUGCHK_LAST (0x00170000)
193 
194 #define FFSBugCheck(A,B,C,D) { KeBugCheckEx(FFS_FILE_SYSTEM, A | __LINE__, B, C, D ); }
195 
196 
197 /* FFS file system definions */
198 
199 /*
200  * Structure of a directory entry
201  */
202 #define FFS_NAME_LEN 255
203 
204 #define FFS_ROOT_INO 2 /* Root inode */
205 
206 
207 /*
208  * FFS_DIR_PAD defines the directory entries boundaries
209  *
210  * NOTE: It must be a multiple of 4
211  */
212 #define FFS_DIR_PAD 4
213 #define FFS_DIR_ROUND (FFS_DIR_PAD - 1)
214 #define FFS_DIR_REC_LEN(name_len) (((name_len) + 8 + FFS_DIR_ROUND) & \
215  ~FFS_DIR_ROUND)
216 
217 
218 /* sys/sys/stat.h */
219 
220 #define S_ISDIR(m) ((m & _S_IFMT) == _S_IFDIR) /* directory */
221 #define S_ISCHR(m) ((m & _S_IFMT) == _S_IFCHR) /* char special */
222 #define S_ISBLK(m) ((m & _S_IFMT) == _S_IFBLK) /* block special */
223 #define S_ISREG(m) ((m & _S_IFMT) == _S_IFREG) /* regular file */
224 #define S_ISFIFO(m) ((m & _S_IFMT) == _S_IFIFO) /* fifo */
225 #define S_ISLNK(m) ((m & _S_IFMT) == _S_IFLNK) /* symbolic link */
226 #define S_ISSOCK(m) ((m & _S_IFMT) == _S_IFSOCK) /* socket */
227 #define S_ISWHT(m) ((m & _S_IFMT) == _S_IFWHT) /* whiteout */
228 
229 
230 #define S_IPERMISSION_MASK 0x1FF /* */
231 
232 #define S_IRWXU 0000700 /* RWX mask for owner */
233 #define S_IRUSR 0000400 /* R for owner */
234 #define S_IWUSR 0000200 /* W for owner */
235 #define S_IXUSR 0000100 /* X for owner */
236 
237 #define S_IRWXG 0000070 /* RWX mask for group */
238 #define S_IRGRP 0000040 /* R for group */
239 #define S_IWGRP 0000020 /* W for group */
240 #define S_IXGRP 0000010 /* X for group */
241 
242 #define S_IRWXO 0000007 /* RWX mask for other */
243 #define S_IROTH 0000004 /* R for other */
244 #define S_IWOTH 0000002 /* W for other */
245 #define S_IXOTH 0000001 /* X for other */
246 
247 #define S_ISREADABLE(m) (((m) & S_IPERMISSION_MASK) == (S_IRUSR | S_IRGRP | S_IROTH))
248 #define S_ISWRITABLE(m) (((m) & S_IPERMISSION_MASK) == (S_IWUSR | S_IWGRP | S_IWOTH))
249 
250 #define FFSSetReadable(m) (m) = ((m) | (S_IRUSR | S_IRGRP | S_IROTH))
251 #define FFSSetWritable(m) (m) = ((m) | (S_IWUSR | S_IWGRP | S_IWOTH))
252 
253 #define FFSSetReadOnly(m) (m) = ((m) & (~(S_IWUSR | S_IWGRP | S_IWOTH)))
254 #define FFSIsReadOnly(m) (!((m) & (S_IWUSR | S_IWGRP | S_IWOTH)))
255 
256 #define FFS_FIRST_DATA_BLOCK (Vcb->ffs_super_block->fs_dblkno)
257 
259 
260 typedef struct disklabel DISKLABEL, *PDISKLABEL;
261 
264 
266 
267 
268 /*
269  * ffsdrv Driver Definitions
270  */
271 
272 /*
273  * FFS_IDENTIFIER_TYPE
274  *
275  * Identifiers used to mark the structures
276  */
277 
278 typedef enum _FFS_IDENTIFIER_TYPE {
279  FFSFGD = ':DGF',
280  FFSVCB = ':BCV',
281  FFSFCB = ':BCF',
282  FFSCCB = ':BCC',
283  FFSICX = ':XCI',
284  FFSDRV = ':VRD',
285  FFSMCB = ':BCM'
287 
288 /*
289  * FFS_IDENTIFIER
290  *
291  * Header used to mark the structures
292  */
293 typedef struct _FFS_IDENTIFIER {
297 
298 
299 #define NodeType(Ptr) (*((FFS_IDENTIFIER_TYPE *)(Ptr)))
300 
301 typedef struct _FFS_MCB FFS_MCB, *PFFS_MCB;
302 
303 
304 typedef PVOID PBCB;
305 
306 /*
307  * REPINNED_BCBS List
308  */
309 
310 #define FFS_REPINNED_BCBS_ARRAY_SIZE (8)
311 
312 typedef struct _FFS_REPINNED_BCBS {
313 
314  //
315  // A pointer to the next structure contains additional repinned bcbs
316  //
317 
319 
320  //
321  // A fixed size array of pinned bcbs. Whenever a new bcb is added to
322  // the repinned bcb structure it is added to this array. If the
323  // array is already full then another repinned bcb structure is allocated
324  // and pointed to with Next.
325  //
326 
328 
330 
331 
332 /*
333  * FFS_BSD_PARTITION
334  */
335 typedef struct _FFS_BSD_PARTITION
336 {
339 
340 
341 /*
342  * FFS_GLOBAL_DATA
343  *
344  * Data that is not specific to a mounted volume
345  */
346 typedef struct _FFS_GLOBAL {
347 
348  // Identifier for this structure
350 
351  // Syncronization primitive for this structure
353 
354  // Syncronization primitive for Counting
356 
357  // Syncronization primitive for LookAside Lists
359 
360  // Table of pointers to the fast I/O entry points
362 
363  // Table of pointers to the Cache Manager callbacks
366 
367  // Pointer to the driver object
369 
370  // Pointer to the main device object
372 
373  // List of mounted volumes
375 
376  // Look Aside table of IRP_CONTEXT, FCB, MCB, CCB
382 
383  // Mcb Count ...
385 
386 #if DBG
387  // Fcb Count
388  USHORT FcbAllocated;
389 
390  // IRP_MJ_CLOSE : FCB
391  USHORT IRPCloseCount;
392 #endif
393 
394  // Global flags for the driver
396 
398 
400 
401 /*
402  * Flags for FFS_GLOBAL_DATA
403  */
404 #define FFS_UNLOAD_PENDING 0x00000001
405 #define FFS_SUPPORT_WRITING 0x00000002
406 #define FFS_CHECKING_BITMAP 0x00000008
407 
408 /*
409  * Driver Extension define
410  */
411 typedef struct {
413 } FFS_EXT, *PFFS_EXT;
414 
415 
416 typedef struct _FFS_FCBVCB {
417 
418  // FCB header required by NT
423  // end FCB header required by NT
424 
425  // Identifier for this structure
428 
429 /*
430  * FFS_VCB Volume Control Block
431  *
432  * Data that represents a mounted logical volume
433  * It is allocated as the device extension of the volume device object
434  */
435 typedef struct _FFS_VCB {
436 
437  // FCB header required by NT
438  // The VCB is also used as an FCB for file objects
439  // that represents the volume itself
444  // end FCB header required by NT
445 
446  // Identifier for this structure
448 
450 
451  // Share Access for the file object
453 
454  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP
455  // for files on this volume.
457 
458  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLOSE
459  // for both files on this volume and open instances of the
460  // volume itself.
463 
464  //
465  // Disk change count
466  //
467 
469 
470  // Pointer to the VPB in the target device object
472 
473  // The FileObject of Volume used to lock the volume
475 
476  // List of FCBs for open files on this volume
478 
479  // List of IRPs pending on directory change notify requests
481 
482  // Pointer to syncronization primitive for this list
484 
485  // This volumes device object
487 
488  // The physical device object (the disk)
490 
491  // The physical device object (the disk)
493 
494  // Information about the physical device object
497 
498  // File System Super Block
500 
501  // File System version
503 
504  // Number of Group Decsciptions
506  /*
507  // Bitmap Block per group
508  PRTL_BITMAP BlockBitMaps;
509  PRTL_BITMAP InodeBitMaps;
510  */
511  // Block / Cluster size
513 
514  // Sector size in bits
516 
519 
520  // Flags for the volume
522 
523  // Streaming File Object
525 
526  // Resource Lock for Mcb
528 
529  // Dirty Mcbs of modifications for volume stream
531 
532  // Entry of Mcb Tree (Root Node)
535 
537 
539 
541 
542 } FFS_VCB, *PFFS_VCB;
543 
544 /*
545  * Flags for FFS_VCB
546  */
547 #define VCB_INITIALIZED 0x00000001
548 #define VCB_VOLUME_LOCKED 0x00000002
549 #define VCB_MOUNTED 0x00000004
550 #define VCB_DISMOUNT_PENDING 0x00000008
551 #define VCB_READ_ONLY 0x00000010
552 
553 #define VCB_WRITE_PROTECTED 0x10000000
554 #define VCB_FLOPPY_DISK 0x20000000
555 #define VCB_REMOVAL_PREVENTED 0x40000000
556 #define VCB_REMOVABLE_MEDIA 0x80000000
557 
558 
559 #define IsMounted(Vcb) (IsFlagOn(Vcb->Flags, VCB_MOUNTED))
560 
561 
562 /*
563  * FFS_FCB File Control Block
564  *
565  * Data that represents an open file
566  * There is a single instance of the FCB for every open file
567  */
568 typedef struct _FFS_FCB {
569 
570  // FCB header required by NT
575  // end FCB header required by NT
576 
577  // Identifier for this structure
579 
580  // List of FCBs for this volume
582 
583  // Share Access for the file object
585 
586  // List of byte-range locks for this file
588 
589  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP
591 
592  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLOSE
594 
595  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP
596  // But only for Files with FO_NO_INTERMEDIATE_BUFFERING flag
598 
599  // Flags for the FCB
601 
602  // Pointer to the inode
605 
606  // Hint block for next allocation
608 
609  // Vcb
610 
612 
613  // Mcb Node ...
615 
616  // Full Path Name
618 
619 #if DBG
620  // The Ansi Filename for debugging
621  OEM_STRING AnsiFileName;
622 #endif
623 
624 
625 } FFS_FCB, *PFFS_FCB;
626 
627 
628 //
629 // Flags for FFS_FCB
630 //
631 #define FCB_FROM_POOL 0x00000001
632 #define FCB_PAGE_FILE 0x00000002
633 #define FCB_DELETE_ON_CLOSE 0x00000004
634 #define FCB_DELETE_PENDING 0x00000008
635 #define FCB_FILE_DELETED 0x00000010
636 #define FCB_FILE_MODIFIED 0x00000020
637 
638 // Mcb Node
639 
640 struct _FFS_MCB {
641 
642  // Identifier for this structure
644 
645  // Flags
647 
648  // Link List Info
649 
650  PFFS_MCB Parent; // Parent
651  PFFS_MCB Child; // Children
652  PFFS_MCB Next; // Brothers
653 
654  // Mcb Node Info
655 
656  // -> Fcb
658 
659  // Short name
661 
662  // Inode number
664 
665  // Dir entry offset in parent
667 
668  // File attribute
670 
671  // List Link to Vcb->McbList
673 };
674 
675 /*
676  * Flags for MCB
677  */
678 #define MCB_FROM_POOL 0x00000001
679 #define MCB_IN_TREE 0x00000002
680 #define MCB_IN_USE 0x00000004
681 
682 #define IsMcbUsed(Mcb) IsFlagOn(Mcb->Flags, MCB_IN_USE)
683 
684 
685 /*
686  * FFS_CCB Context Control Block
687  *
688  * Data that represents one instance of an open file
689  * There is one instance of the CCB for every instance of an open file
690  */
691 typedef struct _FFS_CCB {
692 
693  // Identifier for this structure
695 
696  // Flags
698 
699  // State that may need to be maintained
702 
703 } FFS_CCB, *PFFS_CCB;
704 
705 /*
706  * Flags for CCB
707  */
708 
709 #define CCB_FROM_POOL 0x00000001
710 
711 #define CCB_ALLOW_EXTENDED_DASD_IO 0x80000000
712 
713 
714 /*
715  * FFS_IRP_CONTEXT
716  *
717  * Used to pass information about a request between the drivers functions
718  */
719 typedef struct _FFS_IRP_CONTEXT {
720 
721  // Identifier for this structure
723 
724  // Pointer to the IRP this request describes
726 
727  // Flags
729 
730  // The major and minor function code for the request
733 
734  // The device object
736 
737  // The real device object
739 
740  // The file object
742 
745 
746  // If the request is synchronous (we are allowed to block)
748 
749  // If the request is top level
751 
752  // Used if the request needs to be queued for later processing
754 
755  // If an exception is currently in progress
757 
758  // The exception code when an exception is in progress
760 
761  // Repinned BCBs List
763 
765 
766 
767 #define IRP_CONTEXT_FLAG_FROM_POOL (0x00000001)
768 #define IRP_CONTEXT_FLAG_WAIT (0x00000002)
769 #define IRP_CONTEXT_FLAG_WRITE_THROUGH (0x00000004)
770 #define IRP_CONTEXT_FLAG_FLOPPY (0x00000008)
771 #define IRP_CONTEXT_FLAG_RECURSIVE_CALL (0x00000010)
772 #define IRP_CONTEXT_FLAG_DISABLE_POPUPS (0x00000020)
773 #define IRP_CONTEXT_FLAG_DEFERRED (0x00000040)
774 #define IRP_CONTEXT_FLAG_VERIFY_READ (0x00000080)
775 #define IRP_CONTEXT_STACK_IO_CONTEXT (0x00000100)
776 #define IRP_CONTEXT_FLAG_REQUEUED (0x00000200)
777 #define IRP_CONTEXT_FLAG_USER_IO (0x00000400)
778 #define IRP_CONTEXT_FLAG_DELAY_CLOSE (0x00000800)
779 
780 
781 /*
782  * FFS_ALLOC_HEADER
783  *
784  * In the checked version of the driver this header is put in the beginning of
785  * every memory allocation
786  */
787 typedef struct _FFS_ALLOC_HEADER {
790 
791 typedef struct _FCB_LIST_ENTRY {
795 
796 
797 /* Block Description List */
798 typedef struct _FFS_BDL {
803 } FFS_BDL, *PFFS_BDL;
804 
805 #pragma pack()
806 
807 
808 /*
809  * The following macro is used to determine if an FSD thread can block
810  * for I/O or wait for a resource. It returns TRUE if the thread can
811  * block and FALSE otherwise. This attribute can then be used to call
812  * the FSD & FSP common work routine with the proper wait value.
813  */
814 
815 #define CanFFSWait(IRP) IoIsOperationSynchronous(Irp)
816 
817 #define FFS_POOL_TAG 'dsfF'
818 
819 //
820 // Block.c
821 //
822 
823 NTSTATUS
825  IN PIRP Irp,
826  IN ULONG Length,
828 PVOID
830  IN PIRP Irp);
831 
832 NTSTATUS
834  IN PFFS_IRP_CONTEXT IrpContext,
835  IN PFFS_VCB Vcb,
836  IN PFFS_BDL FFSBDL,
837  IN ULONG Length,
838  IN ULONG Count,
839  IN BOOLEAN bVerify);
840 
841 NTSTATUS
843  IN PFFS_VCB Vcb,
845  IN ULONG Length,
846  OUT PVOID Buffer,
847  IN BOOLEAN bVerify);
848 
849 NTSTATUS
851  IN PFFS_VCB Vcb,
853  IN ULONG Size,
854  IN PVOID Buffer,
855  IN BOOLEAN bVerify);
856 
857 NTSTATUS
859  IN PDEVICE_OBJECT DeviceOjbect,
860  IN ULONG IoctlCode,
862  IN ULONG InputBufferSize,
864  IN OUT PULONG OutputBufferSize);
865 
867 VOID
869  IN PFFS_IRP_CONTEXT IrpContext,
870  IN PFFS_VCB Vcb,
871  IN BOOLEAN bPrevent);
872 
873 NTSTATUS
875  PFFS_VCB Vcb);
876 
877 
878 //
879 // Cleanup.c
880 //
881 
883 NTSTATUS
884 FFSCleanup(
885  IN PFFS_IRP_CONTEXT IrpContext);
886 
887 
888 //
889 // Close.c
890 //
891 
893 NTSTATUS
894 FFSClose(
895  IN PFFS_IRP_CONTEXT IrpContext);
896 
897 VOID
899  IN PFFS_IRP_CONTEXT IrpContext);
900 
901 #ifdef _PREFAST_
902 IO_WORKITEM_ROUTINE FFSDeQueueCloseRequest;
903 #endif // _PREFAST_
904 
905 VOID NTAPI
907  IN PVOID Context);
908 
909 
910 //
911 // Cmcb.c
912 //
913 
917  IN PVOID Context,
918  IN BOOLEAN Wait);
919 
921 VOID NTAPI
923  IN PVOID Context);
924 
928  IN PVOID Context,
929  IN BOOLEAN Wait);
930 
933  IN PVOID Fcb,
934  IN BOOLEAN Wait);
935 
936 VOID NTAPI
938  IN PVOID Fcb);
939 
941 VOID NTAPI
943  IN PVOID Context);
944 
945 
946 //
947 // Create.c
948 //
949 
950 PFFS_FCB
952  IN PFFS_VCB Vcb,
953  IN ULONG inode);
954 
955 NTSTATUS
957  IN PFFS_VCB Vcb,
958  IN PFFS_MCB ParentMcb,
960  IN OUT PULONG Index,
961  IN PFFSv1_INODE dinode1,
962  IN PFFS_DIR_ENTRY ffs_dir);
963 
964 NTSTATUS
966  IN PFFS_VCB Vcb,
967  IN PFFS_MCB ParentMcb,
969  IN OUT PULONG Index,
970  IN PFFSv2_INODE dinode2,
971  IN PFFS_DIR_ENTRY ffs_dir);
972 
973 NTSTATUS
975  IN PFFS_VCB Vcb,
976  IN PUNICODE_STRING FullFileName,
977  IN PFFS_MCB ParentMcb,
978  OUT PFFS_MCB* FFSMcb,
979  IN OUT PFFSv1_INODE dinode1);
980 
981 
982 NTSTATUS
984  IN PFFS_VCB Vcb,
985  IN PUNICODE_STRING FullFileName,
986  IN PFFS_MCB ParentMcb,
987  OUT PFFS_MCB* FFSMcb,
988  IN OUT PFFSv2_INODE dinode2);
989 
991 NTSTATUS
993  IN PFFS_IRP_CONTEXT IrpContext,
994  IN PFFS_VCB Vcb);
995 
997 NTSTATUS
999  IN PFFS_IRP_CONTEXT IrpContext,
1000  IN PFFS_VCB Vcb);
1001 
1003 NTSTATUS
1004 FFSCreate(
1005  IN PFFS_IRP_CONTEXT IrpContext);
1006 
1008 NTSTATUS
1010  PFFS_IRP_CONTEXT IrpContext,
1011  PFFS_VCB Vcb,
1013  ULONG Type,
1014  ULONG FileAttr,
1016 
1018 NTSTATUS
1020  IN PFFS_IRP_CONTEXT IrpContext,
1021  IN PFFS_VCB Vcb,
1022  IN PFFS_FCB Fcb,
1023  IN ULONG Disposition);
1024 
1025 
1026 //
1027 // Debug.c
1028 //
1029 
1030 #define DBG_VITAL 0
1031 #define DBG_ERROR 1
1032 #define DBG_USER 2
1033 #define DBG_TRACE 3
1034 #define DBG_INFO 4
1035 #define DBG_FUNC 5
1036 
1037 #if DBG
1038 #define FFSPrint(arg) FFSPrintf arg
1039 #define FFSPrintNoIndent(arg) FFSNIPrintf arg
1040 
1041 #define FFSCompleteRequest(Irp, bPrint, PriorityBoost) \
1042  FFSDbgPrintComplete(Irp, bPrint); \
1043  IoCompleteRequest(Irp, PriorityBoost)
1044 
1045 #else
1046 
1047 #define FFSPrint(arg)
1048 
1049 #define FFSCompleteRequest(Irp, bPrint, PriorityBoost) \
1050  IoCompleteRequest(Irp, PriorityBoost)
1051 
1052 #endif // DBG
1053 
1054 VOID
1055 __cdecl
1056 FFSPrintf(
1057  LONG DebugPrintLevel,
1058  PCHAR DebugMessage,
1059  ...);
1060 
1061 VOID
1062 __cdecl
1063 FFSNIPrintf(
1064  LONG DebugPrintLevel,
1065  PCHAR DebugMessage,
1066  ...);
1067 
1068 extern ULONG ProcessNameOffset;
1069 
1070 #define FFSGetCurrentProcessName() ( \
1071  (PCHAR) PsGetCurrentProcess() + ProcessNameOffset \
1072 )
1073 
1074 ULONG
1076  VOID);
1077 
1078 VOID
1081  IN PIRP Irp);
1082 
1083 VOID
1085  IN PIRP Irp,
1086  IN BOOLEAN bPrint);
1087 
1088 PCHAR
1090  IN NTSTATUS Status);
1091 
1092 
1093 //
1094 // Devctl.c
1095 //
1096 
1098 NTSTATUS
1100  IN PFFS_IRP_CONTEXT IrpContext);
1101 
1103 NTSTATUS
1105  IN PFFS_IRP_CONTEXT IrpContext);
1106 
1108 NTSTATUS
1110  IN PFFS_IRP_CONTEXT IrpContext);
1111 
1112 
1113 //
1114 // Dirctl.c
1115 //
1116 
1117 ULONG
1120 
1121 ULONG
1123  IN PFFS_VCB Vcb,
1125  IN ULONG in,
1126  IN PVOID Buffer,
1127  IN ULONG UsedLength,
1128  IN ULONG Length,
1129  IN ULONG FileIndex,
1131  IN BOOLEAN Single);
1132 
1134 NTSTATUS
1136  IN PFFS_IRP_CONTEXT IrpContext);
1137 
1139 NTSTATUS
1141  IN PFFS_IRP_CONTEXT IrpContext);
1142 
1143 VOID
1145  IN PFFS_IRP_CONTEXT IrpContext,
1146  IN PFFS_VCB Vcb,
1147  IN PFFS_FCB Fcb,
1148  IN ULONG Filter,
1149  IN ULONG Action);
1150 
1152 NTSTATUS
1154  IN PFFS_IRP_CONTEXT IrpContext);
1155 
1156 BOOLEAN
1158  PFFS_VCB Vcb,
1159  PFFS_FCB Dcb);
1160 
1161 
1162 //
1163 // Dispatch.c
1164 //
1165 
1166 NTSTATUS
1168  IN PFFS_IRP_CONTEXT IrpContext);
1169 
1170 #ifdef _PREFAST_
1171 IO_WORKITEM_ROUTINE FFSDeQueueRequest;
1172 #endif // _PREFAST_
1173 
1174 VOID NTAPI
1176  IN PVOID Context);
1177 
1178 NTSTATUS
1180  IN PFFS_IRP_CONTEXT IrpContext);
1181 
1182 #ifdef _PREFAST_
1200 #endif // _PREFAST_
1201 
1205  PIRP Irp);
1206 
1207 
1208 //
1209 // Except.c
1210 //
1211 
1212 NTSTATUS
1214  IN PFFS_IRP_CONTEXT IrpContext,
1215  IN PEXCEPTION_POINTERS ExceptionPointer);
1216 
1217 NTSTATUS
1219  IN PFFS_IRP_CONTEXT IrpContext);
1220 
1221 
1222 //
1223 // ffs.c
1224 //
1225 
1227 FFSLoadSuper(
1228  IN PFFS_VCB Vcb,
1229  IN BOOLEAN bVerify,
1230  IN ULONGLONG SuperBlockOffset);
1231 
1233 BOOLEAN
1234 FFSSaveSuper(
1235  IN PFFS_IRP_CONTEXT IrpContext,
1236  IN PFFS_VCB Vcb);
1237 
1238 BOOLEAN
1239 FFSLoadGroup(
1240  IN PFFS_VCB Vcb);
1241 
1242 BOOLEAN
1243 FFSSaveGroup(
1244  IN PFFS_IRP_CONTEXT IrpContext,
1245  IN PFFS_VCB Vcb);
1246 
1247 BOOLEAN
1249  IN PFFS_VCB Vcb,
1250  IN ULONG inode,
1251  OUT PLONGLONG offset);
1252 
1253 BOOLEAN
1255  IN PFFS_VCB Vcb,
1256  IN ULONG inode,
1257  OUT PLONGLONG offset);
1258 
1259 BOOLEAN
1261  IN PFFS_VCB Vcb,
1262  IN ULONG inode,
1263  IN PFFSv1_INODE dinode1);
1264 
1265 BOOLEAN
1267  IN PFFS_VCB Vcb,
1268  IN ULONG inode,
1269  IN PFFSv2_INODE dinode2);
1270 
1272 BOOLEAN
1274  IN PFFS_IRP_CONTEXT IrpContext,
1275  IN PFFS_VCB Vcb,
1276  IN ULONG Inode,
1277  IN PFFSv1_INODE dinode1);
1278 
1280 BOOLEAN
1282  IN PFFS_IRP_CONTEXT IrpContext,
1283  IN PFFS_VCB Vcb,
1284  IN ULONG Inode,
1285  IN PFFSv2_INODE dinode2);
1286 
1287 BOOLEAN
1289  IN PFFS_VCB Vcb,
1290  IN ULONG dwBlk,
1291  IN PVOID Buffer);
1292 
1293 BOOLEAN
1295  IN PFFS_VCB Vcb,
1296  IN ULONGLONG dwBlk,
1297  IN PVOID Buffer);
1298 
1300 BOOLEAN
1301 FFSSaveBlock(
1302  IN PFFS_IRP_CONTEXT IrpContext,
1303  IN PFFS_VCB Vcb,
1304  IN ULONG dwBlk,
1305  IN PVOID Buf);
1306 
1308 BOOLEAN
1310  IN PFFS_IRP_CONTEXT IrpContext,
1311  IN PFFS_VCB Vcb,
1312  IN LONGLONG Offset,
1313  IN ULONG Size,
1314  IN PVOID Buf);
1315 
1316 ULONG
1318  IN PFFS_VCB Vcb,
1319  IN ULONG dwContent,
1320  IN ULONG Index,
1321  IN int layer);
1322 
1323 ULONGLONG
1325  IN PFFS_VCB Vcb,
1326  IN ULONGLONG dwContent,
1327  IN ULONG Index,
1328  IN int layer);
1329 
1330 ULONG
1332  IN PFFS_VCB Vcb,
1333  IN PFFSv1_INODE dinode1,
1334  IN ULONG Index);
1335 
1336 ULONGLONG
1338  IN PFFS_VCB Vcb,
1339  IN PFFSv2_INODE dinode2,
1340  IN ULONG Index);
1341 
1342 ULONG
1344  IN PFFS_IRP_CONTEXT IrpContext,
1345  IN PFFS_VCB Vcb,
1346  IN PFFSv1_INODE dinode1,
1347  IN ULONGLONG Offset,
1348  IN ULONG Size,
1349  OUT PFFS_BDL *ffs_bdl);
1350 
1351 ULONG
1353  IN PFFS_IRP_CONTEXT IrpContext,
1354  IN PFFS_VCB Vcb,
1355  IN PFFSv2_INODE dinode2,
1356  IN ULONGLONG Offset,
1357  IN ULONG Size,
1358  OUT PFFS_BDL *ffs_bdl);
1359 
1360 BOOLEAN
1361 FFSNewBlock(
1362  PFFS_IRP_CONTEXT IrpContext,
1363  PFFS_VCB Vcb,
1364  ULONG GroupHint,
1365  ULONG BlockHint,
1366  PULONG dwRet);
1367 
1368 BOOLEAN
1369 FFSFreeBlock(
1370  PFFS_IRP_CONTEXT IrpContext,
1371  PFFS_VCB Vcb,
1372  ULONG Block);
1373 
1375 BOOLEAN
1377  PFFS_IRP_CONTEXT IrpContext,
1378  PFFS_VCB Vcb,
1379  PFFS_FCB Fcb,
1380  ULONG dwContent,
1381  ULONG Index,
1382  ULONG layer,
1383  BOOLEAN bNew,
1384  ULONG *dwRet);
1385 
1386 BOOLEAN
1388  PFFS_IRP_CONTEXT IrpContext,
1389  PFFS_VCB Vcb,
1390  PFFS_FCB Fcb,
1391  ULONG *dwRet);
1392 
1393 NTSTATUS
1394 FFSNewInode(
1395  PFFS_IRP_CONTEXT IrpContext,
1396  PFFS_VCB Vcb,
1397  ULONG GroupHint,
1398  ULONG Type,
1399  PULONG Inode);
1400 
1401 BOOLEAN
1402 FFSFreeInode(
1403  PFFS_IRP_CONTEXT IrpContext,
1404  PFFS_VCB Vcb,
1405  ULONG Inode,
1406  ULONG Type);
1407 
1409 NTSTATUS
1410 FFSAddEntry(
1411  IN PFFS_IRP_CONTEXT IrpContext,
1412  IN PFFS_VCB Vcb,
1413  IN PFFS_FCB Dcb,
1414  IN ULONG FileType,
1415  IN ULONG Inode,
1417 
1419 NTSTATUS
1421  IN PFFS_IRP_CONTEXT IrpContext,
1422  IN PFFS_VCB Vcb,
1423  IN PFFS_FCB Dcb,
1424  IN ULONG FileType,
1425  IN ULONG Inode);
1426 
1428 NTSTATUS
1430  IN PFFS_IRP_CONTEXT IrpContext,
1431  IN PFFS_VCB Vcb,
1432  IN PFFS_FCB Dcb,
1433  IN ULONG OldParent,
1434  IN ULONG NewParent);
1435 
1437 BOOLEAN
1439  IN PFFS_IRP_CONTEXT IrpContext,
1440  IN PFFS_VCB Vcb,
1441  IN PFFS_FCB Fcb,
1442  IN ULONG dwContent,
1443  IN ULONG Index,
1444  IN ULONG layer,
1445  OUT BOOLEAN *bFreed);
1446 
1447 BOOLEAN
1449  IN PFFS_IRP_CONTEXT IrpContext,
1450  IN PFFS_VCB Vcb,
1451  IN PFFS_FCB Fcb);
1452 
1454 BOOLEAN
1456  IN PFFS_VCB Vcb,
1457  IN LONGLONG Lba,
1458  IN LONGLONG Length);
1459 
1461 VOID
1463  IN PFFS_VCB Vcb,
1464  IN LONGLONG Lba,
1465  IN LONGLONG Length);
1466 
1468 BOOLEAN
1470  IN PFFS_VCB Vcb,
1471  IN LONGLONG Lba,
1472  OUT PLONGLONG pLba,
1473  OUT PLONGLONG pLength,
1474  OUT PLONGLONG RunStart,
1475  OUT PLONGLONG RunLength,
1476  OUT PULONG Index);
1477 
1478 ULONG
1480  PFFS_VCB Vcb,
1481  ULONG TotalBlocks);
1482 
1483 ULONG
1485  PFFS_VCB Vcb,
1486  ULONG DataBlocks);
1487 
1488 
1489 //
1490 // Fastio.c
1491 //
1492 
1493 #ifdef _PREFAST_
1494 FAST_IO_CHECK_IF_POSSIBLE FFSFastIoCheckIfPossible;
1495 #endif // _PREFAST_
1496 
1497 BOOLEAN NTAPI
1501  IN ULONG Length,
1502  IN BOOLEAN Wait,
1503  IN ULONG LockKey,
1507 
1508 #ifdef _PREFAST_
1509 FAST_IO_READ FFSFastIoRead;
1510 #endif // _PREFAST_
1511 
1512 BOOLEAN NTAPI
1516  IN ULONG Length,
1517  IN BOOLEAN Wait,
1518  IN ULONG LockKey,
1519  OUT PVOID Buffer,
1522 
1523 #ifdef _PREFAST_
1524 FAST_IO_WRITE FFSFastIoWrite;
1525 #endif // _PREFAST_
1526 
1527 BOOLEAN NTAPI
1531  IN ULONG Length,
1532  IN BOOLEAN Wait,
1533  IN ULONG LockKey,
1534  OUT PVOID Buffer,
1537 
1538 #ifdef _PREFAST_
1539 FAST_IO_QUERY_BASIC_INFO FFSFastIoQueryBasicInfo;
1540 #endif // _PREFAST_
1541 
1543 BOOLEAN NTAPI
1546  IN BOOLEAN Wait,
1550 
1551 #ifdef _PREFAST_
1552 FAST_IO_QUERY_STANDARD_INFO FFSFastIoQueryStandardInfo;
1553 #endif // _PREFAST_
1554 
1556 BOOLEAN NTAPI
1559  IN BOOLEAN Wait,
1563 
1564 #ifdef _PREFAST_
1565 FAST_IO_LOCK FFSFastIoLock;
1566 #endif // _PREFAST_
1567 
1568 BOOLEAN NTAPI
1574  IN ULONG Key,
1579 
1580 #ifdef _PREFAST_
1581 FAST_IO_UNLOCK_SINGLE FFSFastIoUnlockSingle;
1582 #endif // _PREFAST_
1583 
1584 BOOLEAN NTAPI
1590  IN ULONG Key,
1593 
1594 #ifdef _PREFAST_
1595 FAST_IO_UNLOCK_ALL FFSFastIoUnlockAll;
1596 #endif // _PREFAST_
1597 
1598 BOOLEAN NTAPI
1604 
1605 #ifdef _PREFAST_
1606 FAST_IO_UNLOCK_ALL_BY_KEY FFSFastIoUnlockAllByKey;
1607 #endif // _PREFAST_
1608 
1609 BOOLEAN NTAPI
1612 #ifndef __REACTOS__
1614 #else
1615  IN PVOID Process,
1616 #endif
1617  IN ULONG Key,
1620 
1621 #ifdef _PREFAST_
1622 FAST_IO_QUERY_NETWORK_OPEN_INFO FFSFastIoQueryNetworkOpenInfo;
1623 #endif // _PREFAST_
1624 
1626 BOOLEAN NTAPI
1629  IN BOOLEAN Wait,
1633 
1634 //
1635 // FileInfo.c
1636 //
1637 
1639 NTSTATUS
1641  IN PFFS_IRP_CONTEXT IrpContext);
1642 
1644 NTSTATUS
1646  IN PFFS_IRP_CONTEXT IrpContext);
1647 
1648 BOOLEAN
1650  PFFS_IRP_CONTEXT IrpContext,
1651  PFFS_VCB Vcb,
1652  PFFS_FCB Fcb,
1654 
1655 BOOLEAN
1657  PFFS_IRP_CONTEXT IrpContext,
1658  PFFS_VCB Vcb,
1659  PFFS_FCB Fcb,
1661 
1662 NTSTATUS
1664  PFFS_IRP_CONTEXT IrpContext,
1665  PFFS_VCB Vcb,
1666  PFFS_FCB Fcb,
1667  BOOLEAN bDelete);
1668 
1670 NTSTATUS
1672  PFFS_IRP_CONTEXT IrpContext,
1673  PFFS_VCB Vcb,
1674  PFFS_FCB Fcb);
1675 
1677 BOOLEAN
1679  PFFS_IRP_CONTEXT IrpContext,
1680  PFFS_VCB Vcb,
1681  PFFS_FCB Fcb);
1682 
1683 
1684 //
1685 // Flush.c
1686 //
1687 
1689 NTSTATUS
1691  IN PFFS_VCB Vcb,
1692  BOOLEAN bShutDown);
1693 
1695 NTSTATUS
1697  IN PFFS_VCB Vcb,
1698  BOOLEAN bShutDown);
1699 
1700 NTSTATUS
1701 FFSFlushFile(
1702  IN PFFS_FCB Fcb);
1703 
1705 NTSTATUS
1706 FFSFlush(
1707  IN PFFS_IRP_CONTEXT IrpContext);
1708 
1709 
1710 //
1711 // Fsctl.c
1712 //
1713 
1714 VOID
1716  IN PVPB Vpb,
1717  IN USHORT Flag);
1718 
1719 VOID
1721  IN PVPB Vpb,
1722  IN USHORT Flag);
1723 
1724 NTSTATUS
1727  OUT ULONGLONG *StartOffset);
1728 
1729 NTSTATUS
1732  IN PFFS_VCB Vcb);
1733 
1735 BOOLEAN
1737  IN PFFS_IRP_CONTEXT IrpContext,
1738  IN PFFS_VCB Vcb,
1739  IN BOOLEAN bForce);
1740 
1742 NTSTATUS
1744  IN PFFS_VCB Vcb,
1745  IN BOOLEAN FlushBeforePurge);
1746 
1748 NTSTATUS
1749 FFSPurgeFile(
1750  IN PFFS_FCB Fcb,
1751  IN BOOLEAN FlushBeforePurge);
1752 
1753 BOOLEAN
1755  IN PFFS_VCB Vcb);
1756 
1757 NTSTATUS
1758 FFSLockVcb(
1759  IN PFFS_VCB Vcb,
1761 
1763 NTSTATUS
1765  IN PFFS_IRP_CONTEXT IrpContext);
1766 
1767 NTSTATUS
1768 FFSUnlockVcb(
1769  IN PFFS_VCB Vcb,
1771 
1773 NTSTATUS
1775  IN PFFS_IRP_CONTEXT IrpContext);
1776 
1778 NTSTATUS
1780  IN PFFS_IRP_CONTEXT IrpContext);
1781 
1783 NTSTATUS
1785  IN PFFS_IRP_CONTEXT IrpContext);
1786 
1788 NTSTATUS
1790  IN PFFS_IRP_CONTEXT IrpContext);
1791 
1793 NTSTATUS
1795  IN PFFS_IRP_CONTEXT IrpContext);
1796 
1798 NTSTATUS
1800  IN PFFS_IRP_CONTEXT IrpContext);
1801 
1803 NTSTATUS
1805  IN PFFS_IRP_CONTEXT IrpContext);
1806 
1808 NTSTATUS
1810  IN PFFS_IRP_CONTEXT IrpContext);
1811 
1813 NTSTATUS
1815  IN PFFS_IRP_CONTEXT IrpContext);
1816 
1817 
1818 //
1819 // Init.c
1820 //
1821 
1822 BOOLEAN
1825 
1826 #ifdef _PREFAST_
1827 DRIVER_INITIALIZE DriverEntry;
1828 #endif // _PREFAST_
1829 
1830 #ifdef _PREFAST_
1831 DRIVER_UNLOAD DriverUnload;
1832 #endif // _PREFAST_
1833 
1834 VOID NTAPI
1835 DriverUnload(
1837 
1838 
1839 //
1840 // Lock.c
1841 //
1842 
1844 NTSTATUS
1846  IN PFFS_IRP_CONTEXT IrpContext);
1847 
1848 
1849 //
1850 // Memory.c
1851 //
1852 
1857  IN PIRP Irp);
1858 
1860 VOID
1862  IN PFFS_IRP_CONTEXT IrpContext);
1863 
1865 PFFS_FCB
1867  IN PFFS_VCB Vcb,
1868  IN PFFS_MCB FFSMcb,
1869  IN PFFSv1_INODE dinode1);
1870 
1872 PFFS_FCB
1874  IN PFFS_VCB Vcb,
1875  IN PFFS_MCB FFSMcb,
1876  IN PFFSv2_INODE dinode2);
1877 
1879 VOID
1880 FFSFreeFcb(
1881  IN PFFS_FCB Fcb);
1882 
1884 PFFS_CCB
1886  VOID);
1887 
1889 VOID
1890 FFSFreeMcb(
1891  IN PFFS_MCB Mcb);
1892 
1894 PFFS_FCB
1896  PFFS_VCB Vcb,
1897  PFFS_MCB Mcb);
1898 
1900 VOID
1901 FFSFreeCcb(
1902  IN PFFS_CCB Ccb);
1903 
1904 PFFS_MCB
1906  PFFS_VCB Vcb,
1908  ULONG FileAttr);
1909 
1910 PFFS_MCB
1912  PFFS_VCB Vcb,
1913  PFFS_MCB FFSMcb,
1914  ULONG Inode);
1915 
1916 PFFS_MCB
1917 FFSSearchMcb(
1918  PFFS_VCB Vcb,
1919  PFFS_MCB Parent,
1921 
1922 BOOLEAN
1924  PFFS_MCB Mcb,
1926 
1927 VOID
1930 
1931 VOID
1933  PFFS_VCB Vcb,
1934  PFFS_MCB Parent,
1935  PFFS_MCB Child);
1936 
1937 BOOLEAN
1939  PFFS_VCB Vcb,
1940  PFFS_MCB McbTree,
1941  PFFS_MCB FFSMcb);
1942 
1944 VOID
1946  PFFS_MCB McbTree);
1947 
1948 BOOLEAN
1950  PFFS_IRP_CONTEXT IrpContext,
1951  PFFS_VCB Vcb,
1952  ULONG Block);
1953 
1954 BOOLEAN
1956  PFFS_IRP_CONTEXT IrpContext,
1957  PFFS_VCB Vcb);
1958 
1959 VOID
1960 FFSInsertVcb(
1961  PFFS_VCB Vcb);
1962 
1963 VOID
1964 FFSRemoveVcb(
1965  PFFS_VCB Vcb);
1966 
1968 NTSTATUS
1970  IN PFFS_IRP_CONTEXT IrpContext,
1971  IN PFFS_VCB Vcb,
1972  IN PFFS_SUPER_BLOCK FFSSb,
1974  IN PDEVICE_OBJECT VolumeDevice,
1975  IN PVPB Vpb);
1976 
1978 VOID
1979 FFSFreeVcb(
1980  IN PFFS_VCB Vcb);
1981 
1982 VOID
1983 FFSRepinBcb(
1984  IN PFFS_IRP_CONTEXT IrpContext,
1985  IN PBCB Bcb);
1986 
1987 VOID
1989  IN PFFS_IRP_CONTEXT IrpContext);
1990 
1991 
1993 NTSTATUS
1995  IN PFFS_IRP_CONTEXT IrpContext,
1996  IN NTSTATUS Status);
1997 
1998 VOID
2001 
2002 
2003 //
2004 // Misc.c
2005 //
2006 
2007 ULONG
2008 FFSLog2(
2009  ULONG Value);
2010 
2012 FFSSysTime(
2013  IN ULONG i_time);
2014 
2015 ULONG
2016 FFSInodeTime(
2017  IN LARGE_INTEGER SysTime);
2018 
2019 NTSTATUS
2021  IN OUT PUNICODE_STRING Unicode,
2022  IN POEM_STRING Oem);
2023 
2024 NTSTATUS
2026  IN OUT POEM_STRING Oem,
2027  IN PUNICODE_STRING Unicode);
2028 
2029 
2030 //
2031 // Pnp.c
2032 //
2033 
2035 NTSTATUS
2036 FFSPnp(
2037  IN PFFS_IRP_CONTEXT IrpContext);
2038 
2040 NTSTATUS
2042  PFFS_IRP_CONTEXT IrpContext,
2043  PFFS_VCB Vcb);
2044 
2046 NTSTATUS
2047 FFSPnpRemove(
2048  PFFS_IRP_CONTEXT IrpContext,
2049  PFFS_VCB Vcb);
2050 
2052 NTSTATUS
2054  PFFS_IRP_CONTEXT IrpContext,
2055  PFFS_VCB Vcb);
2056 
2058 NTSTATUS
2060  PFFS_IRP_CONTEXT IrpContext,
2061  PFFS_VCB Vcb);
2062 
2063 
2064 //
2065 // Read.c
2066 //
2067 
2068 BOOLEAN
2069 FFSCopyRead(
2072  IN ULONG Length,
2073  IN BOOLEAN Wait,
2074  OUT PVOID Buffer,
2076 
2077 NTSTATUS
2079  IN PFFS_IRP_CONTEXT IrpContext,
2080  IN PFFS_VCB Vcb,
2081  IN PFFSv1_INODE dinode1,
2083  IN PVOID Buffer,
2084  IN ULONG size,
2085  OUT PULONG dwRet);
2086 
2087 NTSTATUS
2089  IN PFFS_IRP_CONTEXT IrpContext,
2090  IN PFFS_VCB Vcb,
2091  IN PFFSv2_INODE dinode2,
2093  IN PVOID Buffer,
2094  IN ULONG size,
2095  OUT PULONG dwRet);
2096 
2098 NTSTATUS
2099 FFSRead(
2100  IN PFFS_IRP_CONTEXT IrpContext);
2101 
2102 
2103 //
2104 // Shutdown.c
2105 //
2106 
2108 NTSTATUS
2109 FFSShutDown(
2110  IN PFFS_IRP_CONTEXT IrpContext);
2111 
2112 
2113 //
2114 // Volinfo.c
2115 //
2116 
2118 NTSTATUS
2120  IN PFFS_IRP_CONTEXT IrpContext);
2121 
2123 NTSTATUS
2125  IN PFFS_IRP_CONTEXT IrpContext);
2126 
2127 
2128 //
2129 // Write.c
2130 //
2131 
2132 NTSTATUS
2134  IN PFFS_IRP_CONTEXT IrpContext,
2135  IN PFFS_VCB Vcb,
2136  IN PFFSv1_INODE dinode1,
2138  IN PVOID Buffer,
2139  IN ULONG size,
2140  IN BOOLEAN bWriteToDisk,
2141  OUT PULONG dwRet);
2142 
2143 NTSTATUS
2145  IN PFFS_IRP_CONTEXT IrpContext,
2146  IN PFFS_VCB Vcb,
2147  IN PFFSv2_INODE dinode2,
2149  IN PVOID Buffer,
2150  IN ULONG size,
2151  IN BOOLEAN bWriteToDisk,
2152  OUT PULONG dwRet);
2153 
2154 VOID
2156  PFFS_VCB Vcb,
2157  PFFS_FCB Fcb,
2159 
2160 BOOLEAN
2161 FFSZeroHoles(
2162  IN PFFS_IRP_CONTEXT IrpContext,
2163  IN PFFS_VCB Vcb,
2165  IN LONGLONG Offset,
2166  IN LONGLONG Count);
2167 
2169 NTSTATUS
2170 FFSWrite(
2171  IN PFFS_IRP_CONTEXT IrpContext);
2172 
2173 NTSTATUS
2176  IN PIRP pIrp);
2177 
2178 #endif /* _FFS_HEADER_ */
NTSTATUS FFSv1ScanDir(IN PFFS_VCB Vcb, IN PFFS_MCB ParentMcb, IN PUNICODE_STRING FileName, IN OUT PULONG Index, IN PFFSv1_INODE dinode1, IN PFFS_DIR_ENTRY ffs_dir)
NTSTATUS FFSGetPartition(IN PDEVICE_OBJECT DeviceObject, OUT ULONGLONG *StartOffset)
Definition: fsctl.c:84
Definition: ext2fs.h:1103
CACHE_MANAGER_CALLBACKS CacheManagerNoOpCallbacks
Definition: ffsdrv.h:365
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
signed char * PCHAR
Definition: retypes.h:7
__drv_mustHoldCriticalRegion NTSTATUS FFSWrite(IN PFFS_IRP_CONTEXT IrpContext)
Definition: write.c:1487
__drv_mustHoldCriticalRegion PFFS_FCB FFSv2AllocateFcb(IN PFFS_VCB Vcb, IN PFFS_MCB FFSMcb, IN PFFSv2_INODE dinode2)
Definition: memory.c:549
NTSTATUS FFSQueueRequest(IN PFFS_IRP_CONTEXT IrpContext)
Definition: dispatch.c:33
ULONG SectorBits
Definition: ffsdrv.h:515
LIST_ENTRY Next
Definition: ffsdrv.h:449
NTSTATUS FFSDispatchRequest(IN PFFS_IRP_CONTEXT IrpContext)
Definition: dispatch.c:104
__drv_mustHoldCriticalRegion NTSTATUS FFSCreateFile(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb)
__drv_mustHoldCriticalRegion NTSTATUS FFSQueryVolumeInformation(IN PFFS_IRP_CONTEXT IrpContext)
Definition: volinfo.c:32
Definition: ffsdrv.h:281
__drv_mustHoldCriticalRegion NTSTATUS FFSLockVolume(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fsctl.c:417
__drv_mustHoldCriticalRegion NTSTATUS FFSNotifyChangeDirectory(IN PFFS_IRP_CONTEXT IrpContext)
Definition: dirctl.c:999
#define IN
Definition: typedefs.h:38
_In_ PNDIS_STRING _In_ PNDIS_STRING _Out_ PDEVICE_OBJECT * pDeviceObject
Definition: ndis.h:4679
PCHAR FFSNtStatusToString(IN NTSTATUS Status)
NTSTATUS FFSv2WriteInode(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFSv2_INODE dinode2, IN ULONGLONG offset, IN PVOID Buffer, IN ULONG size, IN BOOLEAN bWriteToDisk, OUT PULONG dwRet)
Definition: write.c:926
__drv_mustHoldCriticalRegion NTSTATUS FFSSetVolumeInformation(IN PFFS_IRP_CONTEXT IrpContext)
Definition: volinfo.c:349
__drv_mustHoldCriticalRegion NTSTATUS FFSPurgeFile(IN PFFS_FCB Fcb, IN BOOLEAN FlushBeforePurge)
Definition: fsctl.c:1557
__drv_mustHoldCriticalRegion NTSTATUS FFSSelectBSDPartition(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fsctl.c:1610
NTSTATUS FFSUnlockVcb(IN PFFS_VCB Vcb, IN PFILE_OBJECT FileObject)
Definition: fsctl.c:491
ULONG DeOffset
Definition: ffsdrv.h:666
__drv_mustHoldCriticalRegion PFFS_CCB FFSAllocateCcb(VOID)
Definition: memory.c:803
__drv_mustHoldCriticalRegion BOOLEAN FFSDeleteFile(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, PFFS_FCB Fcb)
Definition: fileinfo.c:1653
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
BOOLEAN NTAPI FFSFastIoWrite(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: halp.h:205
VOID FFSDbgPrintComplete(IN PIRP Irp, IN BOOLEAN bPrint)
ERESOURCE McbResource
Definition: ffsdrv.h:527
NTSTATUS FFSExceptionHandler(IN PFFS_IRP_CONTEXT IrpContext)
Definition: except.c:117
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST NPAGED_LOOKASIDE_LIST
__drv_mustHoldCriticalRegion BOOLEAN FFSv2SaveInode(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN ULONG Inode, IN PFFSv2_INODE dinode2)
Definition: ffs.c:445
Definition: dir.h:83
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
__drv_mustHoldCriticalRegion BOOLEAN FFSTruncateBlock(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFS_FCB Fcb, IN ULONG dwContent, IN ULONG Index, IN ULONG layer, OUT BOOLEAN *bFreed)
Definition: ffs.c:2467
Type
Definition: Type.h:6
BOOLEAN FFSLoadGroup(IN PFFS_VCB Vcb)
ULONG Offset
Definition: ffsdrv.h:800
FFS_IDENTIFIER Identifier
Definition: ffsdrv.h:788
struct _FFS_BDL * PFFS_BDL
FFS_IDENTIFIER Identifier
Definition: ffsdrv.h:643
#define IRP_MJ_FLUSH_BUFFERS
PDEVICE_OBJECT RealDevice
Definition: ffsdrv.h:492
#define __drv_mustHoldCriticalRegion
Definition: ffsdrv.h:34
#define __cdecl
Definition: accygwin.h:79
Definition: ffsdrv.h:279
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT _In_ PDEVICE_OBJECT TargetDevice
Definition: iofuncs.h:688
NTSTATUS FFSv1ReadInode(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFSv1_INODE dinode1, IN ULONGLONG offset, IN PVOID Buffer, IN ULONG size, OUT PULONG dwRet)
Definition: read.c:496
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN OUT PIO_STATUS_BLOCK IoStatus
Definition: fatprocs.h:2650
PFFS_SUPER_BLOCK FFSLoadSuper(IN PFFS_VCB Vcb, IN BOOLEAN bVerify, IN ULONGLONG SuperBlockOffset)
Definition: ffs.c:75
__drv_mustHoldCriticalRegion NTSTATUS FFSSupersedeOrOverWriteFile(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFS_FCB Fcb, IN ULONG Disposition)
Definition: create.c:2000
struct _FFS_BSD_PARTITION * PFFS_BSD_PARTITION
#define IRP_MJ_SHUTDOWN
USHORT MaxDepth
Definition: ffsdrv.h:377
_In_ PIRP Irp
Definition: csq.h:116
__drv_mustHoldCriticalRegion PFFS_FCB FFSCreateFcbFromMcb(PFFS_VCB Vcb, PFFS_MCB Mcb)
Definition: memory.c:1077
__drv_mustHoldCriticalRegion BOOLEAN FFSSaveBuffer(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN LONGLONG Offset, IN ULONG Size, IN PVOID Buf)
Definition: ffs.c:552
UCHAR MajorFunction
Definition: ffsdrv.h:731
ULONG FFSTotalBlocks(PFFS_VCB Vcb, ULONG DataBlocks)
Definition: ffs.c:2988
__drv_mustHoldCriticalRegion NTSTATUS FFSMountVolume(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fsctl.c:885
ULONG BlockSize
Definition: ffsdrv.h:512
BOOLEAN FFSIsHandleCountZero(IN PFFS_VCB Vcb)
Definition: fsctl.c:327
__drv_mustHoldCriticalRegion NTSTATUS FFSPnpRemove(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb)
SHARE_ACCESS ShareAccess
Definition: ffsdrv.h:452
ULONG ReferenceCount
Definition: ffsdrv.h:461
ULONG PartitionNumber
Definition: ffsdrv.h:540
VOID FFSQueueCloseRequest(IN PFFS_IRP_CONTEXT IrpContext)
Definition: close.c:279
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
struct _FFS_IRP_CONTEXT FFS_IRP_CONTEXT
struct ufs1_dinode * PFFSv1_INODE
Definition: ffsdrv.h:262
BOOLEAN FFSv2LoadInode(IN PFFS_VCB Vcb, IN ULONG inode, IN PFFSv2_INODE dinode2)
Definition: ffs.c:336
__drv_mustHoldCriticalRegion NTSTATUS FFSSetParentEntry(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFS_FCB Dcb, IN ULONG OldParent, IN ULONG NewParent)
Definition: ffs.c:2366
__drv_mustHoldCriticalRegion NTSTATUS FFSRemoveEntry(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFS_FCB Dcb, IN ULONG FileType, IN ULONG Inode)
Definition: ffs.c:2203
LONG NTSTATUS
Definition: precomp.h:26
BOOLEAN FFSCheckBitmapConsistency(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb)
Definition: memory.c:1500
NTSTATUS FFSLockVcb(IN PFFS_VCB Vcb, IN PFILE_OBJECT FileObject)
Definition: fsctl.c:358
VOID FFSClearVpbFlag(IN PVPB Vpb, IN USHORT Flag)
Definition: fsctl.c:69
GLintptr offset
Definition: glext.h:5920
volatile BOOL bShutDown
Definition: ServiceMain.c:12
PFFSv2_INODE dinode2
Definition: ffsdrv.h:604
FFS_IDENTIFIER Identifier
Definition: ffsdrv.h:447
ULONG Flags
Definition: ffsdrv.h:395
#define IRP_MJ_SET_VOLUME_INFORMATION
__drv_mustHoldCriticalRegion VOID FFSFreeMcb(IN PFFS_MCB Mcb)
Definition: memory.c:1028
ULONG dwMeta[FFS_BLOCK_TYPES]
Definition: ffsdrv.h:518
NPAGED_LOOKASIDE_LIST FFSIrpContextLookasideList
Definition: ffsdrv.h:378
__drv_mustHoldCriticalRegion VOID FFSFreeIrpContext(IN PFFS_IRP_CONTEXT IrpContext)
Definition: memory.c:179
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
__drv_mustHoldCriticalRegion BOOLEAN FFSLookupMcbEntry(IN PFFS_VCB Vcb, IN LONGLONG Lba, OUT PLONGLONG pLba, OUT PLONGLONG pLength, OUT PLONGLONG RunStart, OUT PLONGLONG RunLength, OUT PULONG Index)
Definition: ffs.c:2860
Definition: ffsdrv.h:283
NTSTATUS FFSDiskIoControl(IN PDEVICE_OBJECT DeviceOjbect, IN ULONG IoctlCode, IN PVOID InputBuffer, IN ULONG InputBufferSize, IN OUT PVOID OutputBuffer, IN OUT PULONG OutputBufferSize)
Definition: block.c:500
NTSTATUS FFSLockUserBuffer(IN PIRP Irp, IN ULONG Length, IN LOCK_OPERATION Operation)
Definition: block.c:70
VOID FFSStartFloppyFlushDpc(PFFS_VCB Vcb, PFFS_FCB Fcb, PFILE_OBJECT FileObject)
Definition: write.c:160
__drv_mustHoldCriticalRegion BOOLEAN FFSCheckDismount(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN BOOLEAN bForce)
Definition: fsctl.c:1332
static OUT PIO_STATUS_BLOCK OUT PVOID IN ULONG IN FILE_INFORMATION_CLASS FileInformationClass
Definition: pipe.c:75
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:722
struct _FFS_GLOBAL FFS_GLOBAL
__drv_mustHoldCriticalRegion NTSTATUS FFSPnpSurpriseRemove(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb)
PFILE_OBJECT FileObject
Definition: ffsdrv.h:741
PFILE_OBJECT LockFile
Definition: ffsdrv.h:474
struct _FFS_REPINNED_BCBS * PFFS_REPINNED_BCBS
struct _FFS_FCB FFS_FCB
STRING OEM_STRING
Definition: umtypes.h:203
Definition: fs.h:235
BOOLEAN FFSExpandFile(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, PFFS_FCB Fcb, PLARGE_INTEGER AllocationSize)
Definition: fileinfo.c:1156
struct _FFS_FCB * PFFS_FCB
__drv_mustHoldCriticalRegion VOID FFSFreeMcbTree(PFFS_MCB McbTree)
Definition: memory.c:1373
BOOLEAN NTAPI FFSFastIoLock(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:708
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN CheckForReadOperation
Definition: fatprocs.h:2650
VOID FFSDbgPrintCall(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:50
PDEVICE_OBJECT DeviceObject
Definition: ffsdrv.h:371
struct _FFS_BSD_PARTITION FFS_BSD_PARTITION
struct ufs2_dinode * PFFSv2_INODE
Definition: ffsdrv.h:263
CHAR InputBuffer[80]
Definition: conmgr.c:33
__drv_mustHoldCriticalRegion NTSTATUS FFSFlushVolume(IN PFFS_VCB Vcb, BOOLEAN bShutDown)
Definition: flush.c:107
BOOLEAN FFSCheckSetBlock(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, ULONG Block)
Definition: memory.c:1412
__drv_mustHoldCriticalRegion NTSTATUS FFSPnp(IN PFFS_IRP_CONTEXT IrpContext)
__drv_mustHoldCriticalRegion NTSTATUS FFSQueryInformation(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fileinfo.c:37
FILE_LOCK FileLockAnchor
Definition: ffsdrv.h:587
__drv_mustHoldCriticalRegion BOOLEAN FFSAddMcbEntry(IN PFFS_VCB Vcb, IN LONGLONG Lba, IN LONGLONG Length)
Definition: ffs.c:2673
__drv_mustHoldCriticalRegion NTSTATUS FFSDeviceControlNormal(IN PFFS_IRP_CONTEXT IrpContext)
Definition: devctl.c:61
BOOLEAN FFSSaveGroup(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb)
NTSTATUS FFSFlushFile(IN PFFS_FCB Fcb)
Definition: flush.c:133
__drv_mustHoldCriticalRegion BOOLEAN NTAPI FFSFastIoQueryNetworkOpenInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_NETWORK_OPEN_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:557
ULONG FFSInodeTime(IN LARGE_INTEGER SysTime)
Definition: misc.c:66
Definition: fs.h:78
BOOLEAN ExceptionInProgress
Definition: ffsdrv.h:756
__drv_mustHoldCriticalRegion VOID FFSMediaEjectControl(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN BOOLEAN bPrevent)
Definition: block.c:577
__drv_mustHoldCriticalRegion VOID NTAPI FFSReleaseFromLazyWrite(IN PVOID Context)
Definition: cmcb.c:82
__GNU_EXTENSION typedef __int64 * PLONGLONG
Definition: ntbasedef.h:389
__drv_mustHoldCriticalRegion NTSTATUS FFSCreate(IN PFFS_IRP_CONTEXT IrpContext)
Definition: create.c:1835
SECTION_OBJECT_POINTERS SectionObject
Definition: ffsdrv.h:420
PNOTIFY_SYNC NotifySync
Definition: ffsdrv.h:483
NTSTATUS FFSUnicodeToOEM(IN OUT POEM_STRING Oem, IN PUNICODE_STRING Unicode)
Definition: misc.c:106
USHORT McbAllocated
Definition: ffsdrv.h:384
VOID FFSRepinBcb(IN PFFS_IRP_CONTEXT IrpContext, IN PBCB Bcb)
Definition: memory.c:221
NTSTATUS FFSReadDisk(IN PFFS_VCB Vcb, IN ULONGLONG Offset, IN ULONG Size, IN PVOID Buffer, IN BOOLEAN bVerify)
Definition: block.c:448
ERESOURCE CountResource
Definition: ffsdrv.h:355
BOOLEAN IsTopLevel
Definition: ffsdrv.h:750
PFFS_FCB FFSSearchFcbList(IN PFFS_VCB Vcb, IN ULONG inode)
VOID NTAPI FFSNoOpRelease(IN PVOID Fcb)
Definition: cmcb.c:202
LIST_ENTRY FcbList
Definition: ffsdrv.h:477
Definition: ffsdrv.h:285
ULONGLONG FFSv2GetBlock(IN PFFS_VCB Vcb, IN ULONGLONG dwContent, IN ULONG Index, IN int layer)
ULONG dwData[FFS_BLOCK_TYPES]
Definition: ffsdrv.h:517
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
__drv_mustHoldCriticalRegion BOOLEAN NTAPI FFSAcquireForReadAhead(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:121
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
NTSTATUS FFSLoadDiskLabel(PDEVICE_OBJECT DeviceObject, IN PFFS_VCB Vcb)
Definition: fsctl.c:141
NPAGED_LOOKASIDE_LIST FFSCcbLookasideList
Definition: ffsdrv.h:380
LIST_ENTRY NotifyList
Definition: ffsdrv.h:480
PDEVICE_OBJECT TargetDeviceObject
Definition: ffsdrv.h:489
long LONG
Definition: pedump.c:60
__drv_mustHoldCriticalRegion BOOLEAN FFSv1SaveInode(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN ULONG Inode, IN PFFSv1_INODE dinode1)
Definition: ffs.c:407
__drv_mustHoldCriticalRegion NTSTATUS FFSFileSystemControl(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fsctl.c:1645
NTSTATUS FFSv1WriteInode(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFSv1_INODE dinode1, IN ULONGLONG offset, IN PVOID Buffer, IN ULONG size, IN BOOLEAN bWriteToDisk, OUT PULONG dwRet)
Definition: write.c:798
struct _FFS_IRP_CONTEXT * PFFS_IRP_CONTEXT
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
struct _FFS_REPINNED_BCBS FFS_REPINNED_BCBS
FFS_GLOBAL FFSGlobal
Definition: ffsdrv.h:412
struct fs * PFFS_SUPER_BLOCK
Definition: ffsdrv.h:258
BOOLEAN FFSNewBlock(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, ULONG GroupHint, ULONG BlockHint, PULONG dwRet)
Definition: ffs.c:1094
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN FailImmediately
Definition: fatprocs.h:2697
ULONG FFSDataBlocks(PFFS_VCB Vcb, ULONG TotalBlocks)
Definition: ffs.c:2930
struct _FFS_CCB FFS_CCB
PVOID FFSGetUserBuffer(IN PIRP Irp)
Definition: block.c:115
__drv_mustHoldCriticalRegion NTSTATUS FFSShutDown(IN PFFS_IRP_CONTEXT IrpContext)
Definition: shutdown.c:31
__drv_mustHoldCriticalRegion NTSTATUS FFSDeviceControl(IN PFFS_IRP_CONTEXT IrpContext)
Definition: devctl.c:263
Definition: ffsdrv.h:282
FFS_IDENTIFIER Identifier
Definition: ffsdrv.h:578
__drv_mustHoldCriticalRegion NTSTATUS FFSUserFsRequest(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fsctl.c:767
VOID FFSSyncUninitializeCacheMap(IN PFILE_OBJECT FileObject)
Definition: memory.c:1955
PBCB Bcb[FFS_REPINNED_BCBS_ARRAY_SIZE]
Definition: ffsdrv.h:327
unsigned char BOOLEAN
LARGE_INTEGER FFSSysTime(IN ULONG i_time)
Definition: misc.c:53
NTSTATUS ExceptionCode
Definition: ffsdrv.h:759
__drv_mustHoldCriticalRegion NTSTATUS FFSLockControl(IN PFFS_IRP_CONTEXT IrpContext)
Definition: lock.c:30
BOOLEAN NTAPI FFSFastIoCheckIfPossible(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:41
ULONG ReferenceCount
Definition: ffsdrv.h:593
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
BOOLEAN FFSTruncateInode(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFS_FCB Fcb)
Definition: ffs.c:2584
__drv_mustHoldCriticalRegion NTSTATUS FFSPnpQueryRemove(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb)
VOID __cdecl FFSPrintf(LONG DebugPrintLevel, PCHAR DebugMessage,...)
Definition: bufpool.h:45
struct _FFS_VCB * PFFS_VCB
BOOLEAN NTAPI FFSFastIoUnlockSingle(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:835
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
FFS_IDENTIFIER_TYPE Type
Definition: ffsdrv.h:294
__drv_mustHoldCriticalRegion NTSTATUS FFSVerifyVolume(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fsctl.c:1070
__drv_mustHoldCriticalRegion BOOLEAN FFSExpandBlock(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, PFFS_FCB Fcb, ULONG dwContent, ULONG Index, ULONG layer, BOOLEAN bNew, ULONG *dwRet)
Definition: ffs.c:1406
#define IRP_MJ_QUERY_VOLUME_INFORMATION
Definition: rdpdr.c:50
BOOLEAN NTAPI FFSFastIoRead(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)
ULONG Size
Definition: ffsdrv.h:295
BOOLEAN FFSv1LoadInode(IN PFFS_VCB Vcb, IN ULONG inode, IN PFFSv1_INODE dinode1)
Definition: ffs.c:302
__drv_mustHoldCriticalRegion NTSTATUS FFSFlushFiles(IN PFFS_VCB Vcb, BOOLEAN bShutDown)
Definition: flush.c:54
#define IRP_MJ_DIRECTORY_CONTROL
Definition: rdpdr.c:51
__drv_mustHoldCriticalRegion BOOLEAN FFSSaveBlock(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN ULONG dwBlk, IN PVOID Buf)
Definition: ffs.c:525
__drv_mustHoldCriticalRegion NTSTATUS FFSInitializeVcb(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFS_SUPER_BLOCK FFSSb, IN PDEVICE_OBJECT TargetDevice, IN PDEVICE_OBJECT VolumeDevice, IN PVPB Vpb)
Definition: memory.c:1551
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
FSRTL_COMMON_FCB_HEADER Header
Definition: ffsdrv.h:571
struct _FFS_FCBVCB * PFFS_FCBVCB
__drv_mustHoldCriticalRegion BOOLEAN NTAPI FFSAcquireForLazyWrite(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:35
PFFS_VCB Vcb
Definition: ffsdrv.h:611
__drv_mustHoldCriticalRegion NTSTATUS FFSSetRenameInfo(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, PFFS_FCB Fcb)
Definition: fileinfo.c:1278
static BOOL bVerify
Definition: verify.c:27
ULONG Flags
Definition: ffsdrv.h:521
__drv_mustHoldCriticalRegion PFFS_IRP_CONTEXT FFSAllocateIrpContext(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: memory.c:52
NTSTATUS FFSSetDispositionInfo(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, PFFS_FCB Fcb, BOOLEAN bDelete)
Definition: fileinfo.c:1210
struct _FFS_FCBVCB FFS_FCBVCB
#define FFS_BLOCK_TYPES
Definition: ffsdrv.h:67
ULONG PartitionNumber
Definition: ffsdrv.h:397
BOOLEAN FFSTruncateFile(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, PFFS_FCB Fcb, PLARGE_INTEGER AllocationSize)
Definition: fileinfo.c:1189
PFFS_MCB Next
Definition: ffsdrv.h:652
SECTION_OBJECT_POINTERS SectionObject
Definition: ffsdrv.h:441
GLenum GLuint GLint GLint layer
Definition: glext.h:7007
BOOLEAN FFSDeleteMcbNode(PFFS_VCB Vcb, PFFS_MCB McbTree, PFFS_MCB FFSMcb)
Definition: memory.c:1321
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG LockKey
Definition: fatprocs.h:2650
NTSTATUS FFSNewInode(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, ULONG GroupHint, ULONG Type, PULONG Inode)
Definition: ffs.c:1645
int64_t LONGLONG
Definition: typedefs.h:66
PARTITION_INFORMATION PartitionInformation
Definition: ffsdrv.h:496
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
Definition: directory.c:44
ERESOURCE LAResource
Definition: ffsdrv.h:358
NTSTATUS FFSExceptionFilter(IN PFFS_IRP_CONTEXT IrpContext, IN PEXCEPTION_POINTERS ExceptionPointer)
Definition: except.c:31
NTSTATUS FFSReadWriteBlocks(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFS_BDL FFSBDL, IN ULONG Length, IN ULONG Count, IN BOOLEAN bVerify)
Definition: block.c:207
NTSTATUS FFSv2LookupFileName(IN PFFS_VCB Vcb, IN PUNICODE_STRING FullFileName, IN PFFS_MCB ParentMcb, OUT PFFS_MCB *FFSMcb, IN OUT PFFSv2_INODE dinode2)
Definition: create.c:237
ULONG BlkHint
Definition: ffsdrv.h:607
static LPSTR pName
Definition: security.c:75
UNICODE_STRING LongName
Definition: ffsdrv.h:617
GLsizeiptr size
Definition: glext.h:5919
LIST_ENTRY Link
Definition: ffsdrv.h:672
__drv_mustHoldCriticalRegion NTSTATUS FFSAllowExtendedDasdIo(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fsctl.c:729
BOOLEAN FFSExpandInode(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, PFFS_FCB Fcb, ULONG *dwRet)
Definition: ffs.c:1543
VOID FFSRemoveVcb(PFFS_VCB Vcb)
Definition: memory.c:1542
ERESOURCE MainResource
Definition: ffsdrv.h:573
NPAGED_LOOKASIDE_LIST FFSFcbLookasideList
Definition: ffsdrv.h:379
BOOLEAN FFSFreeBlock(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, ULONG Block)
Definition: ffs.c:1296
PFFS_MCB FFSSearchMcb(PFFS_VCB Vcb, PFFS_MCB Parent, PUNICODE_STRING FileName)
Definition: memory.c:1235
_FFS_IDENTIFIER_TYPE
Definition: ffsdrv.h:278
ULONGLONG FSOffset[MAXPARTITIONS]
Definition: ffsdrv.h:536
FSRTL_COMMON_FCB_HEADER CommonFCBHeader
Definition: ffsdrv.h:419
UNICODE_STRING ShortName
Definition: ffsdrv.h:660
struct _FFS_MCB * PFFS_MCB
Definition: ffsdrv.h:301
uint64_t ULONGLONG
Definition: typedefs.h:65
ULONG NonCachedOpenCount
Definition: ffsdrv.h:597
ERESOURCE PagingIoResource
Definition: ffsdrv.h:443
#define MAXPARTITIONS
Definition: disklabel.h:65
#define IRP_MJ_FILE_SYSTEM_CONTROL
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG Action
Definition: fsrtlfuncs.h:738
__drv_mustHoldCriticalRegion VOID FFSFreeFcb(IN PFFS_FCB Fcb)
Definition: memory.c:715
#define Vcb
Definition: cdprocs.h:1425
LONGLONG Lba
Definition: ffsdrv.h:799
Definition: xml2sdb.h:79
ERESOURCE PagingIoResource
Definition: ffsdrv.h:574
static const UCHAR Index[8]
Definition: usbohci.c:18
ULONG ChangeCount
Definition: ffsdrv.h:468
__drv_mustHoldCriticalRegion NTSTATUS FFSIsVolumeMounted(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fsctl.c:1218
ULONG FFSv1GetBlock(IN PFFS_VCB Vcb, IN ULONG dwContent, IN ULONG Index, IN int layer)
VOID FFSSetVpbFlag(IN PVPB Vpb, IN USHORT Flag)
Definition: fsctl.c:54
ULONG FFSv1BlockMap(IN PFFS_VCB Vcb, IN PFFSv1_INODE dinode1, IN ULONG Index)
Definition: ffs.c:701
NTSTATUS NTAPI FFSBuildRequest(PDEVICE_OBJECT DeviceObject, PIRP Irp)
Definition: dispatch.c:181
LIST_ENTRY Next
Definition: ext2fs.h:1105
SHARE_ACCESS ShareAccess
Definition: ffsdrv.h:584
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
__drv_mustHoldCriticalRegion NTSTATUS FFSPrepareToUnload(IN PFFS_IRP_CONTEXT IrpContext)
struct _FFS_ALLOC_HEADER * PFFS_ALLOC_HEADER
* PFILE_OBJECT
Definition: iotypes.h:1955
__drv_mustHoldCriticalRegion NTSTATUS FFSSetInformation(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fileinfo.c:551
_In_ PFCB ParentFcb
Definition: cdprocs.h:741
FFS_IDENTIFIER Identifier
Definition: ffsdrv.h:694
__drv_mustHoldCriticalRegion VOID FFSFreeVcb(IN PFFS_VCB Vcb)
Definition: memory.c:1886
#define __drv_dispatchType(x)
Definition: driverspecs.h:249
ULONG Flags
Definition: ffsdrv.h:646
BOOLEAN NTAPI FFSFastIoUnlockAllByKey(IN PFILE_OBJECT FileObject, IN PEPROCESS Process, IN ULONG Key, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1042
struct disklabel * PDISKLABEL
Definition: ffsdrv.h:260
__drv_mustHoldCriticalRegion NTSTATUS FFSCompleteIrpContext(IN PFFS_IRP_CONTEXT IrpContext, IN NTSTATUS Status)
Definition: read.c:53
FFS_IDENTIFIER Identifier
Definition: ffsdrv.h:426
unsigned char UCHAR
Definition: xmlstorage.h:181
PFILE_OBJECT StreamObj
Definition: ffsdrv.h:524
BOOLEAN FFSFreeInode(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, ULONG Inode, ULONG Type)
Definition: ffs.c:1857
__drv_mustHoldCriticalRegion NTSTATUS FFSClose(IN PFFS_IRP_CONTEXT IrpContext)
Definition: close.c:32
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
ULONG FFSGetProcessNameOffset(VOID)
BOOLEAN FFSCopyRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus)
Definition: read.c:88
PFFS_SUPER_BLOCK ffs_super_block
Definition: ffsdrv.h:499
LIST_ENTRY VcbList
Definition: ffsdrv.h:374
ULONG FileAttr
Definition: ffsdrv.h:669
ERESOURCE PagingIoResource
Definition: ffsdrv.h:422
ULONG OpenFileHandleCount
Definition: ffsdrv.h:456
ULONG FFSv1BuildBDL(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFSv1_INODE dinode1, IN ULONGLONG Offset, IN ULONG Size, OUT PFFS_BDL *ffs_bdl)
Definition: ffs.c:817
PFFS_FCB Fcb
Definition: ffsdrv.h:792
Definition: ffsdrv.h:284
Definition: ffsdrv.h:280
__drv_mustHoldCriticalRegion NTSTATUS FFSRead(IN PFFS_IRP_CONTEXT IrpContext)
Definition: read.c:1068
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
Definition: cdprocs.h:593
Definition: typedefs.h:117
__drv_mustHoldCriticalRegion VOID FFSRemoveMcbEntry(IN PFFS_VCB Vcb, IN LONGLONG Lba, IN LONGLONG Length)
Definition: ffs.c:2790
LIST_ENTRY Next
Definition: ffsdrv.h:581
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
ULONG FSVersion
Definition: ffsdrv.h:502
VOID __cdecl FFSNIPrintf(LONG DebugPrintLevel, PCHAR DebugMessage,...)
FAST_IO_DISPATCH FastIoDispatch
Definition: ffsdrv.h:361
DRIVER_DISPATCH(nfs41_FsdDispatch)
__drv_mustHoldCriticalRegion BOOLEAN NTAPI FFSFastIoQueryBasicInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_BASIC_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:252
DISK_GEOMETRY DiskGeometry
Definition: ffsdrv.h:495
VOID FFSUnpinRepinnedBcbs(IN PFFS_IRP_CONTEXT IrpContext)
Definition: memory.c:276
VOID NTAPI FFSDeQueueRequest(IN PVOID Context)
Definition: dispatch.c:62
PFFSv1_INODE dinode1
Definition: ffsdrv.h:603
ULONG Flags
Definition: ffsdrv.h:697
Status
Definition: gdiplustypes.h:24
ULONG Length
Definition: ffsdrv.h:801
struct _FFS_CCB * PFFS_CCB
IN PFCB IN PFILE_OBJECT FileObject IN ULONG AllocationSize
Definition: fatprocs.h:310
BOOLEAN NTAPI FFSFastIoUnlockAll(IN PFILE_OBJECT FileObject, IN PEPROCESS Process, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:945
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
NTSTATUS FFSDiskShutDown(PFFS_VCB Vcb)
Definition: block.c:648
struct _FCB_LIST_ENTRY FCB_LIST_ENTRY
SECTION_OBJECT_POINTERS SectionObject
Definition: ffsdrv.h:572
ERESOURCE Resource
Definition: ffsdrv.h:352
NTSTATUS FFSv1LookupFileName(IN PFFS_VCB Vcb, IN PUNICODE_STRING FullFileName, IN PFFS_MCB ParentMcb, OUT PFFS_MCB *FFSMcb, IN OUT PFFSv1_INODE dinode1)
Definition: create.c:38
DRIVER_INITIALIZE DriverEntry
Definition: condrv.c:21
GLuint in
Definition: glext.h:9616
__drv_mustHoldCriticalRegion NTSTATUS FFSAddEntry(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFS_FCB Dcb, IN ULONG FileType, IN ULONG Inode, IN PUNICODE_STRING FileName)
Definition: ffs.c:1965
struct LOOKASIDE_ALIGN _PAGED_LOOKASIDE_LIST PAGED_LOOKASIDE_LIST
enum _LOCK_OPERATION LOCK_OPERATION
__drv_mustHoldCriticalRegion NTSTATUS FFSUnlockVolume(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fsctl.c:541
__drv_mustHoldCriticalRegion NTSTATUS FFSCreateInode(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb, PFFS_FCB ParentFcb, ULONG Type, ULONG FileAttr, PUNICODE_STRING FileName)
Definition: create.c:1923
unsigned short USHORT
Definition: pedump.c:61
struct _FFS_REPINNED_BCBS * Next
Definition: ffsdrv.h:318
FFS_IDENTIFIER Identifier
Definition: ffsdrv.h:722
PDEVICE_OBJECT DeviceObject
Definition: ffsdrv.h:486
ULONG Inode
Definition: ffsdrv.h:663
PFFS_FCB FFSFcb
Definition: ffsdrv.h:657
__drv_mustHoldCriticalRegion NTSTATUS FFSPnpCancelRemove(PFFS_IRP_CONTEXT IrpContext, PFFS_VCB Vcb)
WORK_QUEUE_ITEM WorkQueueItem
Definition: ffsdrv.h:753
PFFS_MCB FFSSearchMcbTree(PFFS_VCB Vcb, PFFS_MCB FFSMcb, ULONG Inode)
Definition: memory.c:1195
struct _FCB_LIST_ENTRY * PFCB_LIST_ENTRY
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
IN PVCB IN ULONG IN OUT PULONG IN BOOLEAN OUT PLARGE_MCB Mcb
Definition: fatprocs.h:334
PFFS_FCB Fcb
Definition: ffsdrv.h:743
BOOLEAN FFSZeroHoles(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFILE_OBJECT FileObject, IN LONGLONG Offset, IN LONGLONG Count)
Definition: write.c:203
VOID FFSInsertVcb(PFFS_VCB Vcb)
Definition: memory.c:1534
ULONG ProcessNameOffset
unsigned int * PULONG
Definition: retypes.h:1
BOOLEAN FFSv2GetInodeLba(IN PFFS_VCB Vcb, IN ULONG inode, OUT PLONGLONG offset)
Definition: ffs.c:273
ULONG OpenHandleCount
Definition: ffsdrv.h:590
PVOID PBCB
Definition: ffsdrv.h:304
NTSTATUS FFSReadSync(IN PFFS_VCB Vcb, IN ULONGLONG Offset, IN ULONG Length, OUT PVOID Buffer, IN BOOLEAN bVerify)
Definition: block.c:389
ULONG FFSProcessDirEntry(IN PFFS_VCB Vcb, IN FILE_INFORMATION_CLASS FileInformationClass, IN ULONG in, IN PVOID Buffer, IN ULONG UsedLength, IN ULONG Length, IN ULONG FileIndex, IN PUNICODE_STRING pName, IN BOOLEAN Single)
Definition: dirctl.c:66
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN BOOLEAN ExclusiveLock
Definition: fatprocs.h:2697
enum _FFS_IDENTIFIER_TYPE FFS_IDENTIFIER_TYPE
FSRTL_COMMON_FCB_HEADER Header
Definition: ffsdrv.h:440
__drv_mustHoldCriticalRegion BOOLEAN FFSSaveSuper(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb)
Definition: ffs.c:112
#define IRP_MJ_LOCK_CONTROL
Definition: rdpdr.c:53
PFFS_MCB FFSMcb
Definition: ffsdrv.h:614
FFS_REPINNED_BCBS Repinned
Definition: ffsdrv.h:762
VOID NTAPI FFSDeQueueCloseRequest(IN PVOID Context)
Definition: close.c:312
#define IRP_MJ_READ
Definition: rdpdr.c:46
BOOLEAN FFSv1LoadBlock(IN PFFS_VCB Vcb, IN ULONG dwBlk, IN PVOID Buffer)
Definition: ffs.c:459
__drv_mustHoldCriticalRegion VOID NTAPI FFSReleaseFromReadAhead(IN PVOID Context)
Definition: cmcb.c:153
struct _FFS_GLOBAL * PFFS_GLOBAL
VOID FFSNotifyReportChange(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFS_FCB Fcb, IN ULONG Filter, IN ULONG Action)
Definition: dirctl.c:1201
VOID NTAPI DriverUnload(IN PDRIVER_OBJECT DriverObject)
Definition: green.c:15
struct FFS_EXT * PFFS_EXT
PDEVICE_OBJECT DeviceObject
Definition: ffsdrv.h:735
ULONG FFSLog2(ULONG Value)
Definition: misc.c:33
ERESOURCE MainResource
Definition: ffsdrv.h:442
BOOLEAN FFSIsDirectoryEmpty(PFFS_VCB Vcb, PFFS_FCB Dcb)
Definition: dirctl.c:1275
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
#define IRP_MJ_CLEANUP
NTSTATUS FFSOEMToUnicode(IN OUT PUNICODE_STRING Unicode, IN POEM_STRING Oem)
Definition: misc.c:80
PFFS_CCB Ccb
Definition: ffsdrv.h:744
__drv_mustHoldCriticalRegion PFFS_FCB FFSv1AllocateFcb(IN PFFS_VCB Vcb, IN PFFS_MCB FFSMcb, IN PFFSv1_INODE dinode1)
Definition: memory.c:383
Definition: iotypes.h:166
ULONG OpenHandleCount
Definition: ffsdrv.h:462
#define OUT
Definition: typedefs.h:39
VOID FFSAddMcbNode(PFFS_VCB Vcb, PFFS_MCB Parent, PFFS_MCB Child)
Definition: memory.c:1278
__drv_mustHoldCriticalRegion NTSTATUS FFSCleanup(IN PFFS_IRP_CONTEXT IrpContext)
Definition: cleanup.c:30
ULONG ERESOURCE
Definition: env_spec_w32.h:594
#define IRP_MJ_SET_INFORMATION
Definition: rdpdr.c:49
__drv_mustHoldCriticalRegion NTSTATUS FFSQueryDirectory(IN PFFS_IRP_CONTEXT IrpContext)
Definition: dirctl.c:323
unsigned int ULONG
Definition: retypes.h:1
ULONG Flags
Definition: ffsdrv.h:600
VOID FFSRefreshMcb(PFFS_VCB Vcb, PFFS_MCB Mcb)
Definition: memory.c:1264
struct _FFS_IDENTIFIER * PFFS_IDENTIFIER
BOOLEAN FFSv2LoadBlock(IN PFFS_VCB Vcb, IN ULONGLONG dwBlk, IN PVOID Buffer)
Definition: ffs.c:490
_In_ FLT_SET_CONTEXT_OPERATION Operation
Definition: fltkernel.h:1468
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:722
_In_ PUNICODE_STRING RegistryPath
Definition: wmip.h:27
ULONG CurrentByteOffset
Definition: ffsdrv.h:700
struct _FFS_BDL FFS_BDL
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
PFFS_MCB McbTree
Definition: ffsdrv.h:533
ULONGLONG FFSv2BlockMap(IN PFFS_VCB Vcb, IN PFFSv2_INODE dinode2, IN ULONG Index)
Definition: ffs.c:759
#define IRP_MJ_QUERY_INFORMATION
Definition: rdpdr.c:48
struct _FFS_ALLOC_HEADER FFS_ALLOC_HEADER
ERESOURCE MainResource
Definition: ffsdrv.h:421
NTSTATUS FFSv2ReadInode(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFSv2_INODE dinode2, IN ULONGLONG offset, IN PVOID Buffer, IN ULONG size, OUT PULONG dwRet)
Definition: read.c:585
struct _FFS_IDENTIFIER FFS_IDENTIFIER
LIST_ENTRY McbList
Definition: ffsdrv.h:534
BOOLEAN FFSv1GetInodeLba(IN PFFS_VCB Vcb, IN ULONG inode, OUT PLONGLONG offset)
Definition: ffs.c:244
#define FFS_REPINNED_BCBS_ARRAY_SIZE
Definition: ffsdrv.h:310
PFFS_MCB FFSAllocateMcb(PFFS_VCB Vcb, PUNICODE_STRING FileName, ULONG FileAttr)
Definition: memory.c:889
UNICODE_STRING DirectorySearchPattern
Definition: ffsdrv.h:701
__drv_mustHoldCriticalRegion NTSTATUS FFSDismountVolume(IN PFFS_IRP_CONTEXT IrpContext)
Definition: fsctl.c:1234
BOOLEAN FFSQueryParameters(IN PUNICODE_STRING RegistryPath)
Definition: init.c:78
NTSTATUS FFSv2ScanDir(IN PFFS_VCB Vcb, IN PFFS_MCB ParentMcb, IN PUNICODE_STRING FileName, IN OUT PULONG Index, IN PFFSv2_INODE dinode2, IN PFFS_DIR_ENTRY ffs_dir)
ULONG FFSGetInfoLength(IN FILE_INFORMATION_CLASS FileInformationClass)
Definition: dirctl.c:34
ULONG ffs_groups
Definition: ffsdrv.h:505
_In_ PFCB Fcb
Definition: cdprocs.h:151
__drv_mustHoldCriticalRegion NTSTATUS FFSPurgeVolume(IN PFFS_VCB Vcb, IN BOOLEAN FlushBeforePurge)
Definition: fsctl.c:1445
struct direct * PFFS_DIR_ENTRY
Definition: ffsdrv.h:265
LARGE_MCB DirtyMcbs
Definition: ffsdrv.h:530
PDEVICE_OBJECT RealDevice
Definition: ffsdrv.h:738
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB * Dcb
Definition: create.c:4157
__drv_mustHoldCriticalRegion VOID FFSFreeCcb(IN PFFS_CCB Ccb)
Definition: memory.c:853
PFFS_MCB Child
Definition: ffsdrv.h:651
PVPB Vpb
Definition: ffsdrv.h:471
PDRIVER_OBJECT DriverObject
Definition: ffsdrv.h:368
FFS_IDENTIFIER Identifier
Definition: ffsdrv.h:349
NTSTATUS DeviceControl(IN PDEVICE_OBJECT pDeviceObject, IN PIRP pIrp)
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
Definition: fatprocs.h:1664
BOOLEAN IsSynchronous
Definition: ffsdrv.h:747
struct _FFS_VCB FFS_VCB
BOOLEAN FFSGetFullFileName(PFFS_MCB Mcb, PUNICODE_STRING FileName)
Definition: memory.c:1134
__drv_mustHoldCriticalRegion BOOLEAN NTAPI FFSFastIoQueryStandardInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_STANDARD_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:392
PIRP Irp
Definition: ffsdrv.h:802
PAGED_LOOKASIDE_LIST FFSMcbLookasideList
Definition: ffsdrv.h:381
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
Definition: ffsdrv.h:364
ULONG FFSv2BuildBDL(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb, IN PFFSv2_INODE dinode2, IN ULONGLONG Offset, IN ULONG Size, OUT PFFS_BDL *ffs_bdl)
Definition: ffs.c:954
__drv_mustHoldCriticalRegion NTSTATUS FFSDirectoryControl(IN PFFS_IRP_CONTEXT IrpContext)
Definition: dirctl.c:1243
UCHAR MinorFunction
Definition: ffsdrv.h:732
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
ULONG RootPartition
Definition: ffsdrv.h:538
BOOLEAN NTAPI FFSNoOpAcquire(IN PVOID Fcb, IN BOOLEAN Wait)
Definition: cmcb.c:177
IN BOOLEAN Wait
Definition: fatprocs.h:1529
__drv_mustHoldCriticalRegion NTSTATUS FFSCreateVolume(IN PFFS_IRP_CONTEXT IrpContext, IN PFFS_VCB Vcb)
PFFS_MCB Parent
Definition: ffsdrv.h:650
__drv_mustHoldCriticalRegion NTSTATUS FFSFlush(IN PFFS_IRP_CONTEXT IrpContext)
Definition: flush.c:169