ReactOS 0.4.16-dev-13-ge2fc578
|
#include <ntifs.h>
#include <ntddk.h>
#include <mountmgr.h>
#include <windef.h>
#include <wdm.h>
#include <stdio.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdbool.h>
#include "btrfs.h"
#include "btrfsioctl.h"
Go to the source code of this file.
#define __attribute__ | ( | x | ) |
Definition at line 1197 of file btrfs_drv.h.
#define __drv_aliasesMem |
Definition at line 203 of file btrfs_drv.h.
#define __S_IFBLK 0060000 /* Block device. */ |
Definition at line 1756 of file btrfs_drv.h.
#define __S_IFCHR 0020000 /* Character device. */ |
Definition at line 1755 of file btrfs_drv.h.
#define __S_IFDIR 0040000 /* Directory. */ |
Definition at line 1754 of file btrfs_drv.h.
#define __S_IFIFO 0010000 /* FIFO. */ |
Definition at line 1758 of file btrfs_drv.h.
#define __S_IFLNK 0120000 /* Symbolic link. */ |
Definition at line 1759 of file btrfs_drv.h.
Definition at line 1753 of file btrfs_drv.h.
#define __S_IFREG 0100000 /* Regular file. */ |
Definition at line 1757 of file btrfs_drv.h.
#define __S_IFSOCK 0140000 /* Socket. */ |
Definition at line 1760 of file btrfs_drv.h.
Definition at line 1761 of file btrfs_drv.h.
#define _CRT_SECURE_NO_WARNINGS |
Definition at line 26 of file btrfs_drv.h.
Definition at line 204 of file btrfs_drv.h.
Definition at line 205 of file btrfs_drv.h.
#define _NO_CRT_STDIO_INLINE |
Definition at line 27 of file btrfs_drv.h.
#define _WIN32_WINNT 0x0601 |
Definition at line 24 of file btrfs_drv.h.
Definition at line 1139 of file btrfs_drv.h.
#define ALLOC_TAG 0x7442484D |
Definition at line 87 of file btrfs_drv.h.
#define ALLOC_TAG_ZLIB 0x7A42484D |
Definition at line 88 of file btrfs_drv.h.
#define BALANCE_OPTS_DATA 0 |
Definition at line 693 of file btrfs_drv.h.
#define BALANCE_OPTS_METADATA 1 |
Definition at line 694 of file btrfs_drv.h.
#define BALANCE_OPTS_SYSTEM 2 |
Definition at line 695 of file btrfs_drv.h.
#define BLAKE2_HASH_SIZE 32 |
Definition at line 1252 of file btrfs_drv.h.
#define BTRFS_NODE_TYPE_CCB 0x2295 |
Definition at line 84 of file btrfs_drv.h.
#define BTRFS_NODE_TYPE_FCB 0x2296 |
Definition at line 85 of file btrfs_drv.h.
#define BTRFS_VOLUME_PREFIX L"\\Device\\Btrfs{" |
Definition at line 127 of file btrfs_drv.h.
#define CC_ENABLE_DISK_IO_ACCOUNTING 0x00000010 |
Definition at line 1845 of file btrfs_drv.h.
#define COMPRESSED_EXTENT_SIZE 0x20000 |
Definition at line 112 of file btrfs_drv.h.
#define EA_CASE_SENSITIVE "user.casesensitive" |
Definition at line 105 of file btrfs_drv.h.
#define EA_CASE_SENSITIVE_HASH 0x1a9d97d4 |
Definition at line 106 of file btrfs_drv.h.
#define EA_DOSATTRIB "user.DOSATTRIB" |
Definition at line 96 of file btrfs_drv.h.
#define EA_DOSATTRIB_HASH 0x914f9939 |
Definition at line 97 of file btrfs_drv.h.
#define EA_EA "user.EA" |
Definition at line 102 of file btrfs_drv.h.
#define EA_EA_HASH 0x8270dd43 |
Definition at line 103 of file btrfs_drv.h.
#define EA_NTACL "security.NTACL" |
Definition at line 93 of file btrfs_drv.h.
#define EA_NTACL_HASH 0x45922146 |
Definition at line 94 of file btrfs_drv.h.
#define EA_PROP_COMPRESSION "btrfs.compression" |
Definition at line 108 of file btrfs_drv.h.
#define EA_PROP_COMPRESSION_HASH 0x20ccdf69 |
Definition at line 109 of file btrfs_drv.h.
#define EA_REPARSE "user.reparse" |
Definition at line 99 of file btrfs_drv.h.
#define EA_REPARSE_HASH 0xfabad1fe |
Definition at line 100 of file btrfs_drv.h.
Definition at line 1234 of file btrfs_drv.h.
#define FILE_CS_FLAG_CASE_SENSITIVE_DIR 1 |
Definition at line 165 of file btrfs_drv.h.
#define FILE_DEVICE_ALLOW_APPCONTAINER_TRAVERSAL 0x00020000 |
Definition at line 156 of file btrfs_drv.h.
#define FILE_SUPPORTS_BLOCK_REFCOUNTING 0x08000000 |
Definition at line 148 of file btrfs_drv.h.
#define FILE_SUPPORTS_POSIX_UNLINK_RENAME 0x00000400 |
Definition at line 152 of file btrfs_drv.h.
Definition at line 137 of file btrfs_drv.h.
Definition at line 1233 of file btrfs_drv.h.
#define FSCTL_DUPLICATE_EXTENTS_TO_FILE CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 209, METHOD_BUFFERED, FILE_WRITE_ACCESS) |
Definition at line 182 of file btrfs_drv.h.
#define FSCTL_GET_INTEGRITY_INFORMATION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 159, METHOD_BUFFERED, FILE_ANY_ACCESS) |
Definition at line 198 of file btrfs_drv.h.
#define FSCTL_SET_INTEGRITY_INFORMATION CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 160, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA) |
Definition at line 199 of file btrfs_drv.h.
#define FSRTL_FCB_HEADER_V2 2 |
Definition at line 1655 of file btrfs_drv.h.
#define funcname __func__ |
Definition at line 1176 of file btrfs_drv.h.
#define GID_NOBODY 65534 |
Definition at line 91 of file btrfs_drv.h.
Definition at line 1748 of file btrfs_drv.h.
#define increase_fileref_refcount | ( | fileref | ) | InterlockedIncrement(&fileref->refcount) |
Definition at line 1739 of file btrfs_drv.h.
Definition at line 1745 of file btrfs_drv.h.
Definition at line 143 of file btrfs_drv.h.
#define IO_REPARSE_TAG_AF_UNIX 0x80000023 |
Definition at line 120 of file btrfs_drv.h.
#define IO_REPARSE_TAG_LX_BLK 0x80000026 |
Definition at line 123 of file btrfs_drv.h.
#define IO_REPARSE_TAG_LX_CHR 0x80000025 |
Definition at line 122 of file btrfs_drv.h.
#define IO_REPARSE_TAG_LX_FIFO 0x80000024 |
Definition at line 121 of file btrfs_drv.h.
#define IO_REPARSE_TAG_LX_SYMLINK 0xa000001d |
Definition at line 118 of file btrfs_drv.h.
Definition at line 1016 of file btrfs_drv.h.
#define leave |
Definition at line 138 of file btrfs_drv.h.
Definition at line 1821 of file btrfs_drv.h.
#define makedev | ( | major, | |
minor | |||
) | (((minor) & 0xFF) | (((major) & 0xFFF) << 8) | (((uint64_t)((minor) & ~0xFF)) << 12) | (((uint64_t)((major) & ~0xFFF)) << 32)) |
Definition at line 1637 of file btrfs_drv.h.
#define MAX_EXTENT_SIZE 0x8000000 |
Definition at line 111 of file btrfs_drv.h.
#define MAX_HASH_SIZE 32 |
Definition at line 213 of file btrfs_drv.h.
Definition at line 1822 of file btrfs_drv.h.
#define NTDDI_VERSION 0x06020000 |
Definition at line 25 of file btrfs_drv.h.
#define READ_AHEAD_GRANULARITY COMPRESSED_EXTENT_SIZE |
Definition at line 114 of file btrfs_drv.h.
Definition at line 1140 of file btrfs_drv.h.
Definition at line 1785 of file btrfs_drv.h.
Definition at line 1797 of file btrfs_drv.h.
#define S_IRUSR 0000400 |
Definition at line 1768 of file btrfs_drv.h.
#define S_ISDIR | ( | mode | ) | __S_ISTYPE((mode), __S_IFDIR) |
Definition at line 1764 of file btrfs_drv.h.
#define S_ISGID 0002000 |
Definition at line 1813 of file btrfs_drv.h.
#define S_ISUID 0004000 |
Definition at line 1809 of file btrfs_drv.h.
#define S_ISVTX 0001000 |
Definition at line 1817 of file btrfs_drv.h.
Definition at line 1789 of file btrfs_drv.h.
Definition at line 1801 of file btrfs_drv.h.
#define S_IWUSR 0000200 |
Definition at line 1772 of file btrfs_drv.h.
Definition at line 1793 of file btrfs_drv.h.
Definition at line 1805 of file btrfs_drv.h.
#define S_IXUSR 0000100 |
Definition at line 1776 of file btrfs_drv.h.
#define SHA256_HASH_SIZE 32 |
Definition at line 1248 of file btrfs_drv.h.
Definition at line 135 of file btrfs_drv.h.
#define UID_NOBODY 65534 |
Definition at line 90 of file btrfs_drv.h.
#define VCB_TYPE_BUS 5 |
Definition at line 691 of file btrfs_drv.h.
#define VCB_TYPE_CONTROL 2 |
Definition at line 688 of file btrfs_drv.h.
#define VCB_TYPE_FS 1 |
Definition at line 687 of file btrfs_drv.h.
#define VCB_TYPE_PDO 4 |
Definition at line 690 of file btrfs_drv.h.
#define VCB_TYPE_VOLUME 3 |
Definition at line 689 of file btrfs_drv.h.
typedef struct _device_extension device_extension |
Definition at line 1364 of file btrfs_drv.h.
typedef struct _fcb_nonpaged fcb_nonpaged |
typedef struct _FILE_ID_128 FILE_ID_128 |
typedef struct _PEB_LDR_DATA PEB_LDR_DATA |
typedef struct _FILE_ID_128 * PFILE_ID_128 |
typedef struct _PEB_LDR_DATA* PPEB_LDR_DATA |
Definition at line 1905 of file btrfs_drv.h.
typedef struct _root_cache root_cache |
typedef BOOLEAN(__stdcall * tCcCopyReadEx) (PFILE_OBJECT FileObject, PLARGE_INTEGER FileOffset, ULONG Length, BOOLEAN Wait, PVOID Buffer, PIO_STATUS_BLOCK IoStatus, PETHREAD IoIssuerThread) |
Definition at line 1841 of file btrfs_drv.h.
typedef BOOLEAN(__stdcall * tCcCopyWriteEx) (PFILE_OBJECT FileObject, PLARGE_INTEGER FileOffset, ULONG Length, BOOLEAN Wait, PVOID Buffer, PETHREAD IoIssuerThread) |
Definition at line 1838 of file btrfs_drv.h.
typedef VOID(__stdcall * tCcSetAdditionalCacheAttributesEx) (PFILE_OBJECT FileObject, ULONG Flags) |
Definition at line 1853 of file btrfs_drv.h.
typedef BOOLEAN(__stdcall * tFsRtlAreThereCurrentOrInProgressFileLocks) (PFILE_LOCK FileLock) |
Definition at line 1868 of file btrfs_drv.h.
typedef BOOLEAN(__stdcall * tFsRtlCheckLockForOplockRequest) (PFILE_LOCK FileLock, PLARGE_INTEGER AllocationSize) |
Definition at line 1866 of file btrfs_drv.h.
Definition at line 1859 of file btrfs_drv.h.
typedef NTSTATUS(__stdcall * tFsRtlGetNextExtraCreateParameter) (PECP_LIST EcpList, PVOID CurrentEcpContext, LPGUID NextEcpType, PVOID *NextEcpContext, ULONG *NextEcpContextSize) |
Definition at line 1861 of file btrfs_drv.h.
Definition at line 1855 of file btrfs_drv.h.
typedef NTSTATUS(__stdcall * tFsRtlValidateReparsePointBuffer) (ULONG BufferLength, PREPARSE_DATA_BUFFER ReparseBuffer) |
Definition at line 1864 of file btrfs_drv.h.
typedef NTSTATUS(__stdcall * tIoUnregisterPlugPlayNotificationEx) (PVOID NotificationEntry) |
Definition at line 1857 of file btrfs_drv.h.
Definition at line 1833 of file btrfs_drv.h.
typedef VOID(__stdcall * tPsUpdateDiskCounters) (PEPROCESS Process, ULONG64 BytesRead, ULONG64 BytesWritten, ULONG ReadOperationCount, ULONG WriteOperationCount, ULONG FlushOperationCount) |
Definition at line 1835 of file btrfs_drv.h.
typedef struct _tree_data tree_data |
Definition at line 1131 of file btrfs_drv.h.
Definition at line 470 of file btrfs_drv.h.
Definition at line 627 of file btrfs_drv.h.
Enumerator | |
---|---|
PropCompression_None | |
PropCompression_Zlib | |
PropCompression_LZO | |
PropCompression_ZSTD |
Definition at line 267 of file btrfs_drv.h.
Enumerator | |
---|---|
ROLLBACK_INSERT_EXTENT | |
ROLLBACK_DELETE_EXTENT | |
ROLLBACK_ADD_SPACE | |
ROLLBACK_SUBTRACT_SPACE |
Definition at line 1267 of file btrfs_drv.h.
Enumerator | |
---|---|
WriteDataStatus_Pending | |
WriteDataStatus_Success | |
WriteDataStatus_Error | |
WriteDataStatus_Cancelling | |
WriteDataStatus_Cancelled | |
WriteDataStatus_Ignore |
Definition at line 914 of file btrfs_drv.h.
IN PIRP Irp __attribute__ | ( | (nonnull(1, 2)) | ) |
Definition at line 2730 of file read.c.
_In_ fcb _In_ chunk _In_ uint64_t _In_ uint64_t _In_ bool _In_opt_ void _In_opt_ PIRP _In_ LIST_ENTRY _In_ uint8_t _In_ uint64_t _In_ bool _In_ uint64_t irp_offset __attribute__ | ( | (nonnull(1, 2, 3, 9)) | ) |
_Create_lock_level_ | ( | tree_lock | ) |
_Dispatch_type_ | ( | IRP_MJ_CREATE | ) |
_Dispatch_type_ | ( | IRP_MJ_DEVICE_CONTROL | ) |
Definition at line 1385 of file isapnp.c.
_Dispatch_type_ | ( | IRP_MJ_PNP | ) |
Definition at line 377 of file isapnp.c.
_Dispatch_type_ | ( | IRP_MJ_QUERY_EA | ) |
_Dispatch_type_ | ( | IRP_MJ_QUERY_INFORMATION | ) |
_Dispatch_type_ | ( | IRP_MJ_QUERY_SECURITY | ) |
_Dispatch_type_ | ( | IRP_MJ_READ | ) |
_Dispatch_type_ | ( | IRP_MJ_SET_EA | ) |
_Dispatch_type_ | ( | IRP_MJ_SET_INFORMATION | ) |
_Dispatch_type_ | ( | IRP_MJ_SET_SECURITY | ) |
_Dispatch_type_ | ( | IRP_MJ_WRITE | ) |
_Function_class_ | ( | DRIVER_ADD_DEVICE | ) |
_Function_class_ | ( | DRIVER_NOTIFICATION_CALLBACK_ROUTINE | ) |
_Function_class_ | ( | KSTART_ROUTINE | ) |
Definition at line 3047 of file balance.c.
_Post_satisfies_ | ( | return >= | n | ) |
_Releases_lock_ | ( | c-> | lock | ) |
|
pure virtual |
_Requires_lock_held_ | ( | Vcb-> | fcb_lock | ) | -> fcb_lock) static __inline void release_fcb_lock(device_extension* Vcb) |
Definition at line 971 of file btrfs_drv.h.
_Requires_lock_not_held_ | ( | Vcb-> | fcb_lock | ) | -> fcb_lock) static __inline void acquire_fcb_lock_shared(device_extension* Vcb) |
Definition at line 959 of file btrfs_drv.h.
_Success_ | ( | return | ) |
NTSTATUS add_calc_job_comp | ( | device_extension * | Vcb, |
uint8_t | compression, | ||
void * | in, | ||
unsigned int | inlen, | ||
void * | out, | ||
unsigned int | outlen, | ||
calc_job ** | pcj | ||
) |
Definition at line 237 of file calcthread.c.
Referenced by write_compressed().
NTSTATUS add_calc_job_decomp | ( | device_extension * | Vcb, |
uint8_t | compression, | ||
void * | in, | ||
unsigned int | inlen, | ||
void * | out, | ||
unsigned int | outlen, | ||
unsigned int | off, | ||
calc_job ** | pcj | ||
) |
Definition at line 183 of file calcthread.c.
void add_changed_extent_ref | ( | chunk * | c, |
uint64_t | address, | ||
uint64_t | size, | ||
uint64_t | root, | ||
uint64_t | objid, | ||
uint64_t | offset, | ||
uint32_t | count, | ||
bool | no_csum | ||
) |
Definition at line 2076 of file extent-tree.c.
Referenced by insert_extent_chunk(), rationalize_extents(), and write_compressed().
void add_checksum_entry | ( | device_extension * | Vcb, |
uint64_t | address, | ||
ULONG | length, | ||
void * | csum, | ||
PIRP | Irp | ||
) |
Definition at line 2602 of file flushthread.c.
Referenced by balance_data_chunk(), decrease_extent_refcount(), flush_fcb(), and rationalize_extents().
NTSTATUS add_dir_child | ( | fcb * | fcb, |
uint64_t | inode, | ||
bool | subvol, | ||
PANSI_STRING | utf8, | ||
PUNICODE_STRING | name, | ||
uint8_t | type, | ||
dir_child ** | pdc | ||
) |
Definition at line 1871 of file create.c.
Referenced by create_subvol(), do_create_snapshot(), file_create2(), mknod(), and set_link_information().
NTSTATUS bool void NTSTATUS void add_extent | ( | _In_ fcb * | fcb, |
_In_ LIST_ENTRY * | prevextle, | ||
_In_ __drv_aliasesMem extent * | newext | ||
) |
Referenced by __attribute__(), and duplicate_extents().
NTSTATUS bool void NTSTATUS add_extent_to_fcb | ( | _In_ fcb * | fcb, |
_In_ uint64_t | offset, | ||
_In_reads_bytes_(edsize) EXTENT_DATA * | ed, | ||
_In_ uint16_t | edsize, | ||
_In_ bool | unique, | ||
_In_opt_ _When_(return >=0, __drv_aliasesMem) void * | csum, | ||
_In_ LIST_ENTRY * | rollback | ||
) |
Referenced by __attribute__(), duplicate_extents(), insert_extent_chunk(), rename_stream_to_file(), write_compressed(), and zero_data().
void add_fcb_to_subvol | ( | _In_ _Requires_exclusive_lock_held_(_Curr_->Vcb->fcb_lock) fcb * | fcb | ) |
Definition at line 888 of file fileinfo.c.
Referenced by allocate_cache_chunk(), create_directory_fcb(), create_subvol(), mknod(), move_across_subvols(), rename_stream(), and rename_stream_to_file().
Definition at line 145 of file security.c.
Referenced by read_group_mappings().
void void void add_rollback | ( | _In_ LIST_ENTRY * | rollback, |
_In_ enum rollback_type | type, | ||
_In_ __drv_aliasesMem void * | ptr | ||
) |
Referenced by add_rollback_space().
NTSTATUS add_space_entry | ( | LIST_ENTRY * | list, |
LIST_ENTRY * | list_size, | ||
uint64_t | offset, | ||
uint64_t | size | ||
) |
Definition at line 190 of file free-space.c.
Referenced by add_device(), find_disk_holes(), load_free_space_bitmap(), load_stored_free_space_cache(), and load_stored_free_space_tree().
bool add_thread_job | ( | device_extension * | Vcb, |
PIRP | Irp | ||
) |
Definition at line 109 of file worker-thread.c.