ReactOS
0.4.15-dev-1636-gf634010
|
#include <stdlib.h>
#include <stddef.h>
#include <time.h>
#include <ntstatus.h>
#include <windef.h>
#include <winbase.h>
#include <winternl.h>
#include <devioctl.h>
#include <ntdddisk.h>
#include <ntddscsi.h>
#include <ntddstor.h>
#include <ata.h>
#include <mountmgr.h>
#include <stringapiset.h>
#include <stdbool.h>
#include "../btrfs.h"
#include "../btrfsioctl.h"
#include "../crc32c.h"
#include "../xxhash.h"
Go to the source code of this file.
Classes | |
struct | DSTRING |
struct | STREAM_MESSAGE |
struct | options |
struct | btrfs_item |
struct | btrfs_chunk |
struct | btrfs_root |
struct | btrfs_dev |
struct | TEXTOUTPUT |
struct | EXTENT_ITEM_METADATA |
struct | EXTENT_ITEM_METADATA2 |
Macros | |
#define | WIN32_NO_STATUS |
#define | SHA256_HASH_SIZE 32 |
#define | BLAKE2_HASH_SIZE 32 |
#define | FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 6, METHOD_BUFFERED, FILE_ANY_ACCESS) |
#define | FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 7, METHOD_BUFFERED, FILE_ANY_ACCESS) |
#define | FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 8, METHOD_BUFFERED, FILE_ANY_ACCESS) |
#define | DEVICE_DSM_FLAG_TRIM_NOT_FS_ALLOCATED 0x80000000 |
#define | FORMAT_FLAG_QUICK_FORMAT 0x00000001 |
#define | FORMAT_FLAG_UNKNOWN1 0x00000002 |
#define | FORMAT_FLAG_DISMOUNT_FIRST 0x00000004 |
#define | FORMAT_FLAG_UNKNOWN2 0x00000040 |
#define | FORMAT_FLAG_LARGE_RECORDS 0x00000100 |
#define | FORMAT_FLAG_INTEGRITY_DISABLE 0x00000100 |
#define | keycmp(key1, key2) |
Typedefs | |
typedef struct TEXTOUTPUT * | PTEXTOUTPUT |
typedef BOOLEAN(NTAPI * | PFMIFSCALLBACK) (CALLBACKCOMMAND Command, ULONG SubAction, PVOID ActionInfo) |
#define BLAKE2_HASH_SIZE 32 |
Definition at line 70 of file btrfslib.c.
#define DEVICE_DSM_FLAG_TRIM_NOT_FS_ALLOCATED 0x80000000 |
Definition at line 79 of file btrfslib.c.
#define FORMAT_FLAG_DISMOUNT_FIRST 0x00000004 |
Definition at line 110 of file btrfslib.c.
#define FORMAT_FLAG_INTEGRITY_DISABLE 0x00000100 |
Definition at line 113 of file btrfslib.c.
#define FORMAT_FLAG_LARGE_RECORDS 0x00000100 |
Definition at line 112 of file btrfslib.c.
#define FORMAT_FLAG_QUICK_FORMAT 0x00000001 |
Definition at line 108 of file btrfslib.c.
#define FORMAT_FLAG_UNKNOWN1 0x00000002 |
Definition at line 109 of file btrfslib.c.
#define FORMAT_FLAG_UNKNOWN2 0x00000040 |
Definition at line 111 of file btrfslib.c.
#define FSCTL_DISMOUNT_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 8, METHOD_BUFFERED, FILE_ANY_ACCESS) |
Definition at line 76 of file btrfslib.c.
#define FSCTL_LOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 6, METHOD_BUFFERED, FILE_ANY_ACCESS) |
Definition at line 74 of file btrfslib.c.
#define FSCTL_UNLOCK_VOLUME CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 7, METHOD_BUFFERED, FILE_ANY_ACCESS) |
Definition at line 75 of file btrfslib.c.
Definition at line 170 of file btrfslib.c.
#define SHA256_HASH_SIZE 32 |
Definition at line 67 of file btrfslib.c.
#define WIN32_NO_STATUS |
Definition at line 22 of file btrfslib.c.
Definition at line 239 of file btrfslib.c.
typedef struct TEXTOUTPUT * PTEXTOUTPUT |
Definition at line 219 of file btrfslib.c.
Definition at line 192 of file btrfslib.c.
|
static |
Definition at line 942 of file btrfslib.c.
Referenced by write_btrfs().
|
static |
Definition at line 394 of file btrfslib.c.
Referenced by write_btrfs().
|
static |
Definition at line 1012 of file btrfslib.c.
Referenced by set_default_subvol().
|
static |
Definition at line 905 of file btrfslib.c.
Referenced by init_fs_tree(), and set_default_subvol().
|
static |
Definition at line 341 of file btrfslib.c.
Referenced by add_block_group_items(), add_chunk(), add_dir_item(), add_inode_ref(), assign_addresses(), find_chunk_offset(), init_fs_tree(), set_default_subvol(), and write_btrfs().
|
static |
Definition at line 286 of file btrfslib.c.
Referenced by look_for_roots(), mount_vol(), and write_btrfs().
|
static |
Definition at line 509 of file btrfslib.c.
Referenced by write_btrfs().
Definition at line 237 of file blake2b-ref.c.
Referenced by calc_superblock_checksum(), calc_thread_main(), calc_tree_checksum(), check_sector_csum(), check_superblock_checksum(), check_tree_checksum(), get_sector_csum(), and get_tree_checksum().
Definition at line 126 of file sha256.c.
Referenced by calc_superblock_checksum(), calc_tree_checksum(), and check_superblock_checksum().
|
static |
Definition at line 734 of file btrfslib.c.
Referenced by write_superblocks().
|
static |
Definition at line 602 of file btrfslib.c.
Referenced by write_roots().
|
static |
Definition at line 1167 of file btrfslib.c.
Referenced by is_mounted_multi_device().
NTSTATUS WINAPI ChkdskEx | ( | PUNICODE_STRING | DriveRoot, |
BOOLEAN | FixErrors, | ||
BOOLEAN | Verbose, | ||
BOOLEAN | CheckOnlyIfDirty, | ||
BOOLEAN | ScanDrive, | ||
PFMIFSCALLBACK | Callback | ||
) |
Definition at line 248 of file btrfslib.c.
Definition at line 959 of file btrfslib.c.
Referenced by write_btrfs().
Definition at line 1590 of file btrfslib.c.
Definition at line 1306 of file btrfslib.c.
Referenced by FormatEx2().
|
static |
Definition at line 374 of file btrfslib.c.
Referenced by add_chunk().
Definition at line 1542 of file btrfslib.c.
|
static |
Definition at line 1345 of file btrfslib.c.
Referenced by FormatEx().
|
static |
Definition at line 326 of file btrfslib.c.
Referenced by write_btrfs().
|
static |
Definition at line 299 of file btrfslib.c.
Referenced by write_btrfs().
|
static |
Definition at line 481 of file btrfslib.c.
Referenced by assign_addresses().
|
static |
Definition at line 689 of file btrfslib.c.
Referenced by init_device(), and write_btrfs().
Definition at line 1583 of file btrfslib.c.
|
static |
Definition at line 708 of file btrfslib.c.
Referenced by write_btrfs().
|
static |
Definition at line 918 of file btrfslib.c.
Referenced by write_btrfs().
FORCEINLINE VOID InitializeListHead | ( | PLIST_ENTRY | ListHead | ) |
FORCEINLINE VOID InsertTailList | ( | PLIST_ENTRY | ListHead, |
PLIST_ENTRY | Entry | ||
) |
Definition at line 127 of file btrfslib.c.
Referenced by add_chunk(), add_item(), and add_root().
Definition at line 1202 of file btrfslib.c.
Referenced by FormatEx2().
Definition at line 1323 of file btrfslib.c.
Referenced by FormatEx2().
Definition at line 977 of file btrfslib.c.
Referenced by write_btrfs().
|
static |
Definition at line 1150 of file btrfslib.c.
Referenced by is_mounted_multi_device().
NTSYSCALLAPI NTSTATUS NTAPI NtFsControlFile | ( | HANDLE | FileHandle, |
HANDLE | Event, | ||
PIO_APC_ROUTINE | ApcRoutine, | ||
PVOID | ApcContext, | ||
PIO_STATUS_BLOCK | IoStatusBlock, | ||
ULONG | FsControlCode, | ||
PVOID | InputBuffer, | ||
ULONG | InputBufferLength, | ||
PVOID | OutputBuffer, | ||
ULONG | OutputBufferLength | ||
) |
Referenced by FormatEx2().
NTSTATUS NTAPI NtReadFile | ( | HANDLE | FileHandle, |
HANDLE | Event, | ||
PIO_APC_ROUTINE | ApcRoutine, | ||
PVOID | ApcContext, | ||
PIO_STATUS_BLOCK | IoStatusBlock, | ||
PVOID | Buffer, | ||
ULONG | Length, | ||
PLARGE_INTEGER | ByteOffset, | ||
PULONG | Key | ||
) |
Referenced by is_mounted_multi_device().
NTSTATUS NTAPI NtWriteFile | ( | HANDLE | FileHandle, |
HANDLE | Event, | ||
PIO_APC_ROUTINE | ApcRoutine, | ||
PVOID | ApcContext, | ||
PIO_STATUS_BLOCK | IoStatusBlock, | ||
PVOID | Buffer, | ||
ULONG | Length, | ||
PLARGE_INTEGER | ByteOffset, | ||
PULONG | Key | ||
) |
Referenced by clear_first_megabyte(), write_data(), and write_superblocks().
|
static |
Definition at line 1031 of file btrfslib.c.
Referenced by write_btrfs().
Definition at line 1579 of file btrfslib.c.
Definition at line 1575 of file btrfslib.c.
Definition at line 1567 of file btrfslib.c.
|
static |
Definition at line 460 of file btrfslib.c.
Referenced by get_next_address().
|
static |
|
static |
Definition at line 1063 of file btrfslib.c.
Referenced by FormatEx2().
|
static |
Definition at line 582 of file btrfslib.c.
Referenced by write_roots().
|
static |
Definition at line 622 of file btrfslib.c.
Referenced by write_btrfs().
|
static |
Definition at line 754 of file btrfslib.c.
Referenced by write_btrfs().
uint16_t def_csum_type = CSUM_TYPE_CRC32C |
Definition at line 182 of file btrfslib.c.
Referenced by calc_superblock_checksum(), calc_tree_checksum(), FormatEx2(), SetCsumType(), and write_superblocks().
uint64_t def_incompat_flags = BTRFS_INCOMPAT_FLAGS_EXTENDED_IREF | BTRFS_INCOMPAT_FLAGS_SKINNY_METADATA |
Definition at line 181 of file btrfslib.c.
Referenced by FormatEx2(), and SetIncompatFlags().
ULONG def_node_size = 0 |
Definition at line 180 of file btrfslib.c.
Referenced by FormatEx2(), and SetSizes().
ULONG def_sector_size = 0 |
Definition at line 180 of file btrfslib.c.
Referenced by FormatEx2(), and SetSizes().
Definition at line 179 of file btrfslib.c.