ReactOS 0.4.17-dev-1190-g4c812f4
volinfo.c
Go to the documentation of this file.
1/*
2 * ReactOS kernel
3 * Copyright (C) 2002, 2014 ReactOS Team
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
18 *
19 * COPYRIGHT: See COPYING in the top level directory
20 * PROJECT: ReactOS kernel
21 * FILE: drivers/filesystem/ntfs/volume.c
22 * PURPOSE: NTFS filesystem driver
23 * PROGRAMMERS: Eric Kohl
24 * Pierre Schweitzer (pierre@reactos.org)
25 */
26
27/* INCLUDES *****************************************************************/
28
29#include "ntfs.h"
30
31#define NDEBUG
32#include <debug.h>
33
34/* FUNCTIONS ****************************************************************/
35
50 _In_ PDEVICE_EXTENSION DeviceExt)
51{
52 PFILE_RECORD_HEADER BitmapRecord;
53 ULONGLONG BitmapSize;
56
57 BitmapRecord = ExAllocateFromNPagedLookasideList(&DeviceExt->FileRecLookasideList);
58 if (BitmapRecord == NULL)
60
61 Status = ReadFileRecord(DeviceExt, NTFS_FILE_BITMAP, BitmapRecord);
62 if (NT_SUCCESS(Status))
63 {
64 /* The context keeps its own copy of the attribute record */
65 Status = FindAttribute(DeviceExt, BitmapRecord, AttributeData, L"", 0, &DeviceExt->BitmapContext, NULL);
66 }
67
68 ExFreeToNPagedLookasideList(&DeviceExt->FileRecLookasideList, BitmapRecord);
69
70 if (!NT_SUCCESS(Status))
71 {
72 DPRINT1("Unable to find $Bitmap (Status %lx)\n", Status);
73 DeviceExt->BitmapContext = NULL;
74 return Status;
75 }
76
77 BitmapSize = AttributeDataLength(DeviceExt->BitmapContext->pRecord);
78 if (BitmapSize > MAXULONG ||
79 BitmapSize * 8 < DeviceExt->NtfsInfo.ClusterCount ||
80 DeviceExt->NtfsInfo.ClusterCount > MAXULONG)
81 {
82 DPRINT1("$Bitmap size %I64u does not cover %I64u clusters\n",
83 BitmapSize, DeviceExt->NtfsInfo.ClusterCount);
85 goto Fail;
86 }
87
88 /* Whole sectors, so write back never reads first */
89 BufferSize = ROUND_UP((ULONG)BitmapSize, DeviceExt->NtfsInfo.BytesPerSector);
90 DeviceExt->BitmapBuffer = ExAllocatePoolWithTag(PagedPool, BufferSize, TAG_NTFS);
91 if (DeviceExt->BitmapBuffer == NULL)
92 {
94 goto Fail;
95 }
96 RtlZeroMemory(DeviceExt->BitmapBuffer, BufferSize);
97
98 if (ReadAttribute(DeviceExt, DeviceExt->BitmapContext, 0, (PCHAR)DeviceExt->BitmapBuffer, (ULONG)BitmapSize) != (ULONG)BitmapSize)
99 {
100 DPRINT1("Unable to read $Bitmap\n");
102 goto Fail;
103 }
104
105 DeviceExt->BitmapSize = (ULONG)BitmapSize;
106
107 /* $Bitmap is rounded up to a cluster and covers a few clusters more than
108 * the volume has. Bounding by ClusterCount ignores the surplus bits, but
109 * write back still preserves them on disk. */
110 RtlInitializeBitMap(&DeviceExt->ClusterBitmap, DeviceExt->BitmapBuffer, (ULONG)DeviceExt->NtfsInfo.ClusterCount);
111 DeviceExt->FreeClusterCount = RtlNumberOfClearBits(&DeviceExt->ClusterBitmap);
112
113 DPRINT("Volume bitmap loaded: %I64u of %I64u clusters free\n",
114 DeviceExt->FreeClusterCount, DeviceExt->NtfsInfo.ClusterCount);
115
116 return STATUS_SUCCESS;
117
118Fail:
119 NtfsFreeVolumeBitmap(DeviceExt);
120 return Status;
121}
122
131VOID
133 _In_ PDEVICE_EXTENSION DeviceExt)
134{
135 if (DeviceExt->BitmapBuffer != NULL)
136 {
137 ExFreePoolWithTag(DeviceExt->BitmapBuffer, TAG_NTFS);
138 DeviceExt->BitmapBuffer = NULL;
139 }
140
141 if (DeviceExt->BitmapContext != NULL)
142 {
143 ReleaseAttributeContext(DeviceExt->BitmapContext);
144 DeviceExt->BitmapContext = NULL;
145 }
146}
147
168 _In_ PDEVICE_EXTENSION DeviceExt,
169 _In_ ULONG FirstCluster,
170 _In_ ULONG ClusterCount)
171{
172 ULONG SectorSize = DeviceExt->NtfsInfo.BytesPerSector;
173 ULONG Start;
174 ULONG End;
175 ULONG LengthWritten;
176
177 ASSERT(ClusterCount != 0);
178
179 Start = ROUND_DOWN(FirstCluster / 8, SectorSize);
180 End = ROUND_UP((FirstCluster + ClusterCount - 1) / 8 + 1, SectorSize);
181 End = min(End, ROUND_UP(DeviceExt->BitmapSize, SectorSize));
182
183 return WriteAttribute(DeviceExt,
184 DeviceExt->BitmapContext,
185 Start,
186 (PUCHAR)DeviceExt->BitmapBuffer + Start,
187 End - Start,
188 &LengthWritten,
189 NULL);
190}
191
194{
196
197 DPRINT("NtfsGetFreeClusters(%p)\n", DeviceExt);
198
200 ExAcquireResourceSharedLite(&DeviceExt->BitmapResource, TRUE);
201 FreeClusters = DeviceExt->FreeClusterCount;
202 ExReleaseResourceLite(&DeviceExt->BitmapResource);
204
205 return FreeClusters;
206}
207
214 ULONG FirstDesiredCluster,
215 ULONG DesiredClusters,
216 PULONG FirstAssignedCluster,
217 PULONG AssignedClusters)
218{
220 PRTL_BITMAP Bitmap = &DeviceExt->ClusterBitmap;
221 ULONG AssignedRun;
222
223 DPRINT("NtfsAllocateClusters(%p, %lu, %lu, %p, %p)\n", DeviceExt, FirstDesiredCluster, DesiredClusters, FirstAssignedCluster, AssignedClusters);
224
225 *AssignedClusters = 0;
226
227 /* Files growing in parallel must not both claim the same free run */
229 ExAcquireResourceExclusiveLite(&DeviceExt->BitmapResource, TRUE);
230
231 if (DeviceExt->FreeClusterCount < DesiredClusters)
232 {
234 goto Quit;
235 }
236
237 /* The hint is just past the file's last cluster, which can be past the volume end */
238 if (FirstDesiredCluster >= Bitmap->SizeOfBitMap)
239 FirstDesiredCluster = 0;
240
241 // TODO: Observe MFT reservation zone
242
243 // Can we get one contiguous run?
244 AssignedRun = RtlFindClearBitsAndSet(Bitmap, DesiredClusters, FirstDesiredCluster);
245
246 if (AssignedRun != 0xFFFFFFFF)
247 {
248 *FirstAssignedCluster = AssignedRun;
249 *AssignedClusters = DesiredClusters;
250 }
251 else
252 {
253 // we can't get one contiguous run
254 *AssignedClusters = RtlFindNextForwardRunClear(Bitmap, FirstDesiredCluster, FirstAssignedCluster);
255
256 if (*AssignedClusters == 0)
257 {
258 // we couldn't find any runs starting at DesiredFirstCluster
259 *AssignedClusters = RtlFindLongestRunClear(Bitmap, FirstAssignedCluster);
260 }
261
262 if (*AssignedClusters == 0)
263 {
265 goto Quit;
266 }
267
268 /* Hand out no more than was asked for, and mark it in use */
269 *AssignedClusters = min(*AssignedClusters, DesiredClusters);
270 RtlSetBits(Bitmap, *FirstAssignedCluster, *AssignedClusters);
271 }
272
273 Status = NtfsWriteVolumeBitmap(DeviceExt, *FirstAssignedCluster, *AssignedClusters);
274 if (NT_SUCCESS(Status))
275 {
276 DeviceExt->FreeClusterCount -= *AssignedClusters;
277 }
278 else
279 {
280 /* Keep the copy in step with what the disk says */
281 RtlClearBits(Bitmap, *FirstAssignedCluster, *AssignedClusters);
282 *AssignedClusters = 0;
283 }
284
285Quit:
286 ExReleaseResourceLite(&DeviceExt->BitmapResource);
288
289 return Status;
290}
291
292static
297{
298 DPRINT("NtfsGetFsVolumeInformation() called\n");
299 DPRINT("FsVolumeInfo = %p\n", FsVolumeInfo);
300 DPRINT("BufferLength %lu\n", *BufferLength);
301
302 DPRINT("Vpb %p\n", DeviceObject->Vpb);
303
304 DPRINT("Required length %lu\n",
305 sizeof(FILE_FS_VOLUME_INFORMATION) + DeviceObject->Vpb->VolumeLabelLength);
306 DPRINT("LabelLength %hu\n",
307 DeviceObject->Vpb->VolumeLabelLength);
308 DPRINT("Label %.*S\n",
309 DeviceObject->Vpb->VolumeLabelLength / sizeof(WCHAR),
310 DeviceObject->Vpb->VolumeLabel);
311
314
315 if (*BufferLength < (sizeof(FILE_FS_VOLUME_INFORMATION) + DeviceObject->Vpb->VolumeLabelLength))
317
318 /* valid entries */
319 FsVolumeInfo->VolumeSerialNumber = DeviceObject->Vpb->SerialNumber;
320 FsVolumeInfo->VolumeLabelLength = DeviceObject->Vpb->VolumeLabelLength;
321 memcpy(FsVolumeInfo->VolumeLabel,
322 DeviceObject->Vpb->VolumeLabel,
323 DeviceObject->Vpb->VolumeLabelLength);
324
325 /* dummy entries */
326 FsVolumeInfo->VolumeCreationTime.QuadPart = 0;
327 FsVolumeInfo->SupportsObjects = FALSE;
328
329 *BufferLength -= (sizeof(FILE_FS_VOLUME_INFORMATION) + DeviceObject->Vpb->VolumeLabelLength);
330
331 DPRINT("BufferLength %lu\n", *BufferLength);
332 DPRINT("NtfsGetFsVolumeInformation() done\n");
333
334 return STATUS_SUCCESS;
335}
336
337
338static
341 PFILE_FS_ATTRIBUTE_INFORMATION FsAttributeInfo,
343{
344 UNREFERENCED_PARAMETER(DeviceExt);
345
346 DPRINT("NtfsGetFsAttributeInformation()\n");
347 DPRINT("FsAttributeInfo = %p\n", FsAttributeInfo);
348 DPRINT("BufferLength %lu\n", *BufferLength);
349 DPRINT("Required length %lu\n", (sizeof(FILE_FS_ATTRIBUTE_INFORMATION) + 8));
350
353
354 if (*BufferLength < (sizeof(FILE_FS_ATTRIBUTE_INFORMATION) + 8))
356
357 FsAttributeInfo->FileSystemAttributes =
359 FsAttributeInfo->MaximumComponentNameLength = 255;
360 FsAttributeInfo->FileSystemNameLength = 8;
361
362 memcpy(FsAttributeInfo->FileSystemName, L"NTFS", 8);
363
364 DPRINT("Finished NtfsGetFsAttributeInformation()\n");
365
367 DPRINT("BufferLength %lu\n", *BufferLength);
368
369 return STATUS_SUCCESS;
370}
371
372
373static
376 PFILE_FS_SIZE_INFORMATION FsSizeInfo,
378{
379 PDEVICE_EXTENSION DeviceExt;
381
382 DPRINT("NtfsGetFsSizeInformation()\n");
383 DPRINT("FsSizeInfo = %p\n", FsSizeInfo);
384
387
388 DeviceExt = DeviceObject->DeviceExtension;
389
391 FsSizeInfo->TotalAllocationUnits.QuadPart = DeviceExt->NtfsInfo.ClusterCount;
392 FsSizeInfo->SectorsPerAllocationUnit = DeviceExt->NtfsInfo.SectorsPerCluster;
393 FsSizeInfo->BytesPerSector = DeviceExt->NtfsInfo.BytesPerSector;
394
395 DPRINT("Finished NtfsGetFsSizeInformation()\n");
396 if (NT_SUCCESS(Status))
398
399 return Status;
400}
401
402
403static
406 PFILE_FS_DEVICE_INFORMATION FsDeviceInfo,
408{
409 DPRINT("NtfsGetFsDeviceInformation()\n");
410 DPRINT("FsDeviceInfo = %p\n", FsDeviceInfo);
411 DPRINT("BufferLength %lu\n", *BufferLength);
412 DPRINT("Required length %lu\n", sizeof(FILE_FS_DEVICE_INFORMATION));
413
416
417 FsDeviceInfo->DeviceType = FILE_DEVICE_DISK;
418 FsDeviceInfo->Characteristics = DeviceObject->Characteristics;
419
420 DPRINT("NtfsGetFsDeviceInformation() finished.\n");
421
423 DPRINT("BufferLength %lu\n", *BufferLength);
424
425 return STATUS_SUCCESS;
426}
427
428
431{
432 PIRP Irp;
437 PVOID SystemBuffer;
439 PDEVICE_EXTENSION DeviceExt;
440
441 DPRINT("NtfsQueryVolumeInformation() called\n");
442
443 ASSERT(IrpContext);
444
445 Irp = IrpContext->Irp;
446 DeviceObject = IrpContext->DeviceObject;
447 DeviceExt = DeviceObject->DeviceExtension;
448 Stack = IrpContext->Stack;
449
450 if (!ExAcquireResourceSharedLite(&DeviceExt->DirResource,
452 {
453 return NtfsMarkIrpContextForQueue(IrpContext);
454 }
455
456 FsInformationClass = Stack->Parameters.QueryVolume.FsInformationClass;
457 BufferLength = Stack->Parameters.QueryVolume.Length;
458 SystemBuffer = Irp->AssociatedIrp.SystemBuffer;
459 RtlZeroMemory(SystemBuffer, BufferLength);
460
461 DPRINT("FsInformationClass %d\n", FsInformationClass);
462 DPRINT("SystemBuffer %p\n", SystemBuffer);
463
464 switch (FsInformationClass)
465 {
468 SystemBuffer,
469 &BufferLength);
470 break;
471
474 SystemBuffer,
475 &BufferLength);
476 break;
477
480 SystemBuffer,
481 &BufferLength);
482 break;
483
486 SystemBuffer,
487 &BufferLength);
488 break;
489
490 default:
492 }
493
494 ExReleaseResourceLite(&DeviceExt->DirResource);
495
496 if (NT_SUCCESS(Status))
497 Irp->IoStatus.Information =
498 Stack->Parameters.QueryVolume.Length - BufferLength;
499 else
500 Irp->IoStatus.Information = 0;
501
502 return Status;
503}
504
505
508{
509 PIRP Irp;
510
511 DPRINT("NtfsSetVolumeInformation() called\n");
512
513 ASSERT(IrpContext);
514
515 Irp = IrpContext->Irp;
517 Irp->IoStatus.Information = 0;
518
520}
521
522/* EOF */
static _Out_opt_ PULONGLONG Start
LONG NTSTATUS
Definition: precomp.h:26
#define DPRINT1
Definition: precomp.h:8
#define NTFS_FILE_BITMAP
Definition: ntfs.h:29
#define STATUS_NOT_SUPPORTED
Definition: d3dkmdt.h:48
#define RtlClearBits
Definition: dbgbitmap.h:331
#define RtlInitializeBitMap
Definition: dbgbitmap.h:326
#define RtlFindNextForwardRunClear
Definition: dbgbitmap.h:338
#define RtlFindClearBitsAndSet
Definition: dbgbitmap.h:333
#define RtlFindLongestRunClear
Definition: dbgbitmap.h:337
#define RtlNumberOfClearBits
Definition: dbgbitmap.h:342
#define RtlSetBits
Definition: dbgbitmap.h:345
#define BufferSize
Definition: mmc.h:75
_In_ ULONG BufferSize
Definition: dispmprt.h:490
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:33
#define L(x)
Definition: resources.c:13
NTSTATUS FreeClusters(PNTFS_VCB Vcb, PNTFS_ATTR_CONTEXT AttrContext, ULONG AttrOffset, PFILE_RECORD_HEADER FileRecord, ULONG ClustersToFree)
Definition: attrib.c:1101
FORCEINLINE NTSTATUS NtfsMarkIrpContextForQueue(PNTFS_IRP_CONTEXT IrpContext)
Definition: ntfs.h:652
#define IRPCONTEXT_CANWAIT
Definition: ntfs.h:505
@ AttributeData
Definition: ntfs.h:195
#define TAG_NTFS
Definition: ntfs.h:12
int Fail
Definition: ehthrow.cxx:24
#define ExAllocatePoolWithTag(hernya, size, tag)
Definition: env_spec_w32.h:350
#define ExAcquireResourceExclusiveLite(res, wait)
Definition: env_spec_w32.h:615
#define ExAcquireResourceSharedLite(res, wait)
Definition: env_spec_w32.h:621
#define PagedPool
Definition: env_spec_w32.h:308
#define ROUND_UP(n, align)
Definition: eventvwr.h:34
#define ROUND_DOWN(n, align)
Definition: eventvwr.h:33
#define BooleanFlagOn(F, SF)
Definition: ext2fs.h:183
_Must_inspect_result_ _In_ PFILE_OBJECT _In_ ULONG _In_ FS_INFORMATION_CLASS FsInformationClass
Definition: fltkernel.h:1330
#define FILE_READ_ONLY_VOLUME
Definition: from_kernel.h:246
struct _FILE_FS_ATTRIBUTE_INFORMATION FILE_FS_ATTRIBUTE_INFORMATION
@ FileFsDeviceInformation
Definition: from_kernel.h:222
@ FileFsAttributeInformation
Definition: from_kernel.h:223
@ FileFsVolumeInformation
Definition: from_kernel.h:219
@ FileFsSizeInformation
Definition: from_kernel.h:221
struct _FILE_FS_SIZE_INFORMATION FILE_FS_SIZE_INFORMATION
enum _FSINFOCLASS FS_INFORMATION_CLASS
#define FILE_CASE_PRESERVED_NAMES
Definition: from_kernel.h:234
#define FILE_UNICODE_ON_DISK
Definition: from_kernel.h:235
Status
Definition: gdiplustypes.h:24
#define KeLeaveCriticalRegion()
Definition: ke_x.h:119
#define KeEnterCriticalRegion()
Definition: ke_x.h:88
_In_ PIRP Irp
Definition: kse.h:79
NTSTATUS ReadFileRecord(PDEVICE_EXTENSION Vcb, ULONGLONG index, PFILE_RECORD_HEADER file)
Definition: mft.c:1936
VOID ReleaseAttributeContext(PNTFS_ATTR_CONTEXT Context)
Definition: mft.c:104
ULONGLONG AttributeDataLength(PNTFS_ATTR_RECORD AttrRecord)
Definition: mft.c:259
NTSTATUS FindAttribute(PDEVICE_EXTENSION Vcb, PFILE_RECORD_HEADER MftRecord, ULONG Type, PCWSTR Name, ULONG NameLength, PNTFS_ATTR_CONTEXT *AttrCtx, PULONG Offset)
Definition: mft.c:131
ULONG ReadAttribute(PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, PCHAR Buffer, ULONG Length)
Definition: mft.c:1625
NTSTATUS WriteAttribute(PDEVICE_EXTENSION Vcb, PNTFS_ATTR_CONTEXT Context, ULONGLONG Offset, const PUCHAR Buffer, ULONG Length, PULONG RealLengthWritten, PFILE_RECORD_HEADER FileRecord)
Definition: mft.c:1829
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ASSERT(a)
Definition: mode.c:44
#define ExFreePoolWithTag(_P, _T)
Definition: module.h:1109
static FsInfoType * FsVolumeInfo(char *fpath)
Definition: disk.c:974
#define min(a, b)
Definition: monoChain.cc:55
#define _In_
Definition: no_sal2.h:158
struct _FILE_FS_DEVICE_INFORMATION FILE_FS_DEVICE_INFORMATION
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
NTSTATUS NtfsWriteVolumeBitmap(_In_ PDEVICE_EXTENSION DeviceExt, _In_ ULONG FirstCluster, _In_ ULONG ClusterCount)
Definition: volinfo.c:167
static NTSTATUS NtfsGetFsDeviceInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_DEVICE_INFORMATION FsDeviceInfo, PULONG BufferLength)
Definition: volinfo.c:405
NTSTATUS NtfsLoadVolumeBitmap(_In_ PDEVICE_EXTENSION DeviceExt)
Definition: volinfo.c:49
ULONGLONG NtfsGetFreeClusters(PDEVICE_EXTENSION DeviceExt)
Definition: volinfo.c:193
static NTSTATUS NtfsGetFsVolumeInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_VOLUME_INFORMATION FsVolumeInfo, PULONG BufferLength)
Definition: volinfo.c:294
static NTSTATUS NtfsGetFsAttributeInformation(PDEVICE_EXTENSION DeviceExt, PFILE_FS_ATTRIBUTE_INFORMATION FsAttributeInfo, PULONG BufferLength)
Definition: volinfo.c:340
NTSTATUS NtfsQueryVolumeInformation(PNTFS_IRP_CONTEXT IrpContext)
Definition: volinfo.c:430
NTSTATUS NtfsSetVolumeInformation(PNTFS_IRP_CONTEXT IrpContext)
Definition: volinfo.c:507
VOID NtfsFreeVolumeBitmap(_In_ PDEVICE_EXTENSION DeviceExt)
Definition: volinfo.c:132
static NTSTATUS NtfsGetFsSizeInformation(PDEVICE_OBJECT DeviceObject, PFILE_FS_SIZE_INFORMATION FsSizeInfo, PULONG BufferLength)
Definition: volinfo.c:375
NTSTATUS NtfsAllocateClusters(PDEVICE_EXTENSION DeviceExt, ULONG FirstDesiredCluster, ULONG DesiredClusters, PULONG FirstAssignedCluster, PULONG AssignedClusters)
Definition: volinfo.c:213
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1822
short WCHAR
Definition: pedump.c:58
#define FILE_DEVICE_DISK
Definition: winioctl.h:52
#define STATUS_SUCCESS
Definition: shellext.h:65
#define STATUS_BUFFER_OVERFLOW
Definition: shellext.h:66
#define DPRINT
Definition: sndvol32.h:73
ULONG Flags
Definition: ntfs.h:556
PIO_STACK_LOCATION Stack
Definition: ntfs.h:557
PDEVICE_OBJECT DeviceObject
Definition: ntfs.h:563
LARGE_INTEGER TotalAllocationUnits
Definition: from_kernel.h:263
LARGE_INTEGER AvailableAllocationUnits
Definition: from_kernel.h:264
IO_STATUS_BLOCK IoStatus
#define MAXULONG
Definition: typedefs.h:251
uint32_t * PULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
unsigned char * PUCHAR
Definition: typedefs.h:53
uint32_t ULONG
Definition: typedefs.h:59
char * PCHAR
Definition: typedefs.h:51
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
#define STATUS_INFO_LENGTH_MISMATCH
Definition: udferr_usr.h:133
#define STATUS_DISK_FULL
Definition: udferr_usr.h:155
#define STATUS_FILE_CORRUPT_ERROR
Definition: udferr_usr.h:168
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
LONGLONG QuadPart
Definition: typedefs.h:114
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2061
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG BufferLength
Definition: wdfdevice.h:3777
_In_ WDFREQUEST _In_ PIO_STACK_LOCATION Stack
Definition: wdfrequest.h:639
struct _FILE_FS_VOLUME_INFORMATION FILE_FS_VOLUME_INFORMATION
_In_ ULONG SectorSize
Definition: halfuncs.h:291