39 UNICODE_STRING path, ignoreus, compressus, compressforceus, compresstypeus, readonlyus, zliblevelus, flushintervalus,
40 maxinlineus, subvolidus, skipbalanceus, nobarrierus, notrimus, clearcacheus, allowdegradedus, zstdlevelus,
41 norootdirus, nodatacowus;
69 ERR(
"out of memory\n");
76 path.Buffer[
i] =
'\\';
79 for (
j = 0;
j < 16;
j++) {
85 if (
j == 3 ||
j == 5 ||
j == 7 ||
j == 9) {
94 ERR(
"out of memory\n");
106 ERR(
"ZwOpenKey returned %08lx\n",
Status);
211 ERR(
"ZwEnumerateValueKey returned %08lx\n",
Status);
225 if (
options->flush_interval == 0)
254 ERR(
"out of memory\n");
261 path.Buffer[
i] =
'\\';
264 for (
j = 0;
j < 16;
j++) {
270 if (
j == 3 ||
j == 5 ||
j == 7 ||
j == 9) {
271 path.Buffer[
i] =
'-';
280 ERR(
"ZwCreateKey returned %08lx\n",
Status);
291 ERR(
"ZwSetValueKey returned %08lx\n",
Status);
312 bool has_options =
false;
320 ERR(
"out of memory\n");
328 ERR(
"ZwOpenKey returned %08lx\n",
Status);
353 ERR(
"ZwEnumerateValueKey returned %08lx\n",
Status);
363 ERR(
"ZwSetValueKey returned %08lx\n",
Status);
369 ERR(
"ZwDeleteKey returned %08lx\n",
Status);
394 ERR(
"out of memory\n");
401 path.Buffer[
i] =
'\\';
404 for (
j = 0;
j < 16;
j++) {
410 if (
j == 3 ||
j == 5 ||
j == 7 ||
j == 9) {
411 path.Buffer[
i] =
'-';
418 ERR(
"registry_mark_volume_unmounted_path returned %08lx\n",
Status);
430#define is_hex(c) ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))
438 for (
i = 0;
i < 36;
i++) {
439 if (
i == 8 ||
i == 13 ||
i == 18 ||
i == 23) {
464 ERR(
"out of memory\n");
481 ERR(
"out of memory\n");
489 ERR(
"out of memory\n");
499 ERR(
"ZwEnumerateKey returned %08lx\n",
Status);
511 ERR(
"out of memory\n");
521 WARN(
"registry_mark_volume_unmounted_path returned %08lx\n",
Status);
552 static const WCHAR mappings[] =
L"\\Mappings";
563 ERR(
"out of memory\n");
571 us.Length =
us.MaximumLength = regpath->
Length +
sizeof(mappings) -
sizeof(
WCHAR);
578 ERR(
"ZwCreateKey returned %08lx\n",
Status);
591 ERR(
"out of memory\n");
630 static const WCHAR mappings[] =
L"\\GroupMappings";
641 ERR(
"out of memory\n");
649 us.Length =
us.MaximumLength = regpath->
Length +
sizeof(mappings) -
sizeof(
WCHAR);
656 ERR(
"ZwCreateKey returned %08lx\n",
Status);
671 ERR(
"out of memory\n");
695 static const WCHAR builtin_users[] =
L"S-1-5-32-545";
712 ERR(
"ZwSetValueKey returned %08lx\n",
Status);
742 ERR(
"out of memory\n");
755 ERR(
"ZwDeleteValueKey returned %08lx\n",
Status);
760 ERR(
"ZwSetValueKey returned %08lx\n",
Status);
770 ERR(
"ZwSetValueKey returned %08lx\n",
Status);
773 ERR(
"ZwQueryValueKey returned %08lx\n",
Status);
787 static const WCHAR def_log_file[] =
L"\\??\\C:\\btrfs.log";
802 ERR(
"ZwCreateKey returned %08lx\n",
Status);
849 ERR(
"out of memory\n");
862 ERR(
"out of memory\n");
877 ERR(
"ZwDeleteValueKey returned %08lx\n",
Status);
884 ERR(
"ZwQueryValueKey returned %08lx\n",
Status);
911 if (old_log_device.
Buffer)
926 ERR(
"out of memory\n");
939 ERR(
"out of memory\n");
954 ERR(
"ZwDeleteValueKey returned %08lx\n",
Status);
959 ERR(
"ZwQueryValueKey returned %08lx\n",
Status);
965 Status = ZwSetValueKey(
h, &
us, 0,
REG_SZ, (
void*)def_log_file,
sizeof(def_log_file));
968 ERR(
"ZwSetValueKey returned %08lx\n",
Status);
972 ERR(
"ZwQueryValueKey returned %08lx\n",
Status);
981 ERR(
"out of memory\n");
1027 TRACE(
"registry changed\n");
1033 ERR(
"ZwNotifyChangeKey returned %08lx\n",
Status);
1044 ERR(
"ZwNotifyChangeKey returned %08lx\n",
Status);
#define FILE_NON_DIRECTORY_FILE
void add_user_mapping(WCHAR *sidstring, ULONG sidstringlength, uint32_t uid)
void add_group_mapping(WCHAR *sidstring, ULONG sidstringlength, uint32_t gid)
#define NT_SUCCESS(StatCode)
#define FILE_ATTRIBUTE_NORMAL
uint32_t mount_max_inline
uint32_t mount_allow_degraded
uint32_t mount_skip_balance
uint32_t mount_zlib_level
uint32_t mount_zstd_level
uint32_t mount_compress_type
uint32_t mount_no_root_dir
uint32_t mount_flush_interval
uint32_t mount_no_barrier
uint32_t mount_compress_force
uint32_t mount_clear_cache
#define BTRFS_COMPRESSION_ZSTD
NTSTATUS registry_load_volume_options(device_extension *Vcb)
static void get_registry_value(HANDLE h, WCHAR *string, ULONG type, void *val, ULONG size)
static void read_mappings(PUNICODE_STRING regpath)
UNICODE_STRING log_device
NTSTATUS registry_mark_volume_unmounted(BTRFS_UUID *uuid)
UNICODE_STRING registry_path
static NTSTATUS registry_mark_volume_unmounted_path(PUNICODE_STRING path)
static bool is_uuid(ULONG namelen, WCHAR *name)
static void reset_subkeys(HANDLE h, PUNICODE_STRING reg_path)
void watch_registry(HANDLE regh)
void read_registry(PUNICODE_STRING regpath, bool refresh)
NTSTATUS registry_mark_volume_mounted(BTRFS_UUID *uuid)
static const WCHAR option_mounted[]
static void read_group_mappings(PUNICODE_STRING regpath)
#define InsertTailList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
#define RtlCompareMemory(s1, s2, l)
#define ExAcquireResourceExclusiveLite(res, wait)
#define RemoveHeadList(ListHead)
#define InitializeListHead(ListHead)
#define FILE_WRITE_THROUGH
#define FILE_SYNCHRONOUS_IO_ALERT
NTSYSAPI NTSTATUS NTAPI ZwDeleteValueKey(__in IN HANDLE Key, __in IN PUNICODE_STRING ValueName)
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLfloat GLfloat GLfloat GLfloat h
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
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 GLint GLint j
#define OBJ_KERNEL_HANDLE
#define OBJ_CASE_INSENSITIVE
ROSDATA VSC_LPWSTR key_names[]
static PIO_STATUS_BLOCK iosb
#define InitializeObjectAttributes(p, n, a, r, s)
static ACCESS_MASK const OBJECT_ATTRIBUTES ULONG const UNICODE_STRING ULONG PULONG dispos
#define _Function_class_(x)
NTSYSAPI NTSTATUS NTAPI ZwClose(_In_ HANDLE Handle)
struct _KEY_VALUE_BASIC_INFORMATION KEY_VALUE_BASIC_INFORMATION
struct _KEY_VALUE_FULL_INFORMATION KEY_VALUE_FULL_INFORMATION
@ KeyValueBasicInformation
@ KeyValueFullInformation
struct _KEY_BASIC_INFORMATION KEY_BASIC_INFORMATION
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
#define REG_OPTION_NON_VOLATILE
#define REG_CREATED_NEW_KEY
#define KEY_ENUMERATE_SUB_KEYS
#define REG_OPENED_EXISTING_KEY
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
BOOLEAN NTAPI FsRtlAreNamesEqual(IN PCUNICODE_STRING Name1, IN PCUNICODE_STRING Name2, IN BOOLEAN IgnoreCase, IN PCWCH UpcaseTable OPTIONAL)
NTSTATUS NTAPI IoGetDeviceObjectPointer(IN PUNICODE_STRING ObjectName, IN ACCESS_MASK DesiredAccess, OUT PFILE_OBJECT *FileObject, OUT PDEVICE_OBJECT *DeviceObject)
#define STATUS_NO_MORE_ENTRIES
#define STATUS_BUFFER_TOO_SMALL
#define STATUS_BUFFER_OVERFLOW
struct _LIST_ENTRY * Flink
#define RtlCopyMemory(Destination, Source, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_INSUFFICIENT_RESOURCES
#define STATUS_OBJECT_NAME_NOT_FOUND
#define REG_NOTIFY_CHANGE_LAST_SET
#define ExInitializeWorkItem(Item, Routine, Context)
#define ObDereferenceObject
_Inout_opt_ PVOID Parameter
ZSTDLIB_API int ZSTD_maxCLevel(void)