36 if (
Vcb->need_write && !
Vcb->readonly) {
60 WARN(
"FsRtlNotifyVolumeEvent returned %08lx\n",
Status);
64 Vcb->vde->mounted_device =
NULL;
70 if (
Vcb->open_files == 0)
88 Vcb->vde->mounted_device =
NULL;
94 if (
Vcb->open_files == 0)
106 dc->SilentInstall =
true;
136 ERR(
"out of memory\n");
141 dr->
Count = num_children;
170 static const WCHAR ids[] =
L"ROOT\\btrfs\0";
174 ERR(
"out of memory\n");
188 bool handled =
false;
243 static const WCHAR pref[] =
L"Btrfs\\";
247 noff = &
name[(
sizeof(pref) /
sizeof(
WCHAR)) - 1];
248 for (
i = 0;
i < 16;
i++) {
252 if (
i == 3 ||
i == 5 ||
i == 7 ||
i == 9) {
261 ERR(
"out of memory\n");
275 static const WCHAR ids[] =
L"BtrfsVolume\0";
279 ERR(
"out of memory\n");
295 TRACE(
"BusQueryDeviceID\n");
299 TRACE(
"BusQueryHardwareIDs\n");
306 return Irp->IoStatus.Status;
348 ERR(
"out of memory\n");
360 Irp2->UserIosb = &
context.iosb;
363 Irp2->UserEvent = &
context.Event;
373 ERR(
"IoCallDriver returned %08lx\n",
context.Status);
392 return Irp->IoStatus.Status;
395 if (!device_relations) {
396 ERR(
"out of memory\n");
400 device_relations->
Count = 1;
401 device_relations->
Objects[0] = pdo;
405 Irp->IoStatus.Information = (
ULONG_PTR)device_relations;
434 return Irp->IoStatus.Status;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define _Dispatch_type_(a)
bool has_open_children(file_ref *fileref)
NTSTATUS do_write(device_extension *Vcb, PIRP Irp)
NTSTATUS NTSTATUS bool bool void free_trees(device_extension *Vcb) __attribute__((nonnull(1)))
#define NT_SUCCESS(StatCode)
bool is_top_level(_In_ PIRP Irp)
void uninit(_In_ device_extension *Vcb)
static NTSTATUS bus_query_device_relations(PIRP Irp)
static NTSTATUS pdo_query_device_id(pdo_device_extension *pdode, PIRP Irp)
NTSTATUS pnp_surprise_removal(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static NTSTATUS bus_query_hardware_ids(PIRP Irp)
static NTSTATUS pdo_pnp(PDEVICE_OBJECT pdo, PIRP Irp)
static NTSTATUS pdo_device_usage_notification(pdo_device_extension *pdode, PIRP Irp)
static NTSTATUS pdo_query_hardware_ids(PIRP Irp)
static NTSTATUS bus_pnp(bus_device_extension *bde, PIRP Irp)
NTSTATUS pnp_query_remove_device(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static NTSTATUS bus_query_capabilities(PIRP Irp)
static NTSTATUS pdo_query_device_relations(PDEVICE_OBJECT pdo, PIRP Irp)
static NTSTATUS pdo_query_id(pdo_device_extension *pdode, PIRP Irp)
static NTSTATUS pnp_device_usage_notification(PDEVICE_OBJECT DeviceObject, PIRP Irp)
static NTSTATUS pnp_remove_device(PDEVICE_OBJECT DeviceObject)
_In_ PIO_STACK_LOCATION IrpSp
#define ExAllocatePoolWithTag(hernya, size, tag)
#define KeWaitForSingleObject(pEvt, foo, a, b, c)
struct _DEVICE_OBJECT * PDEVICE_OBJECT
#define KeInitializeEvent(pEvt, foo, foo2)
#define KeSetEvent(pEvt, foo, foo2)
#define ExAcquireResourceExclusiveLite(res, wait)
#define ExAcquireResourceSharedLite(res, wait)
#define FsRtlEnterFileSystem
#define FsRtlExitFileSystem
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
#define _Function_class_(x)
DRIVER_DISPATCH(nfs41_FsdDispatch)
#define FSRTL_VOLUME_DISMOUNT
#define IRP_MN_SURPRISE_REMOVAL
#define IoSkipCurrentIrpStackLocation(Irp)
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
NTSTATUS NTAPI FsRtlNotifyVolumeEvent(IN PFILE_OBJECT FileObject, IN ULONG EventCode)
#define IoCompleteRequest
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
VOID NTAPI IoSetTopLevelIrp(IN PIRP Irp)
#define STATUS_NOT_IMPLEMENTED
#define offsetof(TYPE, MEMBER)
#define STATUS_MORE_PROCESSING_REQUIRED
PDEVICE_OBJECT Objects[1]
struct _IO_STACK_LOCATION::@3974::@4007 UsageNotification
struct _IO_STACK_LOCATION::@3974::@4001 DeviceCapabilities
struct _IO_STACK_LOCATION::@3974::@4005 QueryId
struct _IO_STACK_LOCATION::@3974::@3999 QueryDeviceRelations
union _IO_STACK_LOCATION::@1575 Parameters
struct _LIST_ENTRY * Flink
PDEVICE_OBJECT attached_device
PDEVICE_OBJECT attached_device
#define RtlCopyMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_ACCESS_DENIED
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
#define IoAdjustPagingPathCount(_Count, _Increment)
#define IRP_MN_START_DEVICE
#define IRP_MN_DEVICE_USAGE_NOTIFICATION
#define IRP_MN_REMOVE_DEVICE
#define IRP_MN_QUERY_DEVICE_RELATIONS
#define IRP_MN_QUERY_CAPABILITIES
#define IRP_MN_CANCEL_REMOVE_DEVICE
@ DeviceUsageTypeHibernation
@ DeviceUsageTypeDumpFile
#define IRP_MN_QUERY_REMOVE_DEVICE
#define ObReferenceObject