ReactOS  0.4.14-dev-57-g333b8f1
fastio.c
Go to the documentation of this file.
1 /* Copyright (c) Mark Harmstone 2016-17
2  *
3  * This file is part of WinBtrfs.
4  *
5  * WinBtrfs is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU Lesser General Public Licence as published by
7  * the Free Software Foundation, either version 3 of the Licence, or
8  * (at your option) any later version.
9  *
10  * WinBtrfs 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 Lesser General Public Licence for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public Licence
16  * along with WinBtrfs. If not, see <http://www.gnu.org/licenses/>. */
17 
18 #include "btrfs_drv.h"
19 
21 
22 _Function_class_(FAST_IO_QUERY_BASIC_INFO)
23 static BOOLEAN __stdcall fast_query_basic_info(PFILE_OBJECT FileObject, BOOLEAN wait, PFILE_BASIC_INFORMATION fbi,
25  fcb* fcb;
26  ccb* ccb;
27 
29 
30  TRACE("(%p, %u, %p, %p, %p)\n", FileObject, wait, fbi, IoStatus, DeviceObject);
31 
32  if (!FileObject) {
34  return false;
35  }
36 
37  fcb = FileObject->FsContext;
38 
39  if (!fcb) {
41  return false;
42  }
43 
44  ccb = FileObject->FsContext2;
45 
46  if (!ccb) {
48  return false;
49  }
50 
53  return false;
54  }
55 
56  if (fcb->ads) {
57  if (!ccb->fileref || !ccb->fileref->parent || !ccb->fileref->parent->fcb) {
59  return false;
60  }
61 
62  fcb = ccb->fileref->parent->fcb;
63  }
64 
65  if (!ExAcquireResourceSharedLite(fcb->Header.Resource, wait)) {
67  return false;
68  }
69 
70  if (fcb == fcb->Vcb->dummy_fcb) {
72 
74  fbi->CreationTime = fbi->LastAccessTime = fbi->LastWriteTime = fbi->ChangeTime = time;
75  } else {
80  }
81 
83 
84  IoStatus->Status = STATUS_SUCCESS;
85  IoStatus->Information = sizeof(FILE_BASIC_INFORMATION);
86 
87  ExReleaseResourceLite(fcb->Header.Resource);
88 
90 
91  return true;
92 }
93 
94 _Function_class_(FAST_IO_QUERY_STANDARD_INFO)
95 static BOOLEAN __stdcall fast_query_standard_info(PFILE_OBJECT FileObject, BOOLEAN wait, PFILE_STANDARD_INFORMATION fsi,
97  fcb* fcb;
98  ccb* ccb;
99  bool ads;
100  ULONG adssize;
101 
103 
104  TRACE("(%p, %u, %p, %p, %p)\n", FileObject, wait, fsi, IoStatus, DeviceObject);
105 
106  if (!FileObject) {
108  return false;
109  }
110 
111  fcb = FileObject->FsContext;
112  ccb = FileObject->FsContext2;
113 
114  if (!fcb) {
116  return false;
117  }
118 
119  if (!ExAcquireResourceSharedLite(fcb->Header.Resource, wait)) {
121  return false;
122  }
123 
124  ads = fcb->ads;
125 
126  if (ads) {
127  struct _fcb* fcb2;
128 
129  if (!ccb || !ccb->fileref || !ccb->fileref->parent || !ccb->fileref->parent->fcb) {
130  ExReleaseResourceLite(fcb->Header.Resource);
132  return false;
133  }
134 
135  adssize = fcb->adsdata.Length;
136 
137  fcb2 = ccb->fileref->parent->fcb;
138 
139  ExReleaseResourceLite(fcb->Header.Resource);
140 
141  fcb = fcb2;
142 
143  if (!ExAcquireResourceSharedLite(fcb->Header.Resource, wait)) {
145  return false;
146  }
147 
148  fsi->AllocationSize.QuadPart = fsi->EndOfFile.QuadPart = adssize;
150  fsi->Directory = false;
151  } else {
156  }
157 
158  fsi->DeletePending = ccb->fileref ? ccb->fileref->delete_on_close : false;
159 
160  IoStatus->Status = STATUS_SUCCESS;
161  IoStatus->Information = sizeof(FILE_STANDARD_INFORMATION);
162 
163  ExReleaseResourceLite(fcb->Header.Resource);
164 
166 
167  return true;
168 }
169 
170 _Function_class_(FAST_IO_CHECK_IF_POSSIBLE)
174  fcb* fcb = FileObject->FsContext;
175  LARGE_INTEGER len2;
176 
177  UNUSED(Wait);
178  UNUSED(IoStatus);
180 
181  len2.QuadPart = Length;
182 
183  if (CheckForReadOperation) {
185  return true;
186  } else {
188  return true;
189  }
190 
191  return false;
192 }
193 
194 _Function_class_(FAST_IO_QUERY_NETWORK_OPEN_INFO)
195 static BOOLEAN __stdcall fast_io_query_network_open_info(PFILE_OBJECT FileObject, BOOLEAN Wait, FILE_NETWORK_OPEN_INFORMATION* fnoi,
197  fcb* fcb;
198  ccb* ccb;
199  file_ref* fileref;
200 
202 
203  TRACE("(%p, %u, %p, %p, %p)\n", FileObject, Wait, fnoi, IoStatus, DeviceObject);
204 
206 
207  fcb = FileObject->FsContext;
208 
209  if (!fcb || fcb == fcb->Vcb->volume_fcb) {
211  return false;
212  }
213 
214  ccb = FileObject->FsContext2;
215 
216  if (!ccb) {
218  return false;
219  }
220 
221  fileref = ccb->fileref;
222 
223  if (fcb == fcb->Vcb->dummy_fcb) {
225 
227  fnoi->CreationTime = fnoi->LastAccessTime = fnoi->LastWriteTime = fnoi->ChangeTime = time;
228  } else {
229  INODE_ITEM* ii;
230 
231  if (fcb->ads) {
232  if (!fileref || !fileref->parent) {
233  ERR("no fileref for stream\n");
235  return false;
236  }
237 
238  ii = &fileref->parent->fcb->inode_item;
239  } else
240  ii = &fcb->inode_item;
241 
246  }
247 
248  if (fcb->ads) {
250  fnoi->FileAttributes = fileref->parent->fcb->atts == 0 ? FILE_ATTRIBUTE_NORMAL : fileref->parent->fcb->atts;
251  } else {
255  }
256 
258 
259  return true;
260 }
261 
262 _Function_class_(FAST_IO_ACQUIRE_FOR_MOD_WRITE)
263 static NTSTATUS __stdcall fast_io_acquire_for_mod_write(PFILE_OBJECT FileObject, PLARGE_INTEGER EndingOffset,
265  fcb* fcb;
266 
268 
271 
272  fcb = FileObject->FsContext;
273 
274  if (!fcb)
276 
277  // Make sure we don't get interrupted by the flush thread, which can cause a deadlock
278 
279  if (!ExAcquireResourceSharedLite(&fcb->Vcb->tree_lock, false))
280  return STATUS_CANT_WAIT;
281 
282  if (!ExAcquireResourceExclusiveLite(fcb->Header.Resource, false)) {
283  ExReleaseResourceLite(&fcb->Vcb->tree_lock);
284  TRACE("returning STATUS_CANT_WAIT\n");
285  return STATUS_CANT_WAIT;
286  }
287 
288  // Ideally this would be PagingIoResource, but that doesn't play well with copy-on-write,
289  // as we can't guarantee that we won't need to do any reallocations.
290 
291  *ResourceToRelease = fcb->Header.Resource;
292 
293  TRACE("returning STATUS_SUCCESS\n");
294 
295  return STATUS_SUCCESS;
296 }
297 
298 _Function_class_(FAST_IO_RELEASE_FOR_MOD_WRITE)
299 static NTSTATUS __stdcall fast_io_release_for_mod_write(PFILE_OBJECT FileObject, struct _ERESOURCE *ResourceToRelease,
301  fcb* fcb;
302 
303  TRACE("(%p, %p, %p)\n", FileObject, ResourceToRelease, DeviceObject);
304 
306 
307  fcb = FileObject->FsContext;
308 
310 
311  ExReleaseResourceLite(&fcb->Vcb->tree_lock);
312 
313  return STATUS_SUCCESS;
314 }
315 
316 _Function_class_(FAST_IO_ACQUIRE_FOR_CCFLUSH)
317 static NTSTATUS __stdcall fast_io_acquire_for_ccflush(PFILE_OBJECT FileObject, PDEVICE_OBJECT DeviceObject) {
320 
322 
323  return STATUS_SUCCESS;
324 }
325 
326 _Function_class_(FAST_IO_RELEASE_FOR_CCFLUSH)
327 static NTSTATUS __stdcall fast_io_release_for_ccflush(PFILE_OBJECT FileObject, PDEVICE_OBJECT DeviceObject) {
330 
333 
334  return STATUS_SUCCESS;
335 }
336 
337 _Function_class_(FAST_IO_WRITE)
340  fcb* fcb = FileObject->FsContext;
341 
342  fcb->inode_item.st_size = fcb->Header.FileSize.QuadPart;
343 
344  return true;
345  }
346 
347  return false;
348 }
349 
350 _Function_class_(FAST_IO_LOCK)
354  BOOLEAN ret;
355  fcb* fcb = FileObject->FsContext;
356 
357  TRACE("(%p, %I64x, %I64x, %p, %x, %u, %u, %p, %p)\n", FileObject, FileOffset ? FileOffset->QuadPart : 0, Length ? Length->QuadPart : 0,
359 
360  if (fcb->type != BTRFS_TYPE_FILE) {
361  WARN("can only lock files\n");
363  IoStatus->Information = 0;
364  return true;
365  }
366 
368  ExAcquireResourceSharedLite(fcb->Header.Resource, true);
369 
371  ExclusiveLock, IoStatus, NULL, false);
372 
373  if (ret)
374  fcb->Header.IsFastIoPossible = fast_io_possible(fcb);
375 
376  ExReleaseResourceLite(fcb->Header.Resource);
378 
379  return ret;
380 }
381 
382 _Function_class_(FAST_IO_UNLOCK_SINGLE)
385  fcb* fcb = FileObject->FsContext;
386 
387  TRACE("(%p, %I64x, %I64x, %p, %x, %p, %p)\n", FileObject, FileOffset ? FileOffset->QuadPart : 0, Length ? Length->QuadPart : 0,
389 
390  IoStatus->Information = 0;
391 
392  if (fcb->type != BTRFS_TYPE_FILE) {
393  WARN("can only lock files\n");
395  return true;
396  }
397 
399 
401 
402  fcb->Header.IsFastIoPossible = fast_io_possible(fcb);
403 
405 
406  return true;
407 }
408 
409 _Function_class_(FAST_IO_UNLOCK_ALL)
411  fcb* fcb = FileObject->FsContext;
412 
413  TRACE("(%p, %p, %p, %p)\n", FileObject, ProcessId, IoStatus, DeviceObject);
414 
415  IoStatus->Information = 0;
416 
417  if (fcb->type != BTRFS_TYPE_FILE) {
418  WARN("can only lock files\n");
420  return true;
421  }
422 
424 
425  ExAcquireResourceSharedLite(fcb->Header.Resource, true);
426 
428 
429  fcb->Header.IsFastIoPossible = fast_io_possible(fcb);
430 
431  ExReleaseResourceLite(fcb->Header.Resource);
432 
434 
435  return true;
436 }
437 
438 _Function_class_(FAST_IO_UNLOCK_ALL_BY_KEY)
439 static BOOLEAN __stdcall fast_io_unlock_all_by_key(PFILE_OBJECT FileObject, PVOID ProcessId, ULONG Key,
441  fcb* fcb = FileObject->FsContext;
442 
443  TRACE("(%p, %p, %x, %p, %p)\n", FileObject, ProcessId, Key, IoStatus, DeviceObject);
444 
445  IoStatus->Information = 0;
446 
447  if (fcb->type != BTRFS_TYPE_FILE) {
448  WARN("can only lock files\n");
450  return true;
451  }
452 
454 
455  ExAcquireResourceSharedLite(fcb->Header.Resource, true);
456 
458 
459  fcb->Header.IsFastIoPossible = fast_io_possible(fcb);
460 
461  ExReleaseResourceLite(fcb->Header.Resource);
462 
464 
465  return true;
466 }
467 
470 
472 
473  FastIoDispatch.FastIoCheckIfPossible = fast_io_check_if_possible;
475  FastIoDispatch.FastIoWrite = fast_io_write;
476  FastIoDispatch.FastIoQueryBasicInfo = fast_query_basic_info;
477  FastIoDispatch.FastIoQueryStandardInfo = fast_query_standard_info;
478  FastIoDispatch.FastIoLock = fast_io_lock;
479  FastIoDispatch.FastIoUnlockSingle = fast_io_unlock_single;
480  FastIoDispatch.FastIoUnlockAll = fast_io_unlock_all;
481  FastIoDispatch.FastIoUnlockAllByKey = fast_io_unlock_all_by_key;
482  FastIoDispatch.FastIoQueryNetworkOpenInfo = fast_io_query_network_open_info;
483  FastIoDispatch.AcquireForModWrite = fast_io_acquire_for_mod_write;
488  FastIoDispatch.ReleaseForModWrite = fast_io_release_for_mod_write;
489  FastIoDispatch.AcquireForCcFlush = fast_io_acquire_for_ccflush;
490  FastIoDispatch.ReleaseForCcFlush = fast_io_release_for_ccflush;
491 
492  *fiod = &FastIoDispatch;
493 }
#define KeQuerySystemTime(t)
Definition: env_spec_w32.h:570
struct _file_ref * parent
Definition: btrfs_drv.h:346
_In_ PLARGE_INTEGER EndingOffset
Definition: iotypes.h:1554
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ProcessId
Definition: fatprocs.h:2697
PFAST_IO_UNLOCK_SINGLE FastIoUnlockSingle
Definition: iotypes.h:1697
BOOLEAN NTAPI FsRtlFastCheckLockForRead(IN PFILE_LOCK FileLock, IN PLARGE_INTEGER FileOffset, IN PLARGE_INTEGER Length, IN ULONG Key, IN PFILE_OBJECT FileObject, IN PVOID Process)
Definition: filelock.c:752
#define FsRtlEnterFileSystem
adns_state ads
Definition: adh-query.c:35
BTRFS_TIME otime
Definition: btrfs.h:285
#define FsRtlExitFileSystem
BOOLEAN NTAPI FsRtlMdlReadCompleteDev(IN PFILE_OBJECT FileObject, IN PMDL MemoryDescriptorList, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1011
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN OUT PIO_STATUS_BLOCK IoStatus
Definition: fatprocs.h:2650
LARGE_INTEGER LastAccessTime
Definition: nt_native.h:940
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_In_ PLARGE_INTEGER _Out_ struct _ERESOURCE ** ResourceToRelease
Definition: iotypes.h:1555
BOOLEAN NTAPI FsRtlMdlWriteCompleteDev(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN PMDL MdlChain, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1198
#define WARN(fmt,...)
Definition: debug.h:111
LONG NTSTATUS
Definition: precomp.h:26
void init_fast_io_dispatch(FAST_IO_DISPATCH **fiod)
Definition: fastio.c:468
PFAST_IO_MDL_READ MdlRead
Definition: iotypes.h:1706
PFAST_IO_PREPARE_MDL_WRITE PrepareMdlWrite
Definition: iotypes.h:1708
PFAST_IO_UNLOCK_ALL FastIoUnlockAll
Definition: iotypes.h:1698
PFAST_IO_QUERY_NETWORK_OPEN_INFO FastIoQueryNetworkOpenInfo
Definition: iotypes.h:1704
__u16 time
Definition: mkdosfs.c:366
ACCESS_MASK access
Definition: btrfs_drv.h:377
BOOLEAN NTAPI FsRtlPrepareMdlWriteDev(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG LockKey, OUT PMDL *MdlChain, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1272
PFAST_IO_RELEASE_FOR_MOD_WRITE ReleaseForModWrite
Definition: iotypes.h:1715
PFAST_IO_MDL_READ_COMPLETE MdlReadComplete
Definition: iotypes.h:1707
BTRFS_TIME st_ctime
Definition: btrfs.h:283
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG IN BOOLEAN CheckForReadOperation
Definition: fatprocs.h:2650
#define FILE_WRITE_ATTRIBUTES
Definition: nt_native.h:649
BOOLEAN NTAPI ExAcquireResourceExclusiveLite(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:770
NTSTATUS NTAPI FsRtlFastUnlockAllByKey(IN PFILE_LOCK FileLock, IN PFILE_OBJECT FileObject, IN PEPROCESS Process, IN ULONG Key, IN PVOID Context OPTIONAL)
Definition: filelock.c:1087
NTSTATUS NTAPI FsRtlFastUnlockSingle(IN PFILE_LOCK FileLock, IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN PLARGE_INTEGER Length, IN PEPROCESS Process, IN ULONG Key, IN PVOID Context OPTIONAL, IN BOOLEAN AlreadySynchronized)
Definition: filelock.c:829
static __inline bool is_subvol_readonly(root *r, PIRP Irp)
Definition: btrfs_drv.h:997
PFAST_IO_QUERY_BASIC_INFO FastIoQueryBasicInfo
Definition: iotypes.h:1694
uint32_t st_nlink
Definition: btrfs.h:274
_Function_class_(FAST_IO_QUERY_BASIC_INFO)
Definition: fastio.c:22
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN FailImmediately
Definition: fatprocs.h:2697
struct _FAST_IO_DISPATCH FAST_IO_DISPATCH
#define PsGetCurrentProcess
Definition: psfuncs.h:17
unsigned char BOOLEAN
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define UNUSED(x)
Definition: btrfs_drv.h:86
uint8_t type
Definition: btrfs_drv.h:280
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
BTRFS_TIME st_mtime
Definition: btrfs.h:284
static __inline uint64_t unix_time_to_win(BTRFS_TIME *t)
Definition: recv.cpp:1180
FILE_LOCK lock
Definition: btrfs_drv.h:283
BOOLEAN NTAPI FsRtlMdlReadDev(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN ULONG LockKey, OUT PMDL *MdlChain, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:1025
FSRTL_ADVANCED_FCB_HEADER Header
Definition: btrfs_drv.h:272
IN PLARGE_INTEGER IN ULONG IN BOOLEAN IN ULONG LockKey
Definition: fatprocs.h:2650
uint64_t st_size
Definition: btrfs.h:271
#define TRACE(s)
Definition: solgame.cpp:4
LARGE_INTEGER LastWriteTime
Definition: nt_native.h:941
struct _fcb fcb
Definition: btrfs_drv.h:1301
#define S_ISDIR(mode)
Definition: various.h:18
PFAST_IO_UNLOCK_ALL_BY_KEY FastIoUnlockAllByKey
Definition: iotypes.h:1699
PIRP NTAPI IoGetTopLevelIrp(VOID)
Definition: irp.c:1843
struct _file_ref * fileref
Definition: btrfs_drv.h:295
#define __stdcall
Definition: typedefs.h:25
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
LARGE_INTEGER AllocationSize
Definition: propsheet.cpp:54
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1817
* PFILE_OBJECT
Definition: iotypes.h:1955
#define FILE_READ_ATTRIBUTES
Definition: nt_native.h:647
BTRFS_TIME st_atime
Definition: btrfs.h:282
int ret
PFAST_IO_ACQUIRE_FOR_CCFLUSH AcquireForCcFlush
Definition: iotypes.h:1716
LARGE_INTEGER CreationTime
Definition: nt_native.h:939
PFAST_IO_LOCK FastIoLock
Definition: iotypes.h:1696
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:126
VOID NTAPI IoSetTopLevelIrp(IN PIRP Irp)
Definition: irp.c:2000
#define FILE_STANDARD_INFORMATION
Definition: disk.h:54
NTSTATUS NTAPI FsRtlFastUnlockAll(IN PFILE_LOCK FileLock, IN PFILE_OBJECT FileObject, IN PEPROCESS Process, IN PVOID Context OPTIONAL)
Definition: filelock.c:1026
INODE_ITEM inode_item
Definition: btrfs_drv.h:281
LARGE_INTEGER ChangeTime
Definition: nt_native.h:942
PFAST_IO_ACQUIRE_FOR_MOD_WRITE AcquireForModWrite
Definition: iotypes.h:1705
#define ERR(fmt,...)
Definition: debug.h:109
FAST_IO_DISPATCH FastIoDispatch
Definition: fastio.c:20
PFAST_IO_READ FastIoRead
Definition: iotypes.h:1692
IN PDEVICE_OBJECT DeviceObject
Definition: fatprocs.h:1560
PFAST_IO_WRITE FastIoWrite
Definition: iotypes.h:1693
ULONG atts
Definition: btrfs_drv.h:286
_In_ PFCB _In_ LONGLONG FileOffset
Definition: cdprocs.h:151
static __inline uint64_t fcb_alloc_size(fcb *fcb)
Definition: btrfs_drv.h:1732
struct _root * subvol
Definition: btrfs_drv.h:277
ANSI_STRING adsdata
Definition: btrfs_drv.h:323
PFAST_IO_QUERY_STANDARD_INFO FastIoQueryStandardInfo
Definition: iotypes.h:1695
IN PLARGE_INTEGER IN PLARGE_INTEGER PEPROCESS ULONG BOOLEAN BOOLEAN ExclusiveLock
Definition: fatprocs.h:2697
BOOLEAN NTAPI ExAcquireResourceSharedLite(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:885
BOOLEAN NTAPI FsRtlCopyRead(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:64
#define BTRFS_TYPE_FILE
Definition: shellext.h:80
BOOLEAN NTAPI FsRtlCopyWrite(IN PFILE_OBJECT FileObject, IN PLARGE_INTEGER FileOffset, IN ULONG Length, IN BOOLEAN Wait, IN ULONG LockKey, OUT PVOID Buffer, OUT PIO_STATUS_BLOCK IoStatus, IN PDEVICE_OBJECT DeviceObject)
Definition: fastio.c:264
bool ads
Definition: btrfs_drv.h:319
PFAST_IO_MDL_WRITE_COMPLETE MdlWriteComplete
Definition: iotypes.h:1709
unsigned int ULONG
Definition: retypes.h:1
PFAST_IO_CHECK_IF_POSSIBLE FastIoCheckIfPossible
Definition: iotypes.h:1691
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:261
#define fast_io_possible(fcb)
Definition: btrfs_drv.h:1575
struct _ccb ccb
file_ref * fileref
Definition: btrfs_drv.h:378
#define FSRTL_CACHE_TOP_LEVEL_IRP
Definition: fsrtltypes.h:60
return STATUS_SUCCESS
Definition: btrfs.c:2966
PFAST_IO_RELEASE_FOR_CCFLUSH ReleaseForCcFlush
Definition: iotypes.h:1717
#define FsRtlFastLock(A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11)
Definition: fsrtlfuncs.h:1581
BOOLEAN NTAPI FsRtlFastCheckLockForWrite(IN PFILE_LOCK FileLock, IN PLARGE_INTEGER FileOffset, IN PLARGE_INTEGER Length, IN ULONG Key, IN PFILE_OBJECT FileObject, IN PVOID Process)
Definition: filelock.c:786
struct _device_extension * Vcb
Definition: btrfs_drv.h:276
LONGLONG QuadPart
Definition: typedefs.h:112
ULONG SizeOfFastIoDispatch
Definition: iotypes.h:1690
#define STATUS_CANT_WAIT
Definition: ntstatus.h:438
IN BOOLEAN Wait
Definition: fatprocs.h:1529
uint32_t st_mode
Definition: btrfs.h:277
#define FILE_BASIC_INFORMATION
Definition: disk.h:53
bool delete_on_close
Definition: btrfs_drv.h:338