24#define FileIdExtdDirectoryInformation (enum _FILE_INFORMATION_CLASS)60
25#define FileIdExtdBothDirectoryInformation (enum _FILE_INFORMATION_CLASS)63
65#define FileIdExtdDirectoryInformation (enum _FILE_INFORMATION_CLASS)60
66#define FileIdExtdBothDirectoryInformation (enum _FILE_INFORMATION_CLASS)63
99 ERR(
"read_file returned %08lx\n",
Status);
133 ERR(
"open_fcb returned %08lx\n",
Status);
159 WARN(
"IoCheckEaBufferValidity returned %08lx (error at offset %lu)\n",
Status,
offset);
201 le =
fcb->
Vcb->roots.Flink;
202 while (le != &
fcb->
Vcb->roots) {
228 ii =
fcb->
Vcb->dummy_fcb->inode_item;
230 ealen =
fcb->
Vcb->dummy_fcb->ealen;
251 searchkey.
offset = 0xffffffffffffffff;
255 ERR(
"error - find_item returned %08lx\n",
Status);
260 ERR(
"could not find inode item for inode %I64x in root %I64x\n",
inode,
r->id);
305 if (fileref && fileref->
parent) {
306 ii = fileref->
parent->fcb->inode_item;
307 r = fileref->
parent->fcb->subvol;
310 ealen = fileref->
parent->fcb->ealen;
327 TRACE(
"FileBothDirectoryInformation\n");
332 TRACE(
"buffer overflow - %li > %lu\n", needed, *
len);
367 TRACE(
"FileDirectoryInformation\n");
372 TRACE(
"buffer overflow - %li > %lu\n", needed, *
len);
405 TRACE(
"FileFullDirectoryInformation\n");
410 TRACE(
"buffer overflow - %li > %lu\n", needed, *
len);
444 TRACE(
"FileIdBothDirectoryInformation\n");
449 TRACE(
"buffer overflow - %li > %lu\n", needed, *
len);
485 TRACE(
"FileIdFullDirectoryInformation\n");
490 TRACE(
"buffer overflow - %li > %lu\n", needed, *
len);
522#pragma GCC diagnostic push
523#pragma GCC diagnostic ignored "-Wswitch"
525#if (NTDDI_VERSION >= NTDDI_VISTA)
530 TRACE(
"FileIdExtdDirectoryInformation\n");
535 TRACE(
"buffer overflow - %li > %lu\n", needed, *
len);
573 TRACE(
"FileIdExtdBothDirectoryInformation\n");
578 TRACE(
"buffer overflow - %li > %lu\n", needed, *
len);
616#pragma GCC diagnostic pop
623 TRACE(
"FileNamesInformation\n");
628 TRACE(
"buffer overflow - %li > %lu\n", needed, *
len);
680 }
else if (*
offset == 1) {
718 if (
dc->root_dir && fileref->
parent) {
748 bool has_wildcard =
false, specific_file =
false, initial;
753 TRACE(
"query directory\n");
764 ERR(
"ccb was NULL\n");
769 ERR(
"fcb was NULL\n");
774 WARN(
"insufficient privileges\n");
781 ERR(
"Vcb was NULL\n");
785 if (fileref->
fcb ==
Vcb->dummy_fcb)
789 TRACE(
"QD flags: (none)\n");
793 TRACE(
"QD flags:\n");
796 TRACE(
" SL_INDEX_SPECIFIED\n");
797 flags &= ~SL_INDEX_SPECIFIED;
801 TRACE(
" SL_RESTART_SCAN\n");
802 flags &= ~SL_RESTART_SCAN;
806 TRACE(
" SL_RETURN_SINGLE_ENTRY\n");
807 flags &= ~SL_RETURN_SINGLE_ENTRY;
832 specific_file =
true;
836 specific_file =
false;
849 ERR(
"out of memory\n");
893 if (
Irp->MdlAddress && !
buf) {
894 ERR(
"MmGetSystemAddressForMdlSafe returned NULL\n");
913 ERR(
"RtlUpcaseUnicodeString returned %08lx\n",
Status);
980 }
else if (has_wildcard) {
1008#pragma GCC diagnostic push
1009#pragma GCC diagnostic ignored "-Wswitch"
1021#pragma GCC diagnostic pop
1049 *lastoffset = (
ULONG)(curitem - lastitem);
1088 TRACE(
"IRP_MN_NOTIFY_CHANGE_DIRECTORY\n");
1091 ERR(
"ccb was NULL\n");
1096 ERR(
"no fileref\n");
1101 WARN(
"insufficient privileges\n");
1126 ERR(
"out of memory\n");
1135 ERR(
"fileref_get_filename returned %08lx\n",
Status);
1139 ERR(
"fileref_get_filename returned %08lx\n",
Status);
1168 TRACE(
"directory control\n");
1182 Irp->IoStatus.Information = 0;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
unsigned short int uint16_t
struct _FILE_ID_EXTD_DIR_INFORMATION * PFILE_ID_EXTD_DIR_INFORMATION
struct _FILE_ID_EXTD_DIR_INFORMATION FILE_ID_EXTD_DIR_INFORMATION
static NTSTATUS query_dir_item(fcb *fcb, ccb *ccb, void *buf, LONG *len, PIRP Irp, dir_entry *de, root *r)
#define FileIdExtdDirectoryInformation
ULONG get_reparse_tag_fcb(fcb *fcb)
static NTSTATUS next_dir_entry(file_ref *fileref, uint64_t *offset, dir_entry *de, dir_child **pdc)
static ULONG get_ea_len(device_extension *Vcb, root *subvol, uint64_t inode, PIRP Irp)
struct _FILE_ID_EXTD_BOTH_DIR_INFORMATION * PFILE_ID_EXTD_BOTH_DIR_INFORMATION
static NTSTATUS query_directory(PIRP Irp)
static NTSTATUS notify_change_directory(device_extension *Vcb, PIRP Irp)
struct _FILE_ID_EXTD_BOTH_DIR_INFORMATION FILE_ID_EXTD_BOTH_DIR_INFORMATION
ULONG get_reparse_tag(device_extension *Vcb, root *subvol, uint64_t inode, uint8_t type, ULONG atts, bool lxss, PIRP Irp)
#define FileIdExtdBothDirectoryInformation
NTSTATUS read_file(fcb *fcb, uint8_t *data, uint64_t start, uint64_t length, ULONG *pbr, PIRP Irp) __attribute__((nonnull(1
#define _Dispatch_type_(a)
#define IO_REPARSE_TAG_AF_UNIX
static __inline void win_time_to_unix(LARGE_INTEGER t, BTRFS_TIME *out)
static __inline uint64_t make_file_id(root *r, uint64_t inode)
_In_ uint16_t _Out_ ULONG * atts
NTSTATUS open_fcb(_Requires_lock_held_(_Curr_->tree_lock) _Requires_exclusive_lock_held_(_Curr_->fcb_lock) device_extension *Vcb, root *subvol, uint64_t inode, uint8_t type, PANSI_STRING utf8, bool always_add_hl, fcb *parent, fcb **pfcb, POOL_TYPE pooltype, PIRP Irp)
#define IO_REPARSE_TAG_LX_CHR
#define IO_REPARSE_TAG_LX_BLK
NTSTATUS fileref_get_filename(file_ref *fileref, PUNICODE_STRING fn, USHORT *name_offset, ULONG *preqlen)
#define IO_REPARSE_TAG_LX_FIFO
static __inline void * map_user_buffer(PIRP Irp, ULONG priority)
#define STATUS_NOT_IMPLEMENTED
#define NT_SUCCESS(StatCode)
#define FILE_ATTRIBUTE_NORMAL
static LONG find_item(PropertyBag *This, LPCOLESTR name)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
_In_ uint64_t _In_ uint64_t _In_ uint64_t _In_opt_ traverse_ptr * tp
void free_fcb(_Inout_ fcb *fcb)
ULONG get_file_attributes(_In_ _Requires_lock_held_(_Curr_->tree_lock) device_extension *Vcb, _In_ root *r, _In_ uint64_t inode, _In_ uint8_t type, _In_ bool dotfile, _In_ bool ignore_xa, _In_opt_ PIRP Irp)
bool is_top_level(_In_ PIRP Irp)
_In_ PIO_STACK_LOCATION IrpSp
#define ExAllocatePoolWithTag(hernya, size, tag)
#define RtlCompareMemory(s1, s2, l)
NTSTATUS RtlUpcaseUnicodeString(PUNICODE_STRING dst, PUNICODE_STRING src, BOOLEAN Alloc)
#define KeQuerySystemTime(t)
#define ExAcquireResourceExclusiveLite(res, wait)
#define ExAcquireResourceSharedLite(res, wait)
@ FileDirectoryInformation
@ FileIdBothDirectoryInformation
@ FileFullDirectoryInformation
@ FileBothDirectoryInformation
@ FileIdFullDirectoryInformation
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLdouble GLdouble GLdouble r
GLenum GLuint GLenum GLsizei const GLchar * buf
GLuint GLsizei GLsizei * length
#define _Function_class_(x)
DRIVER_DISPATCH(nfs41_FsdDispatch)
#define FILE_LIST_DIRECTORY
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define FILE_ATTRIBUTE_SPARSE_FILE
#define FILE_ATTRIBUTE_REPARSE_POINT
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
BOOLEAN NTAPI FsRtlIsNameInExpression(IN PUNICODE_STRING Expression, IN PUNICODE_STRING Name, IN BOOLEAN IgnoreCase, IN PWCHAR UpcaseTable OPTIONAL)
BOOLEAN NTAPI FsRtlDoesNameContainWildCards(IN PUNICODE_STRING Name)
VOID NTAPI FsRtlNotifyFilterChangeDirectory(IN PNOTIFY_SYNC NotifySync, IN PLIST_ENTRY NotifyList, IN PVOID FsContext, IN PSTRING FullDirectoryName, IN BOOLEAN WatchTree, IN BOOLEAN IgnoreBuffer, IN ULONG CompletionFilter, IN PIRP NotifyIrp, IN PCHECK_FOR_TRAVERSE_ACCESS TraverseCallback OPTIONAL, IN PSECURITY_SUBJECT_CONTEXT SubjectContext OPTIONAL, IN PFILTER_REPORT_CHANGE FilterCallback OPTIONAL)
#define IoCompleteRequest
VOID NTAPI IoSetTopLevelIrp(IN PIRP Irp)
NTSTATUS NTAPI IoCheckEaBufferValidity(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
#define STATUS_INTERNAL_ERROR
#define SUBVOL_ROOT_INODE
static unsigned __int64 next
#define IRP_MJ_DIRECTORY_CONTROL
#define IRP_MN_QUERY_DIRECTORY
#define IRP_MN_NOTIFY_CHANGE_DIRECTORY
static __inline uint64_t unix_time_to_win(BTRFS_TIME *t)
#define offsetof(TYPE, MEMBER)
#define BTRFS_TYPE_DIRECTORY
#define BTRFS_TYPE_SOCKET
#define BTRFS_TYPE_SYMLINK
#define STATUS_BUFFER_OVERFLOW
#define BTRFS_TYPE_CHARDEV
#define BTRFS_TYPE_BLOCKDEV
struct _IO_STACK_LOCATION::@3974::@3981 NotifyDirectory
union _IO_STACK_LOCATION::@1575 Parameters
struct _IO_STACK_LOCATION::@3974::@3980 QueryDirectory
struct _LIST_ENTRY * Flink
uint64_t query_dir_offset
UNICODE_STRING query_string
LIST_ENTRY dir_children_index
LIST_ENTRY dir_children_hash
LIST_ENTRY ** hash_ptrs_uc
struct _device_extension * Vcb
LIST_ENTRY dir_children_hash_uc
ANSI_STRING reparse_xattr
struct _fcb_nonpaged * nonpaged
FSRTL_ADVANCED_FCB_HEADER Header
struct _file_ref * parent
struct _file_ref * fileref
LIST_ENTRY list_entry_index
enum DirEntryType dir_entry_type
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INVALID_DEVICE_REQUEST
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_NO_SUCH_FILE
#define STATUS_INSUFFICIENT_RESOURCES
#define STATUS_NO_MORE_FILES
_In_ PDEVICE_OBJECT DeviceObject
_In_ WDFREQUEST _In_ WDFFILEOBJECT FileObject
#define SL_INDEX_SPECIFIED
#define SL_RETURN_SINGLE_ENTRY
#define IO_DISK_INCREMENT
#define IO_REPARSE_TAG_SYMLINK