ReactOS  0.4.14-dev-98-gb0d4763
rfsd.h
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: GNU GENERAL PUBLIC LICENSE VERSION 2
3  * PROJECT: ReiserFs file system driver for Windows NT/2000/XP/Vista.
4  * FILE: rfsd.h
5  * PURPOSE: Header file: rfsd structures.
6  * PROGRAMMER: Mark Piper, Matt Wu, Bo BrantÚn.
7  * HOMEPAGE:
8  * UPDATE HISTORY:
9  */
10 
11 #ifndef _RFSD_HEADER_
12 #define _RFSD_HEADER_
13 
14 #ifdef _MSC_VER
15 #ifndef _PREFAST_
16 #pragma warning(disable:4068)
17 #define __drv_mustHoldCriticalRegion
18 #endif // !_PREFAST_
19 #endif
20 
21 /* INCLUDES *************************************************************/
22 
23 #include <linux/module.h>
24 //#include <linux/reiserfs_fs.h> // Full ReiserFS header
25 #include "reiserfs.h" // Simplified ReiserFS header
26 #ifdef __REACTOS__
27 #include <ndk/rtlfuncs.h>
28 #include <pseh/pseh2.h>
30 #endif
31 
33 typedef struct stat_data RFSD_INODE, *PRFSD_INODE;
34 
35 #define RFSD_CALLBACK(name) NTSTATUS(* name )(ULONG BlockNumber, PVOID pContext)
36 
37 
38 typedef struct block_head RFSD_BLOCK_HEAD, *PRFSD_BLOCK_HEAD; // [mark]
40 typedef struct item_head RFSD_ITEM_HEAD, *PRFSD_ITEM_HEAD; // [mark]
44 
45 #define RFSD_NAME_LEN 255
46 
47 #define SUPER_BLOCK_OFFSET REISERFS_DISK_OFFSET_IN_BYTES
48 #define SUPER_BLOCK_SIZE sizeof(RFSD_SUPER_BLOCK)
49 
50 #define RFSD_ROOT_PARENT_ID 1
51 #define RFSD_ROOT_OBJECT_ID 2
52 #define RFSD_IS_ROOT_KEY(x) (x.k_dir_id == RFSD_ROOT_PARENT_ID && x.k_objectid == RFSD_ROOT_OBJECT_ID)
53 #define RFSD_IS_PTR_TO_ROOT_KEY(x) (x->k_dir_id == RFSD_ROOT_PARENT_ID && x->k_objectid == RFSD_ROOT_OBJECT_ID)
54 
55 typedef short RFSD_KEY_COMPARISON;
57 
58 #define RFSD_KEY_VERSION_1 0
59 #define RFSD_KEY_VERSION_2 1
60 #define RFSD_KEY_VERSION_UNKNOWN 7
61 
62 // Results of a key comparison (as returned by CompareKeys)
63 #define RFSD_KEYS_MATCH 0
64 #define RFSD_KEY_SMALLER -1
65 #define RFSD_KEY_LARGER 1
66 
67 
68 #define RFSD_LEAF_BLOCK_LEVEL 1
69 
70 #include <ntdddisk.h>
71 
72 #pragma pack(1)
73 
74 /* DEBUG ****************************************************************/
75 #if DBG
76  #define DbgBreak() DbgPrint("rfsd: breakpoint requested.\n");DbgBreakPoint()
77 #else
78  #define DbgBreak() DbgPrint("rfsd: breakpoint ignored.\n")
79 #endif
80 
81 /* STRUCTS & CONSTS******************************************************/
82 
83 #define RFSD_VERSION "0.26"
84 
85 //
86 // Rfsd build options
87 //
88 
89 // To build read-only driver
90 
91 #define RFSD_READ_ONLY TRUE
92 
93 // To support driver dynamics unload
94 
95 #define RFSD_UNLOAD TRUE
96 
97 // The Pool Tag
98 
99 #define RFSD_POOL_TAG 'dsfR'
100 
101 //
102 // Constants
103 //
104 
105 #define RFSD_BLOCK_TYPES (0x04)
106 
107 #define MAXIMUM_RECORD_LENGTH (0x10000)
108 
109 #define SECTOR_BITS (Vcb->SectorBits)
110 #define SECTOR_SIZE (Vcb->DiskGeometry.BytesPerSector)
111 #define DEFAULT_SECTOR_SIZE (0x200)
112 
113 #define READ_AHEAD_GRANULARITY (0x10000)
114 
115 #define SUPER_BLOCK (Vcb->SuperBlock)
116 
117 #define BLOCK_SIZE (Vcb->BlockSize)
118 #define BLOCK_BITS (SUPER_BLOCK->s_log_block_size + 10)
119 
120 #define INODES_COUNT (Vcb->SuperBlock->s_inodes_count)
121 
122 #define INODES_PER_GROUP (SUPER_BLOCK->s_inodes_per_group)
123 #define BLOCKS_PER_GROUP (SUPER_BLOCK->s_blocks_per_group)
124 #define TOTAL_BLOCKS (SUPER_BLOCK->s_blocks_count)
125 
126 #define RFSD_FIRST_DATA_BLOCK (SUPER_BLOCK->s_first_data_block)
127 
128 
129 
130 #define CEILING_ALIGNED(A, B) (((A) + (B) - 1) & (~((B) - 1)))
131 
132 
133 // The __SLINE__ macro evaluates to a string with the line of the program from which it is called.
134 // (Note that this requires two levels of macro indirection...)
135 #define __STR2__(x) #x
136 #define __STR1__(x) __STR2__(x)
137 #define __SLINE__ __STR1__(__LINE__)
138 
139 
140 /* File System Releated *************************************************/
141 
142 #define DRIVER_NAME "Rfsd"
143 #define DEVICE_NAME L"\\Rfsd"
144 
145 // Registry
146 
147 #define PARAMETERS_KEY L"\\Parameters"
148 
149 #define WRITING_SUPPORT L"WritingSupport"
150 #define CHECKING_BITMAP L"CheckingBitmap"
151 #define EXT3_FORCEWRITING L"Ext3ForceWriting"
152 #define EXT3_CODEPAGE L"CodePage"
153 
154 // To support rfsd unload routine
155 #if RFSD_UNLOAD
156 
157 #define DOS_DEVICE_NAME L"\\DosDevices\\Rfsd"
158 
159 //
160 // Private IOCTL to make the driver ready to unload
161 //
162 #define IOCTL_PREPARE_TO_UNLOAD \
163 CTL_CODE(FILE_DEVICE_UNKNOWN, 2048, METHOD_NEITHER, FILE_WRITE_ACCESS)
164 
165 #endif // RFSD_UNLOAD
166 
167 #ifndef SetFlag
168 #define SetFlag(x,f) ((x) |= (f))
169 #endif
170 
171 #ifndef ClearFlag
172 #define ClearFlag(x,f) ((x) &= ~(f))
173 #endif
174 
175 #define IsFlagOn(a,b) ((BOOLEAN)(FlagOn(a,b) == b))
176 
177 #define RfsdRaiseStatus(IRPCONTEXT,STATUS) { \
178  (IRPCONTEXT)->ExceptionCode = (STATUS); \
179  ExRaiseStatus( (STATUS) ); \
180 }
181 
182 #define RfsdNormalizeAndRaiseStatus(IRPCONTEXT,STATUS) { \
183  /* (IRPCONTEXT)->ExceptionStatus = (STATUS); */ \
184  if ((STATUS) == STATUS_VERIFY_REQUIRED) { ExRaiseStatus((STATUS)); } \
185  ExRaiseStatus(FsRtlNormalizeNtstatus((STATUS),STATUS_UNEXPECTED_IO_ERROR)); \
186 }
187 
188 //
189 // Define IsEndofFile for read and write operations
190 //
191 
192 #define FILE_WRITE_TO_END_OF_FILE 0xffffffff
193 #define FILE_USE_FILE_POINTER_POSITION 0xfffffffe
194 
195 #define IsEndOfFile(Pos) ((Pos.LowPart == FILE_WRITE_TO_END_OF_FILE) && \
196  (Pos.HighPart == FILE_USE_FILE_POINTER_POSITION ))
197 
198 #define IsDirectory(Fcb) IsFlagOn(Fcb->RfsdMcb->FileAttr, FILE_ATTRIBUTE_DIRECTORY)
199 
200 //
201 // Bug Check Codes Definitions
202 //
203 
204 #define RFSD_FILE_SYSTEM (FILE_SYSTEM)
205 
206 #define RFSD_BUGCHK_BLOCK (0x00010000)
207 #define RFSD_BUGCHK_CLEANUP (0x00020000)
208 #define RFSD_BUGCHK_CLOSE (0x00030000)
209 #define RFSD_BUGCHK_CMCB (0x00040000)
210 #define RFSD_BUGCHK_CREATE (0x00050000)
211 #define RFSD_BUGCHK_DEBUG (0x00060000)
212 #define RFSD_BUGCHK_DEVCTL (0x00070000)
213 #define RFSD_BUGCHK_DIRCTL (0x00080000)
214 #define RFSD_BUGCHK_DISPATCH (0x00090000)
215 #define RFSD_BUGCHK_EXCEPT (0x000A0000)
216 #define RFSD_BUGCHK_RFSD (0x000B0000)
217 #define RFSD_BUGCHK_FASTIO (0x000C0000)
218 #define RFSD_BUGCHK_FILEINFO (0x000D0000)
219 #define RFSD_BUGCHK_FLUSH (0x000E0000)
220 #define RFSD_BUGCHK_FSCTL (0x000F0000)
221 #define RFSD_BUGCHK_INIT (0x00100000)
222 #define RFSD_BUGCHK_LOCK (0x0011000)
223 #define RFSD_BUGCHK_MEMORY (0x0012000)
224 #define RFSD_BUGCHK_MISC (0x0013000)
225 #define RFSD_BUGCHK_READ (0x00140000)
226 #define RFSD_BUGCHK_SHUTDOWN (0x00150000)
227 #define RFSD_BUGCHK_VOLINFO (0x00160000)
228 #define RFSD_BUGCHK_WRITE (0x00170000)
229 
230 #define RFSD_BUGCHK_LAST (0x00170000)
231 
232 #define RfsdBugCheck(A,B,C,D) { KeBugCheckEx(RFSD_FILE_SYSTEM, A | __LINE__, B, C, D ); }
233 
234 
235 /* Rfsd file system definions *******************************************/
236 
237 #define RFSD_MIN_BLOCK 1024
238 #define RFSD_MIN_FRAG 1024
239 
240 //
241 // Inode flags (Linux uses octad number, but why ? strange!!!)
242 //
243 
244 #define S_IFMT 0x0F000 /* 017 0000 */
245 #define S_IFSOCK 0x0C000 /* 014 0000 */
246 #define S_IFLNK 0x0A000 /* 012 0000 */
247 #define S_IFREG 0x08000 /* 010 0000 */
248 #define S_IFBLK 0x06000 /* 006 0000 */
249 #define S_IFDIR 0x04000 /* 004 0000 */
250 #define S_IFCHR 0x02000 /* 002 0000 */
251 #define S_IFIFO 0x01000 /* 001 0000 */
252 #define S_ISUID 0x00800 /* 000 4000 */
253 #define S_ISGID 0x00400 /* 000 2000 */
254 #define S_ISVTX 0x00200 /* 000 1000 */
255 
256 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
257 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
258 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
259 #define S_ISFIL(m) (((m) & S_IFMT) == S_IFFIL)
260 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
261 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
262 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
263 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
264 
265 #define S_IPERMISSION_MASK 0x1FF /* */
266 
267 #define S_IRWXU 0x1C0 /* 0 0700 */
268 #define S_IRUSR 0x100 /* 0 0400 */
269 #define S_IWUSR 0x080 /* 0 0200 */
270 #define S_IXUSR 0x040 /* 0 0100 */
271 
272 #define S_IRWXG 0x038 /* 0 0070 */
273 #define S_IRGRP 0x020 /* 0 0040 */
274 #define S_IWGRP 0x010 /* 0 0020 */
275 #define S_IXGRP 0x008 /* 0 0010 */
276 
277 #define S_IRWXO 0x007 /* 0 0007 */
278 #define S_IROTH 0x004 /* 0 0004 */
279 #define S_IWOTH 0x002 /* 0 0002 */
280 #define S_IXOTH 0x001 /* 0 0001 */
281 
282 #define S_IRWXUGO (S_IRWXU|S_IRWXG|S_IRWXO)
283 #define S_IALLUGO (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
284 #define S_IRUGO (S_IRUSR|S_IRGRP|S_IROTH)
285 #define S_IWUGO (S_IWUSR|S_IWGRP|S_IWOTH)
286 #define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
287 
288 #define S_ISREADABLE(m) (((m) & S_IPERMISSION_MASK) == (S_IRUSR | S_IRGRP | S_IROTH))
289 #define S_ISWRITABLE(m) (((m) & S_IPERMISSION_MASK) == (S_IWUSR | S_IWGRP | S_IWOTH))
290 
291 #define RfsdSetReadable(m) (m) = ((m) | (S_IRUSR | S_IRGRP | S_IROTH))
292 #define RfsdSetWritable(m) (m) = ((m) | (S_IWUSR | S_IWGRP | S_IWOTH))
293 
294 #define RfsdSetReadOnly(m) (m) = ((m) & (~(S_IWUSR | S_IWGRP | S_IWOTH)))
295 #define RfsdIsReadOnly(m) (!((m) & (S_IWUSR | S_IWGRP | S_IWOTH)))
296 
297 //
298 // Inode state bits
299 //
300 
301 #define I_DIRTY_SYNC 1 /* Not dirty enough for O_DATASYNC */
302 #define I_DIRTY_DATASYNC 2 /* Data-related inode changes pending */
303 #define I_DIRTY_PAGES 4 /* Data-related inode changes pending */
304 #define I_LOCK 8
305 #define I_FREEING 16
306 #define I_CLEAR 32
307 
308 #define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES)
309 
310 
311 //
312 // Rfsd Driver Definitions
313 //
314 
315 //
316 // RFSD_IDENTIFIER_TYPE
317 //
318 // Identifiers used to mark the structures
319 //
320 
321 typedef enum _RFSD_IDENTIFIER_TYPE {
322  RFSDFGD = ':DGF',
323  RFSDVCB = ':BCV',
324  RFSDFCB = ':BCF',
325  RFSDCCB = ':BCC',
326  RFSDICX = ':XCI',
327  RFSDMCB = ':BCM'
329 
330 //
331 // RFSD_IDENTIFIER
332 //
333 // Header used to mark the structures
334 //
335 typedef struct _RFSD_IDENTIFIER {
339 
340 
341 #define NodeType(Ptr) (*((RFSD_IDENTIFIER_TYPE *)(Ptr)))
342 
343 typedef struct _RFSD_MCB RFSD_MCB, *PRFSD_MCB;
344 
345 
346 typedef PVOID PBCB;
347 
348 //
349 // REPINNED_BCBS List
350 //
351 
352 #define RFSD_REPINNED_BCBS_ARRAY_SIZE (8)
353 
354 typedef struct _RFSD_REPINNED_BCBS {
355 
356  //
357  // A pointer to the next structure contains additional repinned bcbs
358  //
359 
361 
362  //
363  // A fixed size array of pinned bcbs. Whenever a new bcb is added to
364  // the repinned bcb structure it is added to this array. If the
365  // array is already full then another repinned bcb structure is allocated
366  // and pointed to with Next.
367  //
368 
370 
372 
373 
374 #define CODEPAGE_MAXLEN 0x20
375 
376 //
377 // RFSD_GLOBAL_DATA
378 //
379 // Data that is not specific to a mounted volume
380 //
381 
382 typedef struct _RFSD_GLOBAL {
383 
384  // Identifier for this structure
386 
387  // Syncronization primitive for this structure
389 
390  // Syncronization primitive for Counting
392 
393  // Syncronization primitive for LookAside Lists
395 
396  // Table of pointers to the fast I/O entry points
398 
399  // Table of pointers to the Cache Manager callbacks
402 
403  // Pointer to the driver object
405 
406  // Pointer to the main device object
408 
409  // List of mounted volumes
411 
412  // Look Aside table of IRP_CONTEXT, FCB, MCB, CCB
418 
419  // Mcb Count ...
421 
422 #if DBG
423  // Fcb Count
424  USHORT FcbAllocated;
425 
426  // IRP_MJ_CLOSE : FCB
427  USHORT IRPCloseCount;
428 #endif
429 
430  // Global flags for the driver
432 
433  // User specified codepage name
434  struct {
438  } CodePage;
439 
441 
442 #define PAGE_TABLE RfsdGlobal->CodePage.PageTable
443 
444 //
445 // Flags for RFSD_GLOBAL_DATA
446 //
447 #define RFSD_UNLOAD_PENDING 0x00000001
448 #define RFSD_SUPPORT_WRITING 0x00000002
449 #define EXT3_FORCE_WRITING 0x00000004
450 #define RFSD_CHECKING_BITMAP 0x00000008
451 
452 //
453 // Driver Extension define
454 //
455 typedef struct {
458 
459 
460 typedef struct _RFSD_FCBVCB {
461 
462  // FCB header required by NT
467  // end FCB header required by NT
468 
469  // Identifier for this structure
472 
473 //
474 // RFSD_VCB Volume Control Block
475 //
476 // Data that represents a mounted logical volume
477 // It is allocated as the device extension of the volume device object
478 //
479 typedef struct _RFSD_VCB {
480 
481  // FCB header required by NT
482  // The VCB is also used as an FCB for file objects
483  // that represents the volume itself
488  // end FCB header required by NT
489 
490  // Identifier for this structure
492 
494 
495  // Share Access for the file object
497 
498  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP
499  // for files on this volume.
501 
502  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLOSE
503  // for both files on this volume and open instances of the
504  // volume itself.
507 
508  //
509  // Disk change count
510  //
511 
513 
514  // Pointer to the VPB in the target device object
516 
517  // The FileObject of Volume used to lock the volume
519 
520  // List of FCBs for open files on this volume
522 
523  // List of IRPs pending on directory change notify requests
525 
526  // Pointer to syncronization primitive for this list
528 
529  // This volumes device object
531 
532  // The physical device object (the disk)
534 
535  // The physical device object (the disk)
537 
538  // Information about the physical device object
541 
543  PVOID GroupDesc; // (NOTE: unused in ReiserFS, but preserved in order to minimize changes to existing code)
544 // PVOID GroupDescBcb;
545 
546  // Number of Group Decsciptions
548 /*
549  // Bitmap Block per group
550  PRTL_BITMAP BlockBitMaps;
551  PRTL_BITMAP InodeBitMaps;
552 */
553  // Block / Cluster size
555 
556  // Sector size in bits (NOTE: unused in ReiserFS)
557  //ULONG SectorBits;
558 
561 
562  // Flags for the volume
564 
565  // Streaming File Object
567 
568  // Resource Lock for Mcb
570 
571  // Dirty Mcbs of modifications for volume stream
573 
574  // Entry of Mcb Tree (Root Node)
577 
578 } RFSD_VCB, *PRFSD_VCB;
579 
580 //
581 // Flags for RFSD_VCB
582 //
583 #define VCB_INITIALIZED 0x00000001
584 #define VCB_VOLUME_LOCKED 0x00000002
585 #define VCB_MOUNTED 0x00000004
586 #define VCB_DISMOUNT_PENDING 0x00000008
587 #define VCB_READ_ONLY 0x00000010
588 
589 #define VCB_WRITE_PROTECTED 0x10000000
590 #define VCB_FLOPPY_DISK 0x20000000
591 #define VCB_REMOVAL_PREVENTED 0x40000000
592 #define VCB_REMOVABLE_MEDIA 0x80000000
593 
594 
595 #define IsMounted(Vcb) (IsFlagOn(Vcb->Flags, VCB_MOUNTED))
596 
597 //
598 // RFSD_FCB File Control Block
599 //
600 // Data that represents an open file
601 // There is a single instance of the FCB for every open file
602 //
603 typedef struct _RFSD_FCB {
604 
605  // FCB header required by NT
610  // end FCB header required by NT
611 
612  // Identifier for this structure
614 
615  // List of FCBs for this volume
617 
618  // Share Access for the file object
620 
621  // List of byte-range locks for this file
623 
624  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP
626 
627  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLOSE
629 
630  // Incremented on IRP_MJ_CREATE, decremented on IRP_MJ_CLEANUP
631  // But only for Files with FO_NO_INTERMEDIATE_BUFFERING flag
633 
634  // Flags for the FCB
636 
637  // Pointer to the inode / stat data structure
639 
640  // Hint block for next allocation
642 
643  // Vcb
644 
646 
647  // Mcb Node ...
649 
650  // Full Path Name
652 
653 #if DBG
654  // The Ansi Filename for debugging
655  OEM_STRING AnsiFileName;
656 #endif
657 
658 
659 } RFSD_FCB, *PRFSD_FCB;
660 
661 
662 //
663 // Flags for RFSD_FCB
664 //
665 #define FCB_FROM_POOL 0x00000001
666 #define FCB_PAGE_FILE 0x00000002
667 #define FCB_DELETE_ON_CLOSE 0x00000004
668 #define FCB_DELETE_PENDING 0x00000008
669 #define FCB_FILE_DELETED 0x00000010
670 #define FCB_FILE_MODIFIED 0x00000020
671 
672 // Mcb Node
673 
674 struct _RFSD_MCB {
675 
676  // Identifier for this structure
678 
679  // Flags
681 
682  // Link List Info
683 
684  PRFSD_MCB Parent; // Parent
685  PRFSD_MCB Child; // Children
686  PRFSD_MCB Next; // Brothers
687 
688  // Mcb Node Info
689 
690  // -> Fcb
692 
693  // Short name
695 
696  // Inode number (ReiserFS uses 128-bit keys instead of inode numbers)
698 
699  // Dir entry offset in parent (relative to the start of the directory listing)
701 
702  // File attribute
704 
705  // List Link to Vcb->McbList
707 };
708 
709 //
710 // Flags for MCB
711 //
712 #define MCB_FROM_POOL 0x00000001
713 #define MCB_IN_TREE 0x00000002
714 #define MCB_IN_USE 0x00000004
715 
716 #define IsMcbUsed(Mcb) IsFlagOn(Mcb->Flags, MCB_IN_USE)
717 
718 //
719 // RFSD_CCB Context Control Block
720 //
721 // Data that represents one instance of an open file
722 // There is one instance of the CCB for every instance of an open file
723 //
724 typedef struct _RFSD_CCB {
725 
726  // Identifier for this structure
728 
729  // Flags
731 
732  // State that may need to be maintained
736 
737 } RFSD_CCB, *PRFSD_CCB;
738 
739 //
740 // Flags for CCB
741 //
742 
743 #define CCB_FROM_POOL 0x00000001
744 
745 #define CCB_ALLOW_EXTENDED_DASD_IO 0x80000000
746 
747 //
748 // RFSD_IRP_CONTEXT
749 //
750 // Used to pass information about a request between the drivers functions
751 //
752 typedef struct _RFSD_IRP_CONTEXT {
753 
754  // Identifier for this structure
756 
757  // Pointer to the IRP this request describes
759 
760  // Flags
762 
763  // The major and minor function code for the request
766 
767  // The device object
769 
770  // The real device object
772 
773  // The file object
775 
778 
779  // If the request is synchronous (we are allowed to block)
781 
782  // If the request is top level
784 
785  // Used if the request needs to be queued for later processing
787 
788  // If an exception is currently in progress
790 
791  // The exception code when an exception is in progress
793 
794  // Repinned BCBs List
796 
798 
799 
800 #define IRP_CONTEXT_FLAG_FROM_POOL (0x00000001)
801 #define IRP_CONTEXT_FLAG_WAIT (0x00000002)
802 #define IRP_CONTEXT_FLAG_WRITE_THROUGH (0x00000004)
803 #define IRP_CONTEXT_FLAG_FLOPPY (0x00000008)
804 #define IRP_CONTEXT_FLAG_RECURSIVE_CALL (0x00000010)
805 #define IRP_CONTEXT_FLAG_DISABLE_POPUPS (0x00000020)
806 #define IRP_CONTEXT_FLAG_DEFERRED (0x00000040)
807 #define IRP_CONTEXT_FLAG_VERIFY_READ (0x00000080)
808 #define IRP_CONTEXT_STACK_IO_CONTEXT (0x00000100)
809 #define IRP_CONTEXT_FLAG_REQUEUED (0x00000200)
810 #define IRP_CONTEXT_FLAG_USER_IO (0x00000400)
811 #define IRP_CONTEXT_FLAG_DELAY_CLOSE (0x00000800)
812 
813 //
814 // RFSD_ALLOC_HEADER
815 //
816 // In the checked version of the driver this header is put in the beginning of
817 // every memory allocation
818 //
819 typedef struct _RFSD_ALLOC_HEADER {
822 
823 typedef struct _FCB_LIST_ENTRY {
827 
828 
829 // Block Description List
830 typedef struct _RFSD_BDL {
835 } RFSD_BDL, *PRFSD_BDL;
836 
837 #pragma pack()
838 
839 
840 /* FUNCTIONS DECLARATION *****************************************************/
841 
842 //
843 // The following macro is used to determine if an FSD thread can block
844 // for I/O or wait for a resource. It returns TRUE if the thread can
845 // block and FALSE otherwise. This attribute can then be used to call
846 // the FSD & FSP common work routine with the proper wait value.
847 //
848 
849 #define CanRfsdWait(IRP) IoIsOperationSynchronous(Irp)
850 
851 #ifndef max
852 #define max(a,b) (((a) > (b)) ? (a) : (b))
853 #endif
854 
855 #ifndef min
856 #define min(a,b) (((a) < (b)) ? (a) : (b))
857 #endif
858 
859 //
860 // RfsdBlock.c
861 //
862 
863 // TODO move allocate and load block here
864 
865 NTSTATUS
867  IN PRFSD_VCB Vcb,
868  IN PRFSD_KEY_IN_MEMORY pKey, // The key to match against
869  IN PUCHAR pBlockBuffer, // A filled disk block, provided by the caller
870  OUT PRFSD_ITEM_HEAD* ppTargetItemHeader, // A pointer to a PRFSD_ITEM_HEAD. The PRFSD_ITEM_HEAD will point to the item head matching Key, or NULL if there was no such item head in the given block.
872  );
873 
874 NTSTATUS
876  IN PRFSD_VCB Vcb,
877  IN PRFSD_KEY_IN_MEMORY pItemKey, // The key of the item to find
878  OUT PRFSD_ITEM_HEAD* ppMatchingItemHeader,
879  OUT PUCHAR* ppItemBuffer,
880  OUT PUCHAR* ppBlockBuffer, // Block buffer, which backs the other output data structures. The caller must free this (even in the case of an error)!
881  OUT PULONG pBlockNumber, // The ordinal disk block number at which the item was found
883  );
884 //
885 // Block.c
886 //
887 
888 NTSTATUS
890  IN PIRP Irp,
891  IN ULONG Length,
893 PVOID
895 
896 
897 NTSTATUS
899  IN PRFSD_IRP_CONTEXT IrpContext,
900  IN PRFSD_VCB Vcb,
901  IN PRFSD_BDL RfsdBDL,
902  IN ULONG Length,
903  IN ULONG Count,
904  IN BOOLEAN bVerify );
905 
906 PUCHAR
908  IN PRFSD_VCB Vcb,
909  IN ULONG BlockIndex );
910 
911 NTSTATUS
913  IN PRFSD_VCB Vcb,
915  IN ULONG Length,
916  OUT PVOID Buffer,
917  IN BOOLEAN bVerify );
918 
919 NTSTATUS
921  IN PRFSD_VCB Vcb,
923  IN ULONG Size,
924  IN PVOID Buffer,
925  IN BOOLEAN bVerify );
926 
927 NTSTATUS
929  IN PDEVICE_OBJECT DeviceOjbect,
930  IN ULONG IoctlCode,
932  IN ULONG InputBufferSize,
934  IN OUT PULONG OutputBufferSize );
935 
936 VOID
938  IN PRFSD_IRP_CONTEXT IrpContext,
939  IN PRFSD_VCB Vcb,
940  IN BOOLEAN bPrevent );
941 
942 NTSTATUS
944 
945 
946 //
947 // Cleanup.c
948 //
949 NTSTATUS
950 RfsdCleanup (IN PRFSD_IRP_CONTEXT IrpContext);
951 
952 //
953 // Close.c
954 //
955 NTSTATUS
956 RfsdClose (IN PRFSD_IRP_CONTEXT IrpContext);
957 
958 VOID
960 
961 #ifdef _PREFAST_
962 IO_WORKITEM_ROUTINE RfsdDeQueueCloseRequest;
963 #endif // _PREFAST_
964 
965 VOID NTAPI
967 
968 //
969 // Cmcb.c
970 //
971 
974  IN PVOID Context,
975  IN BOOLEAN Wait );
976 VOID NTAPI
978 
981  IN PVOID Context,
982  IN BOOLEAN Wait );
983 
986  IN PVOID Fcb,
987  IN BOOLEAN Wait );
988 
989 VOID NTAPI
991 
992 VOID NTAPI
994 
995 //
996 // Create.c
997 //
998 
999 PRFSD_FCB
1001  IN PRFSD_VCB Vcb,
1002  IN ULONG inode);
1003 
1004 NTSTATUS
1006  IN PRFSD_MCB ParentMcb, // Mcb of the directory to be scanned
1007  IN PUNICODE_STRING FileName, // Short file name (not necisarilly null-terminated!)
1008  IN OUT PULONG Index, // Offset (in bytes) of the dentry relative to the start of the directory listing
1009  IN OUT PRFSD_DENTRY_HEAD rfsd_dir); // Directory entry of the found item
1010 
1011 NTSTATUS
1013  IN PRFSD_VCB Vcb,
1014  IN PUNICODE_STRING FullFileName,
1015  IN PRFSD_MCB ParentMcb,
1016  OUT PRFSD_MCB * RfsdMcb,
1017  IN OUT PRFSD_INODE Inode);
1018 
1019 NTSTATUS
1021  IN PRFSD_IRP_CONTEXT IrpContext,
1022  IN PRFSD_VCB Vcb );
1023 
1024 NTSTATUS
1026  IN PRFSD_IRP_CONTEXT IrpContext,
1027  IN PRFSD_VCB Vcb );
1028 
1029 NTSTATUS
1030 RfsdCreate (IN PRFSD_IRP_CONTEXT IrpContext);
1031 
1032 NTSTATUS
1034  IN PRFSD_IRP_CONTEXT IrpContext,
1035  IN PRFSD_VCB Vcb,
1036  IN PRFSD_FCB pParentFcb,
1037  IN ULONG Type,
1038  IN ULONG FileAttr,
1040 
1041 NTSTATUS
1043  IN PRFSD_IRP_CONTEXT IrpContext,
1044  IN PRFSD_VCB Vcb,
1045  IN PRFSD_FCB Fcb,
1046  IN ULONG Disposition);
1047 
1048 //
1049 // Debug.c
1050 //
1051 
1052 #define DBG_VITAL 0
1053 #define DBG_ERROR 1
1054 #define DBG_USER 2
1055 #define DBG_TRACE 3
1056 #define DBG_INFO 4
1057 #define DBG_FUNC 5
1058 
1059 #if DBG
1060 #define RfsdPrint(arg) RfsdPrintf arg
1061 #define RfsdPrintNoIndent(arg) RfsdNIPrintf arg
1062 
1063 #define RfsdCompleteRequest(Irp, bPrint, PriorityBoost) \
1064  RfsdDbgPrintComplete(Irp, bPrint); \
1065  IoCompleteRequest(Irp, PriorityBoost)
1066 
1067 #else
1068 
1069 #define RfsdPrint(arg)
1070 #define RfsdPrintNoIndent(arg)
1071 
1072 #define RfsdCompleteRequest(Irp, bPrint, PriorityBoost) \
1073  IoCompleteRequest(Irp, PriorityBoost)
1074 
1075 #endif // DBG
1076 
1077 VOID
1078 __cdecl
1079 RfsdPrintf(
1080  LONG DebugPrintLevel,
1081  PCHAR DebugMessage,
1082  ...
1083  );
1084 
1085 VOID
1086 __cdecl
1087 RfsdNIPrintf(
1088  LONG DebugPrintLevel,
1089  PCHAR DebugMessage,
1090  ...
1091  );
1092 
1093 extern ULONG ProcessNameOffset;
1094 
1095 #define RfsdGetCurrentProcessName() ( \
1096  (PUCHAR) PsGetCurrentProcess() + ProcessNameOffset \
1097 )
1098 
1099 ULONG
1101 
1102 VOID
1105  IN PIRP Irp );
1106 
1107 VOID
1109  IN PIRP Irp,
1110  IN BOOLEAN bPrint
1111  );
1112 
1113 PUCHAR
1115 
1116 //
1117 // Devctl.c
1118 //
1119 
1120 NTSTATUS
1122 
1123 NTSTATUS
1125 
1126 NTSTATUS
1128 
1129 //
1130 // Dirctl.c
1131 //
1132 
1133 ULONG
1135 
1136 ULONG
1138  IN PRFSD_VCB Vcb,
1140  IN __u32 Key_ParentID,
1141  IN __u32 Key_ObjectID,
1142  IN PVOID Buffer,
1143  IN ULONG UsedLength,
1144  IN ULONG Length,
1145  IN ULONG FileIndex,
1147  IN BOOLEAN Single,
1148  IN PVOID pPreviousEntry );
1149 
1150 NTSTATUS
1152 
1153 NTSTATUS
1155  IN PRFSD_IRP_CONTEXT IrpContext
1156  );
1157 
1158 VOID
1160  IN PRFSD_IRP_CONTEXT IrpContext,
1161  IN PRFSD_VCB Vcb,
1162  IN PRFSD_FCB Fcb,
1163  IN ULONG Filter,
1164  IN ULONG Action
1165  );
1166 
1167 NTSTATUS
1169 
1170 BOOLEAN
1172  IN PRFSD_VCB Vcb,
1173  IN PRFSD_FCB Fcb
1174  );
1175 
1176 //
1177 // Dispatch.c
1178 //
1179 
1180 NTSTATUS
1182 
1183 #ifdef _PREFAST_
1184 IO_WORKITEM_ROUTINE RfsdDeQueueRequest;
1185 #endif // _PREFAST_
1186 
1187 VOID NTAPI
1189 
1190 NTSTATUS
1192 
1193 #ifdef _PREFAST_
1211 #endif // _PREFAST_
1212 
1216  IN PIRP Irp
1217  );
1218 
1219 //
1220 // Except.c
1221 //
1222 
1223 NTSTATUS
1225  IN PRFSD_IRP_CONTEXT IrpContext,
1226  IN PEXCEPTION_POINTERS ExceptionPointer
1227  );
1228 
1229 NTSTATUS
1231 
1232 
1233 //
1234 // Rfsd.c
1235 //
1236 
1239  IN PRFSD_VCB Vcb,
1241  );
1242 
1243 BOOLEAN
1245  IN PRFSD_IRP_CONTEXT IrpContext,
1246  IN PRFSD_VCB Vcb
1247  );
1248 
1249 BOOLEAN
1251 
1252 BOOLEAN
1254  IN PRFSD_IRP_CONTEXT IrpContext,
1255  IN PRFSD_VCB Vcb,
1256  IN ULONG Group
1257  );
1258 
1259 BOOLEAN
1261  IN __u32 DirectoryID,
1262  IN __u32 ParentID,
1263  OUT PLONGLONG offset);
1264 
1265 BOOLEAN
1267  IN PRFSD_KEY_IN_MEMORY pKey,
1268  IN OUT PRFSD_INODE Inode);
1269 
1270 BOOLEAN
1272  IN __u32 a,
1273  IN __u32 b,
1274  IN OUT PRFSD_INODE Inode);
1275 BOOLEAN
1276 RfsdSaveInode (
1277  IN PRFSD_IRP_CONTEXT IrpContext,
1278  IN PRFSD_VCB Vcb,
1279  IN ULONG inode,
1280  IN PRFSD_INODE Inode
1281  );
1282 
1283 BOOLEAN
1284 RfsdLoadBlock (
1285  IN PRFSD_VCB Vcb,
1286  IN ULONG dwBlk,
1287  IN PVOID Buffer
1288  );
1289 
1290 BOOLEAN
1291 RfsdSaveBlock (
1292  IN PRFSD_IRP_CONTEXT IrpContext,
1293  IN PRFSD_VCB Vcb,
1294  IN ULONG dwBlk,
1295  IN PVOID Buf
1296  );
1297 
1298 BOOLEAN
1300  IN PRFSD_IRP_CONTEXT IrpContext,
1301  IN PRFSD_VCB Vcb,
1302  IN LONGLONG Offset,
1303  IN ULONG Size,
1304  IN PVOID Buf
1305  );
1306 
1307 NTSTATUS
1308 RfsdGetBlock(
1309  IN PRFSD_IRP_CONTEXT IrpContext,
1310  IN PRFSD_VCB Vcb,
1311  IN ULONG dwContent,
1312  IN ULONG Index,
1313  IN ULONG Layer,
1314  IN BOOLEAN bAlloc,
1315  OUT PULONG pBlock
1316  );
1317 
1318 NTSTATUS
1319 RfsdBlockMap(
1320  IN PRFSD_IRP_CONTEXT IrpContext,
1321  IN PRFSD_VCB Vcb,
1322  IN ULONG InodeNo,
1323  IN PRFSD_INODE Inode,
1324  IN ULONG Index,
1325  IN BOOLEAN bAlloc,
1326  OUT PULONG pBlock
1327  );
1328 
1329 NTSTATUS
1330 RfsdBuildBDL2(
1331  IN PRFSD_VCB Vcb,
1332  IN PRFSD_KEY_IN_MEMORY pKey,
1333  IN PRFSD_INODE pInode,
1334  OUT PULONG out_Count,
1335  OUT PRFSD_BDL* out_ppBdl );
1336 
1337 NTSTATUS
1338 RfsdBuildBDL(
1339  IN PRFSD_IRP_CONTEXT IrpContext,
1340  IN PRFSD_VCB Vcb,
1341  IN PRFSD_KEY_IN_MEMORY InodeNo,
1342  IN PRFSD_INODE Inode,
1343  IN ULONGLONG Offset,
1344  IN ULONG Size,
1345  IN BOOLEAN bAlloc,
1346  OUT PRFSD_BDL * Bdls,
1347  OUT PULONG Count
1348  );
1349 
1350 NTSTATUS
1351 RfsdNewBlock(
1352  PRFSD_IRP_CONTEXT IrpContext,
1353  PRFSD_VCB Vcb,
1354  ULONG GroupHint,
1355  ULONG BlockHint,
1356  PULONG dwRet );
1357 
1358 NTSTATUS
1360  PRFSD_IRP_CONTEXT IrpContext,
1361  PRFSD_VCB Vcb,
1362  ULONG Block );
1363 
1364 NTSTATUS
1366  PRFSD_IRP_CONTEXT IrpContext,
1367  PRFSD_VCB Vcb,
1368  PRFSD_FCB Fcb,
1369  ULONG dwContent,
1370  ULONG Index,
1371  ULONG layer,
1372  BOOLEAN bNew,
1373  ULONG *dwRet );
1374 
1375 
1376 NTSTATUS
1378  PRFSD_IRP_CONTEXT IrpContext,
1379  PRFSD_VCB Vcb,
1380  PRFSD_FCB Fcb,
1381  ULONG *dwRet );
1382 
1383 NTSTATUS
1384 RfsdNewInode(
1385  PRFSD_IRP_CONTEXT IrpContext,
1386  PRFSD_VCB Vcb,
1387  ULONG GroupHint,
1388  ULONG mode,
1389  PULONG Inode );
1390 
1391 BOOLEAN
1393  PRFSD_IRP_CONTEXT IrpContext,
1394  PRFSD_VCB Vcb,
1395  ULONG Inode,
1396  ULONG Type );
1397 
1398 NTSTATUS
1399 RfsdAddEntry (
1400  IN PRFSD_IRP_CONTEXT IrpContext,
1401  IN PRFSD_VCB Vcb,
1402  IN PRFSD_FCB Dcb,
1403  IN ULONG FileType,
1404  IN ULONG Inode,
1406 
1407 NTSTATUS
1409  IN PRFSD_IRP_CONTEXT IrpContext,
1410  IN PRFSD_VCB Vcb,
1411  IN PRFSD_FCB Dcb,
1412  IN ULONG FileType,
1413  IN ULONG Inode );
1414 
1415 NTSTATUS
1417  IN PRFSD_IRP_CONTEXT IrpContext,
1418  IN PRFSD_VCB Vcb,
1419  IN PRFSD_FCB Dcb,
1420  IN ULONG OldParent,
1421  IN ULONG NewParent );
1422 
1423 
1424 NTSTATUS
1426  IN PRFSD_IRP_CONTEXT IrpContext,
1427  IN PRFSD_VCB Vcb,
1428  IN PRFSD_FCB Fcb,
1429  IN ULONG dwContent,
1430  IN ULONG Index,
1431  IN ULONG layer,
1432  OUT BOOLEAN *bFreed );
1433 
1434 NTSTATUS
1436  IN PRFSD_IRP_CONTEXT IrpContext,
1437  IN PRFSD_VCB Vcb,
1438  IN PRFSD_FCB Fcb );
1439 
1440 BOOLEAN
1442  IN PRFSD_VCB Vcb,
1443  IN LONGLONG Lba,
1444  IN LONGLONG Length );
1445 
1446 VOID
1448  IN PRFSD_VCB Vcb,
1449  IN LONGLONG Lba,
1450  IN LONGLONG Length );
1451 
1452 BOOLEAN
1454  IN PRFSD_VCB Vcb,
1455  IN LONGLONG Offset,
1456  OUT PLONGLONG Lba OPTIONAL,
1458  OUT PLONGLONG RunStart OPTIONAL,
1459  OUT PLONGLONG RunLength OPTIONAL,
1461 
1462 BOOLEAN
1464 
1465 __u32
1466 ConvertKeyTypeUniqueness(__u32 k_uniqueness);
1467 
1468 void
1470  IN PRFSD_KEY_ON_DISK pKeyOnDisk,
1471  IN RFSD_KEY_VERSION KeyVersion,
1472  IN OUT PRFSD_KEY_IN_MEMORY pKeyInMemory );
1473 
1475 
1480 
1485 
1487 CompareKeys(
1490 
1491 NTSTATUS
1493  IN PRFSD_VCB Vcb,
1495  IN ULONG StartingBlockNumber,
1496  OUT PULONG out_NextBlockNumber );
1497 
1498 NTSTATUS
1500  IN PRFSD_VCB Vcb,
1501  IN PRFSD_KEY_IN_MEMORY Key, // Key to search for.
1502  IN ULONG StartingBlockNumber, // Block number of an internal or leaf node, to start the search from
1503  IN RFSD_CALLBACK(fpDirectoryCallback), // A function ptr to trigger on hitting a matching leaf block
1504  IN PVOID Context
1505  );
1506 
1507 
1508 NTSTATUS
1510  IN PRFSD_VCB Vcb,
1512  IN ULONG StartingBlockNumber,
1513  OUT PULONG out_NextBlockNumber,
1514  IN BOOLEAN ReturnOnFirstMatch,
1516  RFSD_CALLBACK(fpDirectoryCallback),
1517  IN PVOID pContext
1518  );
1519 
1520 
1521 //
1522 // Fastio.c
1523 //
1524 
1525 #ifdef _PREFAST_
1526 FAST_IO_CHECK_IF_POSSIBLE RfsdFastIoCheckIfPossible;
1527 #endif // _PREFAST_
1528 
1529 BOOLEAN NTAPI
1533  IN ULONG Length,
1534  IN BOOLEAN Wait,
1535  IN ULONG LockKey,
1539 
1540 #ifdef _PREFAST_
1541 FAST_IO_READ RfsdFastIoRead;
1542 #endif // _PREFAST_
1543 
1544 BOOLEAN NTAPI
1547  IN ULONG Length,
1548  IN BOOLEAN Wait,
1549  IN ULONG LockKey,
1550  OUT PVOID Buffer,
1553 
1554 #ifdef _PREFAST_
1555 FAST_IO_WRITE RfsdFastIoWrite;
1556 #endif // _PREFAST_
1557 
1558 BOOLEAN NTAPI
1562  IN ULONG Length,
1563  IN BOOLEAN Wait,
1564  IN ULONG LockKey,
1565  OUT PVOID Buffer,
1568 
1569 #ifdef _PREFAST_
1570 FAST_IO_QUERY_BASIC_INFO RfsdFastIoQueryBasicInfo;
1571 #endif // _PREFAST_
1572 
1573 BOOLEAN NTAPI
1576  IN BOOLEAN Wait,
1580 
1581 #ifdef _PREFAST_
1582 FAST_IO_QUERY_STANDARD_INFO RfsdFastIoQueryStandardInfo;
1583 #endif // _PREFAST_
1584 
1585 BOOLEAN NTAPI
1588  IN BOOLEAN Wait,
1592 
1593 #ifdef _PREFAST_
1594 FAST_IO_LOCK RfsdFastIoLock;
1595 #endif // _PREFAST_
1596 
1597 BOOLEAN NTAPI
1603  IN ULONG Key,
1608  );
1609 
1610 #ifdef _PREFAST_
1611 FAST_IO_UNLOCK_SINGLE RfsdFastIoUnlockSingle;
1612 #endif // _PREFAST_
1613 
1614 BOOLEAN NTAPI
1620  IN ULONG Key,
1623  );
1624 
1625 #ifdef _PREFAST_
1626 FAST_IO_UNLOCK_ALL RfsdFastIoUnlockAll;
1627 #endif // _PREFAST_
1628 
1629 BOOLEAN NTAPI
1635  );
1636 
1637 #ifdef _PREFAST_
1638 FAST_IO_UNLOCK_ALL_BY_KEY RfsdFastIoUnlockAllByKey;
1639 #endif // _PREFAST_
1640 
1641 BOOLEAN NTAPI
1644 #ifdef __REACTOS__
1645  IN PVOID Process,
1646 #else
1648 #endif
1649  IN ULONG Key,
1652  );
1653 
1654 #ifdef _PREFAST_
1655 FAST_IO_QUERY_NETWORK_OPEN_INFO RfsdFastIoQueryNetworkOpenInfo;
1656 #endif // _PREFAST_
1657 
1658 BOOLEAN NTAPI
1661  IN BOOLEAN Wait,
1665 
1666 
1667 //
1668 // FileInfo.c
1669 //
1670 
1671 
1672 NTSTATUS
1674 
1675 NTSTATUS
1677 
1678 NTSTATUS
1680  PRFSD_IRP_CONTEXT IrpContext,
1681  PRFSD_VCB Vcb,
1682  PRFSD_FCB Fcb,
1684 
1685 NTSTATUS
1687  PRFSD_IRP_CONTEXT IrpContext,
1688  PRFSD_VCB Vcb,
1689  PRFSD_FCB Fcb,
1691 
1692 NTSTATUS
1694  PRFSD_IRP_CONTEXT IrpContext,
1695  PRFSD_VCB Vcb,
1696  PRFSD_FCB Fcb,
1697  BOOLEAN bDelete);
1698 
1699 NTSTATUS
1701  PRFSD_IRP_CONTEXT IrpContext,
1702  PRFSD_VCB Vcb,
1703  PRFSD_FCB Fcb );
1704 
1705 NTSTATUS
1707  PRFSD_IRP_CONTEXT IrpContext,
1708  PRFSD_VCB Vcb,
1709  PRFSD_FCB Fcb );
1710 
1711 
1712 //
1713 // Flush.c
1714 //
1715 
1716 NTSTATUS
1718 
1719 NTSTATUS
1721 
1722 NTSTATUS
1724 
1725 NTSTATUS
1726 RfsdFlush (IN PRFSD_IRP_CONTEXT IrpContext);
1727 
1728 
1729 //
1730 // Fsctl.c
1731 //
1732 
1733 
1734 VOID
1736  IN USHORT Flag );
1737 
1738 VOID
1740  IN USHORT Flag );
1741 
1742 BOOLEAN
1744  IN PRFSD_IRP_CONTEXT IrpContext,
1745  IN PRFSD_VCB Vcb,
1746  IN BOOLEAN bForce );
1747 
1749 NTSTATUS
1751  IN BOOLEAN FlushBeforePurge);
1752 
1754 NTSTATUS
1756  IN BOOLEAN FlushBeforePurge);
1757 
1758 BOOLEAN
1760 
1761 NTSTATUS
1764 
1765 NTSTATUS
1766 RfsdLockVolume (IN PRFSD_IRP_CONTEXT IrpContext);
1767 
1768 NTSTATUS
1771 
1772 NTSTATUS
1774 
1775 NTSTATUS
1777 
1778 NTSTATUS
1780 
1781 NTSTATUS
1782 RfsdMountVolume (IN PRFSD_IRP_CONTEXT IrpContext);
1783 
1784 NTSTATUS
1786 
1788 NTSTATUS
1790 
1792 NTSTATUS
1794 
1795 NTSTATUS
1797 
1798 
1799 //
1800 // Init.c
1801 //
1802 
1803 BOOLEAN
1805 
1806 #ifdef _PREFAST_
1807 DRIVER_INITIALIZE DriverEntry;
1808 #endif // _PREFAST_
1809 
1810 #ifdef _PREFAST_
1811 DRIVER_UNLOAD DriverUnload;
1812 #endif // _PREFAST_
1813 
1814 VOID NTAPI
1816 
1817 
1818 //
1819 // Lock.c
1820 //
1821 
1822 NTSTATUS
1823 RfsdLockControl (IN PRFSD_IRP_CONTEXT IrpContext);
1824 
1825 //
1826 // Memory.c
1827 //
1828 
1831  IN PIRP Irp );
1832 
1833 VOID
1835 
1836 
1837 PRFSD_FCB
1839  IN PRFSD_MCB RfsdMcb,
1840  IN PRFSD_INODE Inode );
1841 
1842 VOID
1844 
1845 PRFSD_CCB
1847 
1848 VOID
1850 
1851 PRFSD_FCB
1853 
1854 VOID
1856 
1857 PRFSD_MCB
1860  ULONG FileAttr);
1861 
1862 PRFSD_MCB
1864  PRFSD_MCB RfsdMcb,
1866 
1867 PRFSD_MCB
1870 
1871 BOOLEAN
1874 
1875 VOID
1877 
1878 VOID
1880  PRFSD_MCB Parent,
1881  PRFSD_MCB Child );
1882 
1883 BOOLEAN
1885  PRFSD_VCB Vcb,
1886  PRFSD_MCB McbTree,
1887  PRFSD_MCB RfsdMcb);
1888 
1889 VOID
1890 RfsdFreeMcbTree(PRFSD_MCB McbTree);
1891 
1892 BOOLEAN
1894  PRFSD_VCB Vcb, ULONG Block);
1895 
1896 BOOLEAN
1898  PRFSD_VCB Vcb);
1899 
1900 VOID
1902 
1903 VOID
1905 
1906 NTSTATUS
1908  PRFSD_IRP_CONTEXT IrpContext,
1909  PRFSD_VCB Vcb,
1910  PRFSD_SUPER_BLOCK RfsdSb,
1912  PDEVICE_OBJECT VolumeDevice,
1913  PVPB Vpb );
1914 
1915 VOID
1917 
1918 
1919 VOID
1920 RfsdRepinBcb (
1921  IN PRFSD_IRP_CONTEXT IrpContext,
1922  IN PBCB Bcb );
1923 
1924 VOID
1926  IN PRFSD_IRP_CONTEXT IrpContext);
1927 
1928 
1929 NTSTATUS
1931  IN PRFSD_IRP_CONTEXT IrpContext,
1932  IN NTSTATUS Status );
1933 
1934 VOID
1937 
1938 //
1939 // Misc.c
1940 //
1941 
1944 {
1945  USHORT i = 0;
1946  while ((i < MaximumLength) && (buffer[i] != '\0')) { i++; }
1947  return i;
1948 }
1949 
1950 ULONG
1952 
1954 RfsdSysTime (IN ULONG i_time);
1955 
1956 ULONG
1957 RfsdInodeTime (IN LARGE_INTEGER SysTime);
1958 
1959 ULONG
1961  IN PANSI_STRING Oem
1962  );
1963 
1964 NTSTATUS
1966  IN OUT PUNICODE_STRING Oem,
1967  IN POEM_STRING Unicode
1968  );
1969 
1970 ULONG
1972  IN PUNICODE_STRING Unicode
1973  );
1974 
1975 NTSTATUS
1977  IN OUT POEM_STRING Oem,
1978  IN PUNICODE_STRING Unicode
1979  );
1980 
1981 //
1982 // nls/nls_rtl.c
1983 //
1984 
1985 int
1986 RfsdLoadAllNls();
1987 
1988 VOID
1990 
1991 //
1992 // Pnp.c
1993 //
1994 
1996 NTSTATUS
1997 RfsdPnp(IN PRFSD_IRP_CONTEXT IrpContext);
1998 
2000 NTSTATUS
2002  PRFSD_IRP_CONTEXT IrpContext,
2003  PRFSD_VCB Vcb );
2004 
2006 NTSTATUS
2008  PRFSD_IRP_CONTEXT IrpContext,
2009  PRFSD_VCB Vcb );
2010 
2012 NTSTATUS
2014  PRFSD_IRP_CONTEXT IrpContext,
2015  PRFSD_VCB Vcb );
2016 
2018 NTSTATUS
2020  PRFSD_IRP_CONTEXT IrpContext,
2021  PRFSD_VCB Vcb );
2022 
2023 
2024 //
2025 // Read.c
2026 //
2027 
2028 BOOLEAN
2029 RfsdCopyRead(
2032  IN ULONG Length,
2033  IN BOOLEAN Wait,
2034  OUT PVOID Buffer,
2036 
2037 
2038 NTSTATUS
2039 RfsdReadInode (
2040  IN PRFSD_IRP_CONTEXT IrpContext,
2041  IN PRFSD_VCB Vcb,
2043  IN PRFSD_INODE Inode,
2045  IN PVOID Buffer,
2046  IN ULONG Size,
2047  OUT PULONG dwReturn
2048  );
2049 
2050 NTSTATUS
2051 RfsdRead (IN PRFSD_IRP_CONTEXT IrpContext);
2052 
2053 //
2054 // Shutdown.c
2055 //
2056 
2057 NTSTATUS
2058 RfsdShutDown (IN PRFSD_IRP_CONTEXT IrpContext);
2059 
2060 //
2061 // Volinfo.c
2062 //
2063 
2064 NTSTATUS
2066 
2067 NTSTATUS
2069 
2070 
2071 //
2072 // Write.c
2073 //
2074 
2075 NTSTATUS
2077  IN PRFSD_IRP_CONTEXT IrpContext,
2078  IN PRFSD_VCB Vcb,
2079  IN ULONG InodeNo,
2080  IN PRFSD_INODE Inode,
2082  IN PVOID Buffer,
2083  IN ULONG Size,
2084  IN BOOLEAN bWriteToDisk,
2085  OUT PULONG dwReturn
2086  );
2087 
2088 VOID
2090  PRFSD_VCB Vcb,
2091  PRFSD_FCB Fcb,
2093 
2094 BOOLEAN
2095 RfsdZeroHoles (
2096  IN PRFSD_IRP_CONTEXT IrpContext,
2097  IN PRFSD_VCB Vcb,
2099  IN LONGLONG Offset,
2100  IN LONGLONG Count );
2101 
2102 NTSTATUS
2103 RfsdWrite (IN PRFSD_IRP_CONTEXT IrpContext);
2104 
2105 #endif /* _RFSD_HEADER_ */
DISK_GEOMETRY DiskGeometry
Definition: rfsd.h:539
struct _RFSD_CCB * PRFSD_CCB
BOOLEAN IsSynchronous
Definition: rfsd.h:780
Definition: ext2fs.h:1103
CACHE_MANAGER_CALLBACKS CacheManagerCallbacks
Definition: rfsd.h:400
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
signed char * PCHAR
Definition: retypes.h:7
NTSTATUS RfsdDiskIoControl(IN PDEVICE_OBJECT DeviceOjbect, IN ULONG IoctlCode, IN PVOID InputBuffer, IN ULONG InputBufferSize, IN OUT PVOID OutputBuffer, IN OUT PULONG OutputBufferSize)
Definition: blockio.c:492
NTSTATUS RfsdExceptionHandler(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: except.c:103
PBCB Bcb[RFSD_REPINNED_BCBS_ARRAY_SIZE]
Definition: rfsd.h:369
NTSTATUS RfsdUnicodeToOEM(IN OUT POEM_STRING Oem, IN PUNICODE_STRING Unicode)
Definition: misc.c:246
void FillInMemoryKey(IN PRFSD_KEY_ON_DISK pKeyOnDisk, IN RFSD_KEY_VERSION KeyVersion, IN OUT PRFSD_KEY_IN_MEMORY pKeyInMemory)
Definition: rfsd.c:2777
NTSTATUS RfsdFreeBlock(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, ULONG Block)
#define IN
Definition: typedefs.h:38
NTSTATUS RfsdUnlockVcb(IN PRFSD_VCB Vcb, IN PFILE_OBJECT FileObject)
Definition: fsctl.c:225
PIRP Irp
Definition: rfsd.h:834
NTSTATUS RfsdAddEntry(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PRFSD_FCB Dcb, IN ULONG FileType, IN ULONG Inode, IN PUNICODE_STRING FileName)
NTSTATUS RfsdExpandFile(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, PRFSD_FCB Fcb, PLARGE_INTEGER AllocationSize)
Definition: fileinfo.c:962
NTSTATUS RfsdCompleteIrpContext(IN PRFSD_IRP_CONTEXT IrpContext, IN NTSTATUS Status)
Definition: memory.c:160
__u16 RFSD_KEY_VERSION
Definition: rfsd.h:56
struct _RFSD_GLOBAL * PRFSD_GLOBAL
VOID RfsdRefreshMcb(PRFSD_VCB Vcb, PRFSD_MCB Mcb)
Definition: memory.c:1012
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
LIST_ENTRY Next
Definition: rfsd.h:616
BOOLEAN NTAPI RfsdFastIoRead(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
NTSTATUS RfsdReadDisk(IN PRFSD_VCB Vcb, IN ULONGLONG Offset, IN ULONG Size, IN PVOID Buffer, IN BOOLEAN bVerify)
struct LOOKASIDE_ALIGN _NPAGED_LOOKASIDE_LIST NPAGED_LOOKASIDE_LIST
IN PVCB IN VBO IN ULONG OUT PBCB * Bcb
Definition: fatprocs.h:402
NTSTATUS RfsdDiskShutDown(PRFSD_VCB Vcb)
Definition: blockio.c:631
Type
Definition: Type.h:6
UNICODE_STRING LongName
Definition: rfsd.h:651
BOOLEAN IsTopLevel
Definition: rfsd.h:783
VOID RfsdUnloadAllNls()
Definition: nls.c:217
struct _RFSD_BDL RFSD_BDL
#define IRP_MJ_FLUSH_BUFFERS
ULONG Length
Definition: rfsd.h:833
USHORT MaxDepth
Definition: rfsd.h:413
#define __drv_mustHoldCriticalRegion
Definition: ffsdrv.h:34
#define __cdecl
Definition: accygwin.h:79
__drv_mustHoldCriticalRegion NTSTATUS RfsdIsVolumeMounted(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: fsctl.c:903
SECTION_OBJECT_POINTERS SectionObject
Definition: rfsd.h:485
_Must_inspect_result_ __drv_aliasesMem PDEVICE_OBJECT _In_ PDEVICE_OBJECT TargetDevice
Definition: iofuncs.h:688
FSRTL_COMMON_FCB_HEADER Header
Definition: rfsd.h:484
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN OUT PIO_STATUS_BLOCK IoStatus
Definition: fatprocs.h:2650
NTSTATUS RfsdClose(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: close.c:29
struct _RFSD_IDENTIFIER RFSD_IDENTIFIER
NTSTATUS RfsdSetParentEntry(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PRFSD_FCB Dcb, IN ULONG OldParent, IN ULONG NewParent)
#define IRP_MJ_SHUTDOWN
UCHAR MinorFunction
Definition: rfsd.h:765
ULONG OpenHandleCount
Definition: rfsd.h:506
PDEVICE_OBJECT DeviceObject
Definition: rfsd.h:530
NTSTATUS RfsdSupersedeOrOverWriteFile(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PRFSD_FCB Fcb, IN ULONG Disposition)
RFSD_IDENTIFIER Identifier
Definition: rfsd.h:385
NTSTATUS RfsdFindItemHeaderInBlock(IN PRFSD_VCB Vcb, IN PRFSD_KEY_IN_MEMORY pKey, IN PUCHAR pBlockBuffer, OUT PRFSD_ITEM_HEAD *ppTargetItemHeader, IN RFSD_KEY_COMPARISON(*fpComparisonFunction)(PRFSD_KEY_IN_MEMORY, PRFSD_KEY_IN_MEMORY))
Definition: rfsdblock.c:61
_In_ PIRP Irp
Definition: csq.h:116
superblock * sb
Definition: btrfs.c:4162
BOOLEAN NTAPI RfsdAcquireForLazyWrite(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:32
#define CODEPAGE_MAXLEN
Definition: rfsd.h:374
VOID RfsdNotifyReportChange(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PRFSD_FCB Fcb, IN ULONG Filter, IN ULONG Action)
Definition: dirctl.c:745
ERESOURCE LAResource
Definition: rfsd.h:394
PRFSD_MCB Parent
Definition: rfsd.h:684
VOID RfsdFreeFcb(IN PRFSD_FCB Fcb)
Definition: memory.c:541
BOOLEAN RfsdSaveBuffer(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN LONGLONG Offset, IN ULONG Size, IN PVOID Buf)
NTSTATUS RfsdReadWriteBlocks(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PRFSD_BDL RfsdBDL, IN ULONG Length, IN ULONG Count, IN BOOLEAN bVerify)
Definition: blockio.c:200
NTSTATUS RfsdSetVolumeInformation(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: volinfo.c:312
NTSTATUS RfsdLookupFileName(IN PRFSD_VCB Vcb, IN PUNICODE_STRING FullFileName, IN PRFSD_MCB ParentMcb, OUT PRFSD_MCB *RfsdMcb, IN OUT PRFSD_INODE Inode)
Definition: create.c:51
PDEVICE_OBJECT RealDevice
Definition: rfsd.h:536
_In_opt_ PSID Group
Definition: rtlfuncs.h:1606
unsigned char * PUCHAR
Definition: retypes.h:3
PRFSD_FCB Fcb
Definition: rfsd.h:824
#define IRP_MJ_PNP
Definition: cdrw_usr.h:52
VOID RfsdSetVpbFlag(IN PVPB Vpb, IN USHORT Flag)
Definition: fsctl.c:48
NPAGED_LOOKASIDE_LIST RfsdIrpContextLookasideList
Definition: rfsd.h:414
BOOLEAN RfsdAddMcbEntry(IN PRFSD_VCB Vcb, IN LONGLONG Lba, IN LONGLONG Length)
BOOLEAN NTAPI RfsdFastIoQueryStandardInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_STANDARD_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:350
LONG NTSTATUS
Definition: precomp.h:26
GLintptr offset
Definition: glext.h:5920
struct item_head * PRFSD_ITEM_HEAD
Definition: rfsd.h:40
volatile BOOL bShutDown
Definition: ServiceMain.c:12
BOOLEAN NTAPI RfsdNoOpAcquire(IN PVOID Fcb, IN BOOLEAN Wait)
Definition: cmcb.c:156
BOOLEAN RfsdIsHandleCountZero(IN PRFSD_VCB Vcb)
Definition: fsctl.c:76
PUCHAR RfsdAllocateAndLoadBlock(IN PRFSD_VCB Vcb, IN ULONG BlockIndex)
Definition: rfsdblock.c:34
#define IRP_MJ_SET_VOLUME_INFORMATION
PRFSD_SUPER_BLOCK SuperBlock
Definition: rfsd.h:542
BOOLEAN RfsdLookupMcbEntry(IN PRFSD_VCB Vcb, IN LONGLONG Offset, OUT PLONGLONG Lba OPTIONAL, OUT PLONGLONG Length OPTIONAL, OUT PLONGLONG RunStart OPTIONAL, OUT PLONGLONG RunLength OPTIONAL, OUT PULONG Index OPTIONAL)
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
VOID RfsdFreeIrpContext(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: memory.c:192
NTSTATUS RfsdFlushVolume(IN PRFSD_VCB Vcb, BOOLEAN bShutDown)
Definition: flush.c:97
VOID NTAPI RfsdReleaseFromLazyWrite(IN PVOID Context)
Definition: cmcb.c:71
BOOLEAN RfsdDeleteMcbNode(PRFSD_VCB Vcb, PRFSD_MCB McbTree, PRFSD_MCB RfsdMcb)
Definition: memory.c:1057
GLuint buffer
Definition: glext.h:5915
ULONG Flags
Definition: rfsd.h:680
VOID __cdecl RfsdPrintf(LONG DebugPrintLevel, PCHAR DebugMessage,...)
NTSTATUS RfsdSetInformation(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: fileinfo.c:457
ULONG FileAttr
Definition: rfsd.h:703
RFSD_IDENTIFIER Identifier
Definition: rfsd.h:677
enum _RFSD_IDENTIFIER_TYPE RFSD_IDENTIFIER_TYPE
struct nls_table * PageTable
Definition: rfsd.h:437
NTSTATUS RfsdFlushFiles(IN PRFSD_VCB Vcb, BOOLEAN bShutDown)
Definition: flush.c:51
PAGED_LOOKASIDE_LIST RfsdMcbLookasideList
Definition: rfsd.h:417
LIST_ENTRY VcbList
Definition: rfsd.h:410
static OUT PIO_STATUS_BLOCK OUT PVOID IN ULONG IN FILE_INFORMATION_CLASS FileInformationClass
Definition: pipe.c:75
NTSTATUS RfsdFlushFile(IN PRFSD_FCB Fcb)
Definition: flush.c:119
NTSTATUS RfsdQueueRequest(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: dispatch.c:29
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
BOOLEAN RfsdZeroHoles(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PFILE_OBJECT FileObject, IN LONGLONG Offset, IN LONGLONG Count)
Definition: write.c:188
ULONG CurrentByteOffset
Definition: rfsd.h:733
ULONG RfsdOEMToUnicodeSize(IN PANSI_STRING Oem)
Definition: misc.c:183
PRFSD_MCB McbTree
Definition: rfsd.h:575
__drv_mustHoldCriticalRegion NTSTATUS RfsdPnpSurpriseRemove(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb)
NTSTATUS RfsdLoadItem(IN PRFSD_VCB Vcb, IN PRFSD_KEY_IN_MEMORY pItemKey, OUT PRFSD_ITEM_HEAD *ppMatchingItemHeader, OUT PUCHAR *ppItemBuffer, OUT PUCHAR *ppBlockBuffer, OUT PULONG pBlockNumber, IN RFSD_KEY_COMPARISON(*fpComparisonFunction)(PRFSD_KEY_IN_MEMORY, PRFSD_KEY_IN_MEMORY))
STRING OEM_STRING
Definition: umtypes.h:203
ULONGLONG Offset
Definition: rfsd.h:832
BOOLEAN RfsdSaveGroup(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN ULONG Group)
NTSTATUS RfsdSetRenameInfo(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, PRFSD_FCB Fcb)
Definition: fileinfo.c:1067
NTSTATUS RfsdExpandInode(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, PRFSD_FCB Fcb, ULONG *dwRet)
UNICODE_STRING DirectorySearchPattern
Definition: rfsd.h:735
#define RFSD_CALLBACK(name)
Definition: rfsd.h:35
NTSTATUS RfsdBuildBDL(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PRFSD_KEY_IN_MEMORY InodeNo, IN PRFSD_INODE Inode, IN ULONGLONG Offset, IN ULONG Size, IN BOOLEAN bAlloc, OUT PRFSD_BDL *Bdls, OUT PULONG Count)
NTSTATUS RfsdNewInode(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, ULONG GroupHint, ULONG mode, PULONG Inode)
NTSTATUS RfsdParseFilesystemTree(IN PRFSD_VCB Vcb, IN PRFSD_KEY_IN_MEMORY Key, IN ULONG StartingBlockNumber, IN RFSD_CALLBACK(fpDirectoryCallback), IN PVOID Context)
Definition: rfsd.c:2909
_RFSD_IDENTIFIER_TYPE
Definition: rfsd.h:321
Definition: rfsd.h:327
struct reiserfs_key * PRFSD_KEY_ON_DISK
Definition: rfsd.h:41
BOOLEAN SuperblockContainsMagicKey(PRFSD_SUPER_BLOCK sb)
Definition: rfsd.c:2698
RFSD_KEY_IN_MEMORY Key
Definition: rfsd.h:697
Definition: rfsd.h:323
NTSTATUS RfsdRead(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: read.c:894
LIST_ENTRY Next
Definition: rfsd.h:493
__drv_mustHoldCriticalRegion NTSTATUS RfsdPnpRemove(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb)
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN CheckForReadOperation
Definition: fatprocs.h:2650
__drv_mustHoldCriticalRegion NTSTATUS RfsdDismountVolume(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: fsctl.c:917
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:50
ULONG RfsdGetInfoLength(IN FILE_INFORMATION_CLASS FileInformationClass)
Definition: dirctl.c:57
VOID __cdecl RfsdNIPrintf(LONG DebugPrintLevel, PCHAR DebugMessage,...)
FILE_LOCK FileLockAnchor
Definition: rfsd.h:622
struct _RFSD_GLOBAL RFSD_GLOBAL
CHAR InputBuffer[80]
Definition: conmgr.c:33
PDEVICE_OBJECT DeviceObject
Definition: rfsd.h:407
PFILE_OBJECT FileObject
Definition: rfsd.h:774
USHORT deh_location
Definition: rfsd.h:734
VOID RfsdRepinBcb(IN PRFSD_IRP_CONTEXT IrpContext, IN PBCB Bcb)
Definition: memory.c:232
Definition: rfsd.h:324
struct reiserfs_de_head * PRFSD_DENTRY_HEAD
Definition: rfsd.h:39
PRFSD_VCB Vcb
Definition: rfsd.h:645
PUCHAR RfsdNtStatusToString(IN NTSTATUS Status)
ULONGLONG Lba
Definition: rfsd.h:831
PFILE_OBJECT LockFile
Definition: rfsd.h:518
Definition: fs.h:78
NTSTATUS RfsdDispatchRequest(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: dispatch.c:97
BOOLEAN RfsdLoadInode2(IN PRFSD_VCB Vcb, IN __u32 a, IN __u32 b, IN OUT PRFSD_INODE Inode)
NTSTATUS RfsdLockVolume(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: fsctl.c:156
BOOLEAN RfsdCheckSetBlock(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, ULONG Block)
Definition: memory.c:1131
__GNU_EXTENSION typedef __int64 * PLONGLONG
Definition: ntbasedef.h:389
LARGE_INTEGER RfsdSysTime(IN ULONG i_time)
Definition: misc.c:47
LIST_ENTRY McbList
Definition: rfsd.h:576
struct _RFSD_FCB * PRFSD_FCB
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
ULONG ProcessNameOffset
ERESOURCE CountResource
Definition: rfsd.h:391
BOOLEAN RfsdSaveSuper(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb)
NTSTATUS RfsdMountVolume(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: fsctl.c:592
ULONG BlkHint
Definition: rfsd.h:641
NTSTATUS RfsdVerifyVolume(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: fsctl.c:766
ERESOURCE PagingIoResource
Definition: rfsd.h:487
struct _RFSD_FCBVCB RFSD_FCBVCB
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
__drv_mustHoldCriticalRegion NTSTATUS RfsdPurgeFile(IN PRFSD_FCB Fcb, IN BOOLEAN FlushBeforePurge)
Definition: fsctl.c:1185
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
RFSD_KEY_COMPARISON CompareShortKeys(IN PRFSD_KEY_IN_MEMORY a, IN PRFSD_KEY_IN_MEMORY b)
Definition: rfsd.c:2811
struct _RFSD_FCB RFSD_FCB
long LONG
Definition: pedump.c:60
_Must_inspect_result_ _In_opt_ PFLT_FILTER Filter
Definition: fltkernel.h:1802
PRFSD_FCB RfsdSearchFcbList(IN PRFSD_VCB Vcb, IN ULONG inode)
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN FailImmediately
Definition: fatprocs.h:2697
VOID NTAPI RfsdDeQueueCloseRequest(IN PVOID Context)
Definition: close.c:295
struct _RFSD_BDL * PRFSD_BDL
IO_STACK_LOCATION EXTENDED_IO_STACK_LOCATION
Definition: ext2fs.h:174
BOOLEAN NTAPI RfsdFastIoUnlockAll(IN PFILE_OBJECT FileObject, IN PEPROCESS Process, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:715
struct stat_data * PRFSD_INODE
Definition: rfsd.h:33
NTSTATUS RfsdInitializeVcb(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, PRFSD_SUPER_BLOCK RfsdSb, PDEVICE_OBJECT TargetDevice, PDEVICE_OBJECT VolumeDevice, PVPB Vpb)
__drv_mustHoldCriticalRegion NTSTATUS RfsdPurgeVolume(IN PRFSD_VCB Vcb, IN BOOLEAN FlushBeforePurge)
Definition: fsctl.c:1085
VOID RfsdFreeVcb(IN PRFSD_VCB Vcb)
Definition: memory.c:1581
NTSTATUS RfsdQueryVolumeInformation(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: volinfo.c:30
NTSTATUS _NavigateToLeafNode(IN PRFSD_VCB Vcb, IN PRFSD_KEY_IN_MEMORY Key, IN ULONG StartingBlockNumber, OUT PULONG out_NextBlockNumber, IN BOOLEAN ReturnOnFirstMatch, IN RFSD_KEY_COMPARISON(*fpComparisonFunction)(PRFSD_KEY_IN_MEMORY, PRFSD_KEY_IN_MEMORY), RFSD_CALLBACK(fpDirectoryCallback), IN PVOID pContext)
Definition: rfsd.c:2934
NTSTATUS RfsdGetBlock(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN ULONG dwContent, IN ULONG Index, IN ULONG Layer, IN BOOLEAN bAlloc, OUT PULONG pBlock)
NTSTATUS RfsdExceptionFilter(IN PRFSD_IRP_CONTEXT IrpContext, IN PEXCEPTION_POINTERS ExceptionPointer)
Definition: except.c:27
SECTION_OBJECT_POINTERS SectionObject
Definition: rfsd.h:607
ULONG RfsdGetProcessNameOffset(VOID)
unsigned char BOOLEAN
NTSTATUS RfsdTruncateInode(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PRFSD_FCB Fcb)
NTSTATUS RfsdBuildBDL2(IN PRFSD_VCB Vcb, IN PRFSD_KEY_IN_MEMORY pKey, IN PRFSD_INODE pInode, OUT PULONG out_Count, OUT PRFSD_BDL *out_ppBdl)
Definition: rfsd.c:675
PVOID PBCB
Definition: rfsd.h:346
struct _RFSD_REPINNED_BCBS RFSD_REPINNED_BCBS
RFSD_IDENTIFIER_TYPE Type
Definition: rfsd.h:336
PRFSD_MCB RfsdMcb
Definition: rfsd.h:648
PRFSD_MCB Next
Definition: rfsd.h:686
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
BOOLEAN RfsdIsDirectoryEmpty(IN PRFSD_VCB Vcb, IN PRFSD_FCB Fcb)
NTSTATUS RfsdCreateVolume(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb)
NTSTATUS RfsdReadInode(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PRFSD_KEY_IN_MEMORY Key, IN PRFSD_INODE Inode, IN ULONGLONG Offset, IN PVOID Buffer, IN ULONG Size, OUT PULONG dwReturn)
UCHAR MajorFunction
Definition: rfsd.h:764
Definition: rfsd.h:326
ULONG Flags
Definition: rfsd.h:635
Definition: bufpool.h:45
NTSTATUS RfsdAllowExtendedDasdIo(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: fsctl.c:445
struct _RFSD_ALLOC_HEADER * PRFSD_ALLOC_HEADER
USHORT McbAllocated
Definition: rfsd.h:420
BOOLEAN NTAPI RfsdFastIoUnlockSingle(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:610
NPAGED_LOOKASIDE_LIST RfsdCcbLookasideList
Definition: rfsd.h:416
_Must_inspect_result_ __drv_aliasesMem _In_ PDEVICE_OBJECT _In_opt_ PVOID _In_ ULONG _Out_opt_ PVOID OutputBuffer
Definition: iofuncs.h:713
struct _RFSD_VCB RFSD_VCB
struct disk_child * PRFSD_DISK_NODE_REF
Definition: rfsd.h:43
VOID RfsdRemoveVcb(PRFSD_VCB Vcb)
Definition: memory.c:1244
PDEVICE_OBJECT TargetDeviceObject
Definition: rfsd.h:533
#define IRP_MJ_QUERY_VOLUME_INFORMATION
Definition: rdpdr.c:50
#define IRP_MJ_DIRECTORY_CONTROL
Definition: rdpdr.c:51
RFSD_IDENTIFIER Identifier
Definition: rfsd.h:727
NTSTATUS RfsdShutDown(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: shutdown.c:27
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
FAST_IO_DISPATCH FastIoDispatch
Definition: rfsd.h:397
static BOOL bVerify
Definition: verify.c:27
PRFSD_MCB Child
Definition: rfsd.h:685
NTSTATUS RfsdWriteInode(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN ULONG InodeNo, IN PRFSD_INODE Inode, IN ULONGLONG Offset, IN PVOID Buffer, IN ULONG Size, IN BOOLEAN bWriteToDisk, OUT PULONG dwReturn)
Definition: write.c:729
RFSD_REPINNED_BCBS Repinned
Definition: rfsd.h:795
VOID RfsdUnpinRepinnedBcbs(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: memory.c:286
struct _RFSD_VCB * PRFSD_VCB
GLenum GLuint GLint GLint layer
Definition: glext.h:7007
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG LockKey
Definition: fatprocs.h:2650
int64_t LONGLONG
Definition: typedefs.h:66
__drv_mustHoldCriticalRegion NTSTATUS RfsdPnp(IN PRFSD_IRP_CONTEXT IrpContext)
enum _FILE_INFORMATION_CLASS FILE_INFORMATION_CLASS
Definition: directory.c:44
PRFSD_MCB RfsdAllocateMcb(PRFSD_VCB, PUNICODE_STRING FileName, ULONG FileAttr)
Definition: memory.c:694
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
ULONG ReferenceCount
Definition: rfsd.h:505
ULONG Flags
Definition: rfsd.h:431
static LPSTR pName
Definition: security.c:75
unsigned short __u16
Definition: compat.h:89
struct RFSDFS_EXT * PRFSDFS_EXT
ULONG RfsdLog2(ULONG Value)
Definition: misc.c:30
BOOLEAN RfsdCopyRead(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:44
ULONG DeOffset
Definition: rfsd.h:700
NTSTATUS RfsdDirectoryControl(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: dirctl.c:784
__wchar_t WCHAR
Definition: xmlstorage.h:180
NTSTATUS RfsdBlockMap(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN ULONG InodeNo, IN PRFSD_INODE Inode, IN ULONG Index, IN BOOLEAN bAlloc, OUT PULONG pBlock)
Definition: rfsd.h:322
PDRIVER_OBJECT DriverObject
Definition: rfsd.h:404
PRFSD_SUPER_BLOCK RfsdLoadSuper(IN PRFSD_VCB Vcb, IN BOOLEAN bVerify)
Definition: rfsd.c:80
struct _RFSD_GLOBAL::@763 CodePage
VOID RfsdDbgPrintCall(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
NTSTATUS RfsdDeleteFile(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, PRFSD_FCB Fcb)
Definition: fileinfo.c:1417
uint64_t ULONGLONG
Definition: typedefs.h:65
#define IRP_MJ_FILE_SYSTEM_CONTROL
NTSTATUS RfsdScanDir(IN PRFSD_VCB Vcb, IN PRFSD_MCB ParentMcb, IN PUNICODE_STRING FileName, IN OUT PULONG Index, IN OUT PRFSD_DENTRY_HEAD rfsd_dir)
Definition: create.c:253
BOOLEAN NTAPI RfsdFastIoQueryBasicInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_BASIC_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:230
_In_ PLIST_ENTRY _In_ PSTRING _In_ USHORT _In_opt_ PSTRING _In_opt_ PSTRING _In_ ULONG _In_ ULONG Action
Definition: fsrtlfuncs.h:738
WORK_QUEUE_ITEM WorkQueueItem
Definition: rfsd.h:786
ULONG OpenHandleCount
Definition: rfsd.h:625
#define Vcb
Definition: cdprocs.h:1425
Definition: xml2sdb.h:79
NTSTATUS RfsdUnlockVolume(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: fsctl.c:268
static const UCHAR Index[8]
Definition: usbohci.c:18
BOOLEAN RfsdLoadGroup(IN PRFSD_VCB Vcb)
PRFSD_MCB RfsdSearchMcbTree(PRFSD_VCB Vcb, PRFSD_MCB RfsdMcb, PRFSD_KEY_IN_MEMORY Key)
Definition: memory.c:950
BOOLEAN RfsdGetInodeLba(IN PRFSD_VCB Vcb, IN __u32 DirectoryID, IN __u32 ParentID, OUT PLONGLONG offset)
BOOLEAN RfsdSaveInode(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN ULONG inode, IN PRFSD_INODE Inode)
NTSTATUS ExceptionCode
Definition: rfsd.h:792
RFSD_IDENTIFIER Identifier
Definition: rfsd.h:755
VOID RfsdQueueCloseRequest(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: close.c:265
ULONG RfsdUnicodeToOEMSize(IN PUNICODE_STRING Unicode)
Definition: misc.c:233
unsigned int __u32
Definition: compat.h:90
UCHAR AnsiName[CODEPAGE_MAXLEN]
Definition: rfsd.h:436
LIST_ENTRY Next
Definition: ext2fs.h:1105
PDEVICE_OBJECT DeviceObject
Definition: rfsd.h:768
ERESOURCE Resource
Definition: rfsd.h:388
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
NTSTATUS RfsdLockVcb(IN PRFSD_VCB Vcb, IN PFILE_OBJECT FileObject)
Definition: fsctl.c:104
BOOLEAN NTAPI RfsdAcquireForReadAhead(IN PVOID Context, IN BOOLEAN Wait)
Definition: cmcb.c:104
VOID RfsdFreeMcb(IN PRFSD_MCB Mcb)
Definition: memory.c:821
* PFILE_OBJECT
Definition: iotypes.h:1955
#define RFSD_BLOCK_TYPES
Definition: rfsd.h:105
VOID NTAPI RfsdDeQueueRequest(IN PVOID Context)
Definition: dispatch.c:56
struct _RFSD_FCBVCB * PRFSD_FCBVCB
struct reiserfs_cpu_key * PRFSD_KEY_IN_MEMORY
Definition: rfsd.h:42
VOID NTAPI DriverUnload(IN PDRIVER_OBJECT DriverObject)
Definition: green.c:15
#define __drv_dispatchType(x)
Definition: driverspecs.h:249
ULONG RfsdInodeTime(IN LARGE_INTEGER SysTime)
Definition: misc.c:59
FSRTL_COMMON_FCB_HEADER CommonFCBHeader
Definition: rfsd.h:463
CACHE_MANAGER_CALLBACKS CacheManagerNoOpCallbacks
Definition: rfsd.h:401
PRFSD_FCB RfsdCreateFcbFromMcb(PRFSD_VCB Vcb, PRFSD_MCB Mcb)
Definition: memory.c:867
unsigned char UCHAR
Definition: xmlstorage.h:181
BOOLEAN RfsdQueryParameters(IN PUNICODE_STRING RegistryPath)
Definition: init.c:74
BOOLEAN RfsdSaveBlock(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN ULONG dwBlk, IN PVOID Buf)
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
NTSTATUS RfsdReadSync(IN PRFSD_VCB Vcb, IN ULONGLONG Offset, IN ULONG Length, OUT PVOID Buffer, IN BOOLEAN bVerify)
PRFSD_MCB RfsdSearchMcb(PRFSD_VCB Vcb, PRFSD_MCB Parent, PUNICODE_STRING FileName)
Definition: memory.c:987
BOOLEAN NTAPI RfsdFastIoQueryNetworkOpenInfo(IN PFILE_OBJECT FileObject, IN BOOLEAN Wait, OUT PFILE_NETWORK_OPEN_INFORMATION Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
PRFSD_FCB RfsdFcb
Definition: rfsd.h:691
ULONG dwData[RFSD_BLOCK_TYPES]
Definition: rfsd.h:559
WCHAR UniName[CODEPAGE_MAXLEN]
Definition: rfsd.h:435
struct _RFSD_IDENTIFIER * PRFSD_IDENTIFIER
VOID RfsdMediaEjectControl(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN BOOLEAN bPrevent)
Definition: blockio.c:566
struct _RFSD_REPINNED_BCBS * PRFSD_REPINNED_BCBS
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
Definition: cdprocs.h:593
NTSTATUS RfsdCreate(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: create.c:1153
ULONG NumOfGroups
Definition: rfsd.h:547
PARTITION_INFORMATION PartitionInformation
Definition: rfsd.h:540
VOID NTAPI RfsdReleaseFromReadAhead(IN PVOID Context)
Definition: cmcb.c:134
Definition: typedefs.h:117
NTSTATUS RfsdFlush(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: flush.c:153
PFILE_OBJECT StreamObj
Definition: rfsd.h:566
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
ULONG RfsdProcessDirEntry(IN PRFSD_VCB Vcb, IN FILE_INFORMATION_CLASS FileInformationClass, IN __u32 Key_ParentID, IN __u32 Key_ObjectID, IN PVOID Buffer, IN ULONG UsedLength, IN ULONG Length, IN ULONG FileIndex, IN PUNICODE_STRING pName, IN BOOLEAN Single, IN PVOID pPreviousEntry)
Definition: dirctl.c:87
struct _FCB_LIST_ENTRY * PFCB_LIST_ENTRY
GLenum mode
Definition: glext.h:6217
DRIVER_DISPATCH(nfs41_FsdDispatch)
struct _RFSD_IRP_CONTEXT * PRFSD_IRP_CONTEXT
int RfsdLoadAllNls()
Definition: nls.c:123
NTSTATUS RfsdCreateFile(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb)
RFSD_IDENTIFIER Identifier
Definition: rfsd.h:820
PNOTIFY_SYNC NotifySync
Definition: rfsd.h:527
BOOLEAN RfsdLoadInode(IN PRFSD_VCB Vcb, IN PRFSD_KEY_IN_MEMORY pKey, IN OUT PRFSD_INODE Inode)
Definition: rfsd.c:253
ULONG Flags
Definition: rfsd.h:730
Definition: rfsd.h:325
Status
Definition: gdiplustypes.h:24
struct _RFSD_MCB * PRFSD_MCB
Definition: rfsd.h:343
BOOLEAN ExceptionInProgress
Definition: rfsd.h:789
__drv_mustHoldCriticalRegion NTSTATUS RfsdPnpCancelRemove(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb)
NTSTATUS RfsdNotifyChangeDirectory(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: dirctl.c:557
IN PFCB IN PFILE_OBJECT FileObject IN ULONG AllocationSize
Definition: fatprocs.h:310
UnicodeString MaximumLength
Definition: rtlfuncs.h:2982
ERESOURCE MainResource
Definition: rfsd.h:608
struct _FCB_LIST_ENTRY FCB_LIST_ENTRY
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
VOID RfsdDbgPrintComplete(IN PIRP Irp, IN BOOLEAN bPrint)
RFSD_GLOBAL RfsdGlobal
Definition: rfsd.h:456
SECTION_OBJECT_POINTERS SectionObject
Definition: rfsd.h:464
NTSTATUS NTAPI RfsdBuildRequest(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
ERESOURCE MainResource
Definition: rfsd.h:465
ERESOURCE McbResource
Definition: rfsd.h:569
BOOLEAN NTAPI RfsdFastIoCheckIfPossible(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:39
NTSTATUS RfsdUserFsRequest(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: fsctl.c:478
DRIVER_INITIALIZE DriverEntry
Definition: condrv.c:21
struct reiserfs_super_block_v1 * PRFSD_SUPER_BLOCK
Definition: rfsd.h:32
BOOLEAN NTAPI RfsdFastIoLock(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:490
PRFSD_INODE Inode
Definition: rfsd.h:638
ULONG Flags
Definition: rfsd.h:563
NTSTATUS RfsdExpandBlock(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, PRFSD_FCB Fcb, ULONG dwContent, ULONG Index, ULONG layer, BOOLEAN bNew, ULONG *dwRet)
struct LOOKASIDE_ALIGN _PAGED_LOOKASIDE_LIST PAGED_LOOKASIDE_LIST
enum _LOCK_OPERATION LOCK_OPERATION
SHARE_ACCESS ShareAccess
Definition: rfsd.h:619
VOID NTAPI RfsdNoOpRelease(IN PVOID Fcb)
Definition: cmcb.c:181
NTSTATUS RfsdTruncateFile(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, PRFSD_FCB Fcb, PLARGE_INTEGER AllocationSize)
Definition: fileinfo.c:989
unsigned short USHORT
Definition: pedump.c:61
ULONG Flags
Definition: rfsd.h:761
NTSTATUS RfsdPrepareToUnload(IN PRFSD_IRP_CONTEXT IrpContext)
LARGE_MCB DirtyMcbs
Definition: rfsd.h:572
RFSD_IDENTIFIER Identifier
Definition: rfsd.h:613
_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
NTSTATUS RfsdDeviceControl(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: devctl.c:236
NTSTATUS RfsdDeviceControlNormal(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: devctl.c:52
RFSD_KEY_COMPARISON CompareKeysWithoutOffset(IN PRFSD_KEY_IN_MEMORY a, IN PRFSD_KEY_IN_MEMORY b)
Definition: rfsd.c:2831
NTSTATUS RfsdLockUserBuffer(IN PIRP Irp, IN ULONG Length, IN LOCK_OPERATION Operation)
Definition: blockio.c:67
NTSTATUS RfsdRemoveEntry(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PRFSD_FCB Dcb, IN ULONG FileType, IN ULONG Inode)
__drv_mustHoldCriticalRegion NTSTATUS RfsdPnpQueryRemove(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb)
unsigned int * PULONG
Definition: retypes.h:1
__u32 ConvertKeyTypeUniqueness(__u32 k_uniqueness)
Definition: rfsd.c:2758
NTSTATUS RfsdOEMToUnicode(IN OUT PUNICODE_STRING Oem, IN POEM_STRING Unicode)
Definition: misc.c:195
FSRTL_COMMON_FCB_HEADER Header
Definition: rfsd.h:606
NTSTATUS RfsdCleanup(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: cleanup.c:27
ERESOURCE MainResource
Definition: rfsd.h:486
PVPB Vpb
Definition: rfsd.h:515
LIST_ENTRY Link
Definition: rfsd.h:706
ULONG BlockSize
Definition: rfsd.h:554
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN BOOLEAN ExclusiveLock
Definition: fatprocs.h:2697
short RFSD_KEY_COMPARISON
Definition: rfsd.h:55
#define IRP_MJ_LOCK_CONTROL
Definition: rdpdr.c:53
PVOID RfsdGetUserBuffer(IN PIRP Irp)
Definition: blockio.c:109
#define IRP_MJ_READ
Definition: rdpdr.c:46
NTSTATUS RfsdQueryInformation(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: fileinfo.c:35
NTSTATUS RfsdTruncateBlock(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PRFSD_FCB Fcb, IN ULONG dwContent, IN ULONG Index, IN ULONG layer, OUT BOOLEAN *bFreed)
NPAGED_LOOKASIDE_LIST RfsdFcbLookasideList
Definition: rfsd.h:415
ULONG NonCachedOpenCount
Definition: rfsd.h:632
UNICODE_STRING ShortName
Definition: rfsd.h:694
SHARE_ACCESS ShareAccess
Definition: rfsd.h:496
static USHORT RfsdStringLength(PUCHAR buffer, USHORT MaximumLength)
Definition: rfsd.h:1943
struct block_head * PRFSD_BLOCK_HEAD
Definition: rfsd.h:38
_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
BOOLEAN NTAPI RfsdFastIoUnlockAllByKey(IN PFILE_OBJECT FileObject, IN PEPROCESS Process, IN ULONG Key, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:808
VOID RfsdRemoveMcbEntry(IN PRFSD_VCB Vcb, IN LONGLONG Lba, IN LONGLONG Length)
VOID RfsdAddMcbNode(PRFSD_VCB Vcb, PRFSD_MCB Parent, PRFSD_MCB Child)
Definition: memory.c:1023
Definition: iotypes.h:166
struct _RFSD_REPINNED_BCBS * Next
Definition: rfsd.h:360
#define OUT
Definition: typedefs.h:39
ERESOURCE PagingIoResource
Definition: rfsd.h:609
ERESOURCE PagingIoResource
Definition: rfsd.h:466
NTSTATUS RfsdFileSystemControl(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: fsctl.c:1233
PRFSD_FCB RfsdAllocateFcb(IN PRFSD_VCB Vcb, IN PRFSD_MCB RfsdMcb, IN PRFSD_INODE Inode)
Definition: memory.c:383
ULONG ERESOURCE
Definition: env_spec_w32.h:594
#define IRP_MJ_SET_INFORMATION
Definition: rdpdr.c:49
unsigned int ULONG
Definition: retypes.h:1
RFSD_KEY_COMPARISON CompareKeys(IN PRFSD_KEY_IN_MEMORY a, IN PRFSD_KEY_IN_MEMORY b)
Definition: rfsd.c:2856
ULONG OpenFileHandleCount
Definition: rfsd.h:500
VOID RfsdFreeCcb(IN PRFSD_CCB Ccb)
Definition: memory.c:661
PDEVICE_OBJECT RealDevice
Definition: rfsd.h:771
PRFSD_CCB Ccb
Definition: rfsd.h:777
ULONG ChangeCount
Definition: rfsd.h:512
PRFSD_CCB RfsdAllocateCcb(VOID)
Definition: memory.c:617
_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
RFSD_KEY_VERSION DetermineOnDiskKeyFormat(const PRFSD_KEY_ON_DISK key)
Definition: rfsd.c:2743
ULONG Size
Definition: rfsd.h:337
#define IRP_MJ_WRITE
Definition: rdpdr.c:47
struct _RFSD_CCB RFSD_CCB
BOOLEAN RfsdCheckBitmapConsistency(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb)
Definition: memory.c:1208
VOID RfsdClearVpbFlag(IN PVPB Vpb, IN USHORT Flag)
Definition: fsctl.c:62
NTSTATUS NavigateToLeafNode(IN PRFSD_VCB Vcb, IN PRFSD_KEY_IN_MEMORY Key, IN ULONG StartingBlockNumber, OUT PULONG out_NextBlockNumber)
Definition: rfsd.c:2896
#define IRP_MJ_QUERY_INFORMATION
Definition: rdpdr.c:48
NTSTATUS RfsdCreateInode(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN PRFSD_FCB pParentFcb, IN ULONG Type, IN ULONG FileAttr, IN PUNICODE_STRING FileName)
struct _RFSD_IRP_CONTEXT RFSD_IRP_CONTEXT
RFSD_IDENTIFIER Identifier
Definition: rfsd.h:470
IO_STACK_LOCATION * PEXTENDED_IO_STACK_LOCATION
Definition: ext2fs.h:174
BOOLEAN RfsdCheckDismount(IN PRFSD_IRP_CONTEXT IrpContext, IN PRFSD_VCB Vcb, IN BOOLEAN bForce)
Definition: fsctl.c:1010
ULONG dwMeta[RFSD_BLOCK_TYPES]
Definition: rfsd.h:560
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204
Definition: xml2sdb.h:110
PRFSD_FCB Fcb
Definition: rfsd.h:776
NTSTATUS RfsdNewBlock(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, ULONG GroupHint, ULONG BlockHint, PULONG dwRet)
_In_ PFCB Fcb
Definition: cdprocs.h:151
PRFSD_IRP_CONTEXT RfsdAllocateIrpContext(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: memory.c:48
LIST_ENTRY NotifyList
Definition: rfsd.h:524
VOID RfsdInsertVcb(PRFSD_VCB Vcb)
Definition: memory.c:1238
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB * Dcb
Definition: create.c:4157
NTSTATUS RfsdQueryDirectory(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: dirctl.c:254
VOID RfsdFreeMcbTree(PRFSD_MCB McbTree)
Definition: memory.c:1094
struct _RFSD_ALLOC_HEADER RFSD_ALLOC_HEADER
RFSD_IDENTIFIER Identifier
Definition: rfsd.h:491
NTSTATUS RfsdWrite(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: write.c:1358
#define RFSD_REPINNED_BCBS_ARRAY_SIZE
Definition: rfsd.h:352
IN OUT PVCB IN PDEVICE_OBJECT IN PVPB Vpb
Definition: fatprocs.h:1664
NTSTATUS RfsdLockControl(IN PRFSD_IRP_CONTEXT IrpContext)
Definition: lockctl.c:26
NTSTATUS RfsdSetDispositionInfo(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, PRFSD_FCB Fcb, BOOLEAN bDelete)
Definition: fileinfo.c:1006
BOOLEAN RfsdFreeInode(PRFSD_IRP_CONTEXT IrpContext, PRFSD_VCB Vcb, ULONG Inode, ULONG Type)
BOOLEAN RfsdLoadBlock(IN PRFSD_VCB Vcb, IN ULONG dwBlk, IN PVOID Buffer)
LIST_ENTRY FcbList
Definition: rfsd.h:521
BOOLEAN RfsdGetFullFileName(PRFSD_MCB Mcb, PUNICODE_STRING FileName)
Definition: memory.c:896
BOOLEAN NTAPI RfsdFastIoWrite(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)
VOID RfsdSyncUninitializeCacheMap(IN PFILE_OBJECT FileObject)
Definition: memory.c:1650
Definition: path.c:42
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
VOID RfsdStartFloppyFlushDpc(PRFSD_VCB Vcb, PRFSD_FCB Fcb, PFILE_OBJECT FileObject)
Definition: write.c:148
IN BOOLEAN Wait
Definition: fatprocs.h:1529
ULONG ReferenceCount
Definition: rfsd.h:628
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
PVOID GroupDesc
Definition: rfsd.h:543