2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/fsrtl/notify.c
5 * PURPOSE: Change Notifications and Sync for File System Drivers
6 * PROGRAMMERS: Pierre Schweitzer
9 /* INCLUDES ******************************************************************/
15 /* PUBLIC FUNCTIONS **********************************************************/
18 * @name FsRtlNotifyChangeDirectory
21 * Lets FSD know if changes occures in the specified directory.
22 * Directory will be reenumerated.
25 * Synchronization object pointer
28 * Used to identify the notify structure
30 * @param FullDirectoryName
31 * String (A or W) containing the full directory name
34 * Notify list pointer (to head)
37 * True to notify changes in subdirectories too
39 * @param CompletionFilter
40 * Used to define types of changes to notify
43 * IRP pointer to complete notify operation. It can be null
47 * @remarks This function only redirects to FsRtlNotifyFullChangeDirectory.
48 * So, it's better to call the entire function.
53 FsRtlNotifyChangeDirectory(IN PNOTIFY_SYNC NotifySync
,
55 IN PSTRING FullDirectoryName
,
56 IN PLIST_ENTRY NotifyList
,
58 IN ULONG CompletionFilter
,
61 FsRtlNotifyFullChangeDirectory(NotifySync
,
74 * @name FsRtlNotifyCleanup
77 * Called by FSD when all handles to FileObject (identified by FsContext) are closed
95 FsRtlNotifyCleanup(IN PNOTIFY_SYNC NotifySync
,
96 IN PLIST_ENTRY NotifyList
,
99 KeBugCheck(FILE_SYSTEM
);
103 * @name FsRtlNotifyFilterChangeDirectory
117 * @param FullDirectoryName
123 * @param IgnoreBuffer
126 * @param CompletionFilter
132 * @param TraverseCallback
135 * @param SubjectContext
138 * @param FilterCallback
148 FsRtlNotifyFilterChangeDirectory(IN PNOTIFY_SYNC NotifySync
,
149 IN PLIST_ENTRY NotifyList
,
151 IN PSTRING FullDirectoryName
,
152 IN BOOLEAN WatchTree
,
153 IN BOOLEAN IgnoreBuffer
,
154 IN ULONG CompletionFilter
,
156 IN PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback OPTIONAL
,
157 IN PSECURITY_SUBJECT_CONTEXT SubjectContext OPTIONAL
,
158 IN PFILTER_REPORT_CHANGE FilterCallback OPTIONAL
)
160 KeBugCheck(FILE_SYSTEM
);
164 * @name FsRtlNotifyFilterReportChange
175 * @param FullTargetName
178 * @param TargetNameOffset
184 * @param NormalizedParentName
193 * @param TargetContext
196 * @param FilterContext
206 FsRtlNotifyFilterReportChange(IN PNOTIFY_SYNC NotifySync
,
207 IN PLIST_ENTRY NotifyList
,
208 IN PSTRING FullTargetName
,
209 IN USHORT TargetNameOffset
,
210 IN PSTRING StreamName OPTIONAL
,
211 IN PSTRING NormalizedParentName OPTIONAL
,
212 IN ULONG FilterMatch
,
214 IN PVOID TargetContext
,
215 IN PVOID FilterContext
)
217 KeBugCheck(FILE_SYSTEM
);
221 * @name FsRtlNotifyFullChangeDirectory
235 * @param FullDirectoryName
241 * @param IgnoreBuffer
244 * @param CompletionFilter
250 * @param TraverseCallback
253 * @param SubjectContext
263 FsRtlNotifyFullChangeDirectory(IN PNOTIFY_SYNC NotifySync
,
264 IN PLIST_ENTRY NotifyList
,
266 IN PSTRING FullDirectoryName
,
267 IN BOOLEAN WatchTree
,
268 IN BOOLEAN IgnoreBuffer
,
269 IN ULONG CompletionFilter
,
271 IN PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback OPTIONAL
,
272 IN PSECURITY_SUBJECT_CONTEXT SubjectContext OPTIONAL
)
274 KeBugCheck(FILE_SYSTEM
);
278 * @name FsRtlNotifyFullReportChange
289 * @param FullTargetName
292 * @param TargetNameOffset
298 * @param NormalizedParentName
307 * @param TargetContext
317 FsRtlNotifyFullReportChange(IN PNOTIFY_SYNC NotifySync
,
318 IN PLIST_ENTRY NotifyList
,
319 IN PSTRING FullTargetName
,
320 IN USHORT TargetNameOffset
,
321 IN PSTRING StreamName OPTIONAL
,
322 IN PSTRING NormalizedParentName OPTIONAL
,
323 IN ULONG FilterMatch
,
325 IN PVOID TargetContext
)
327 KeBugCheck(FILE_SYSTEM
);
331 * @name FsRtlNotifyInitializeSync
346 FsRtlNotifyInitializeSync(IN PNOTIFY_SYNC
*NotifySync
)
348 KeBugCheck(FILE_SYSTEM
);
352 * @name FsRtlNotifyReportChange
363 * @param FullTargetName
366 * @param FileNamePartLength
379 FsRtlNotifyReportChange(IN PNOTIFY_SYNC NotifySync
,
380 IN PLIST_ENTRY NotifyList
,
381 IN PSTRING FullTargetName
,
382 IN PUSHORT FileNamePartLength
,
383 IN ULONG FilterMatch
)
385 KeBugCheck(FILE_SYSTEM
);
389 * @name FsRtlCurrentBatchOplock
392 * Uninitialize a NOTIFY_SYNC object
395 * Address of a pointer to a PNOTIFY_SYNC object previously
396 * initialized by FsRtlNotifyInitializeSync()
405 FsRtlNotifyUninitializeSync(IN PNOTIFY_SYNC
*NotifySync
)
407 KeBugCheck(FILE_SYSTEM
);