Commit graph

429 commits

Author SHA1 Message Date
Pierre Schweitzer 5d743b7bd7
[FASTFAT] When attaching our FCB to a FO, also set the VPB.
Spotted by Alex.
2018-05-18 10:30:52 +02:00
Peter Wathall ae9cc6bb52 Fixed typo 2018-05-17 16:15:25 +01:00
Peter Wathall 6412253d44 Fixed typo 2018-05-17 16:15:25 +01:00
Peter Wathall 3a3a4f7970 Fixed typo 2018-05-17 16:15:25 +01:00
Pierre Schweitzer d37280efaa
[FASTFAT] Deny dismounting system volume or a volume with a pagefile 2018-05-16 21:45:35 +02:00
Thomas Faber ccaf7b24c3
[NDIS] Fix parameter order when calling ResetHandler. CORE-14624 2018-05-14 18:17:52 +02:00
Pierre Schweitzer 38078335b9
[FASTFAT] Implement support for stack overflow in read operations.
Before performing a read operation, FastFAT driver will
attempt to compute whether it would run out of stack
during the operation. If so, instead of attempting the
operation in the current thread, it will post the read
request to the overflow thread.

This should help with the regressions brought in by
94ead99e0c.

CORE-14601
2018-05-12 12:03:18 +02:00
Thomas Faber 0ce31759d0
[USBPORT] Fix x64 build. 2018-05-12 10:11:21 +02:00
Vadim Galyant c89a190ea6
[USBPORT][USBOHCI_NEW] Avoid using pointers for physical addresses. 2018-05-11 15:46:25 +02:00
Thomas Faber 837411e292
[USBOHCI_NEW] Fix build. 2018-05-11 15:44:19 +02:00
Serge Gautherie b893124a20 [NTFS] Fix 2 Clang-Cl warnings about CurrentKey->IndexEntry->Flags
"warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses]"

CORE-14306
2018-05-04 08:08:45 +02:00
Pierre Schweitzer 2a7d16727a
[FASTFAT] Implement write IOs defering.
Before any write operation that would involve caching, ask
the cache controler whether writing would make it exceed its memory
consumption. If so, queue the write operation for later execution.

In case the write operation can wait, then, the FSD operation will be
halted until the write is allowed.

I could test it successfully by copying huge files from a FAT volume to
another. The write is halted until some portions of the file is written
to the disk.
I could also properly install Qt (SDK) on ReactOS with this and less than 1GB RAM:
- https://www.heisspiter.net/~Pierre/rostests/Qt_OS.png
- https://www.heisspiter.net/~Pierre/rostests/Qt_OS2.png

CORE-12081
CORE-14582
CORE-14313
2018-04-29 20:42:53 +02:00
Pierre Schweitzer 00e843b1ed
[FASTFAT] Reduce the number of local declaration. 2018-04-29 12:33:53 +02:00
Pierre Schweitzer fd8197645f
[FASTFAT] Use KdRosRegisterCliCallback() to register in KDBG. 2018-04-29 12:23:18 +02:00
Pierre Schweitzer c5a35ecd37 [FASTFAT] Introduce a KDBG extension.
This is a PoC of what it's possible to realize thanks to an
already existing hack in ntoskrnl :-).
With this extension, on the kdb:> prompt, you're able to type
in commands that will be handled by the FastFAT driver and not
by the kernel, allowing internal debug, not possible otherwise.

So far, three commands exist:
- ?fat.vols: lists all the mounted volumes by FastFAT
- ?fat.files: lists all the files on a specific volume (with their attributes)
- ?fat.setdbgfile: allows watching on specifics files lifetime

This is obviously only the begin and could be greatly improved.

For instance, this is what allowed to debug CORE-14557
2018-04-29 12:15:11 +02:00
Pierre Schweitzer 94ead99e0c [FASTFAT] Don't leak directories FILE_OBJECT, FCB and cache entries.
Once a directory is crossed (opened or a child is opened), associated
FCB structure is created in FastFAT, but also a stream FO for caching.
Up to now, due to an extra reference taken by the stream file object,
even when the directory was no longer used, the directory was kept in
memory: the FCB was never deleted, the file object was never dereferenced,
and the cache never released.

The immediate effect of this bug is that our FAT driver was leaking every
directory that was used affecting the whole OS situation. In case of
directories intensive operation (like extraction the ReactOS source code
in ReactOS ;-)), we were just killin the whole OS RAM without any way to
release it and recover.

The other side effects: IOs were faster as half of the FS was always
permanant in RAM.

This commit fixes the issue by forcing the FSD to release the FO,
and the cache when a directory is no longer used, leading to its
destruction in RAM.
Downside: on IO intensive operation, expect slowdowns, obviously,
there's less caching now. But more efficient!

CORE-14557
2018-04-28 18:33:14 +02:00
Pierre Schweitzer 315f9a13d4
[FASTFAT] When allocating a FCB, set its node type code.
We set the same value as MS FastFAT driver for consistency.
2018-04-27 18:56:31 +02:00
Peter Wathall 9e2dd8676a Removed unreachable line (#517)
The break statement was unnecessary because the goto on the line before it returns from the routine so it can never be reached
2018-04-24 21:35:23 +01:00
Hermès Bélusca-Maïto da5dcdcbf2
[NULL] Additions for the Null driver.
- Allow the driver to be unloaded, as on Windows.
- Use a static fast IO dispatch table, instead of allocating one and
  risking any potential memory allocation failure.
- Update the file header.
2018-04-22 22:23:54 +02:00
Hermès Bélusca-Maïto 2183e65c17
[ACPI] Fix the format of the (default hardcoded) "unique" instance ID. 2018-04-22 16:52:42 +02:00
Pierre Schweitzer c7bba39afc
[NTFS] When reading $I30 attribute fails, stop the rename operation.
This makes the function return the error instead of continuing and
performing use-after-frees operations.
This is likely to be a forgotten return!

CID 1434254, 1434268
2018-04-14 11:43:57 +02:00
Timo Kreuzer 6b1ca75899
[REACTOS] Fix 64 bit build (#465)
* [HAL] Simplify HalpReboot() and make it portable
* [NTOS:MM] Cast constant to PVOID
* [BINPATCH] Fix 64 bit build
* [VFDDRV] Fix 64 bit build and buffer overruns
* [USBOHCI] Fix structure alignment issues
* [ATL_APITEST] Fix 64 bit build
* [XDK] Update unwind structures in winnt.h
* [NTDLL_APITEST] Fix 64 bit build
* [NTDLL_WINETEST] Fix 64 bit build
* [TFTPD] Fix x64 build
* [USBPORT] Fix a C_ASSERT
* [DSOUND] Fix x64 build
* [HAL] Remove obsolete GetPteAddress() macro
2018-04-03 15:13:17 -06:00
Colin Finck 765280bf5f Merge PR #283 "[USBPORT] Transaction Translator (TT) support bringup" 2018-03-29 23:52:22 +02:00
Thomas Faber 851a554b59
[USBHUB_NEW] Fix USBH_CheckDeviceIDUnique return value. 2018-03-27 08:59:54 +02:00
Nikita Krapivin 10645167b8 [I8042PRT] Enable keyboard clock explicitly (fixes Lenovo ACPI bug). CORE-14256 (#434) 2018-03-21 22:07:30 +01:00
Mark Jansen 8b84b1c6b3 [AFD] Mark the socket as named pipe, so NtWriteFile actually knows what to do with it.
CORE-13067
2018-03-21 19:22:13 +01:00
Mark Jansen 9168226378 [AFD] Respond to FileFsDeviceInformation.
CORE-13067
2018-03-21 19:22:13 +01:00
Bișoc George 1a951aa4e6 [BUS][ACPI] Silence DPRINT1 in the special case of IOCTL_BATTERY_QUERY_TAG (#427) 2018-03-12 15:29:14 +01:00
Eric Kohl ca22dc9bb5 [STORPORT][DDK] Add the StorPortExtendedFunction stub
- Add the StorPortExtendedFunction stub to the storport driver.
- Add the declaration of StorPortExtendedFunction to the ddk.

CORE-12695
2018-03-03 14:19:33 +01:00
Pierre Schweitzer 1986049a38
[CDFS_NEW] Sync with HEAD.
CORE-14315
2018-02-25 10:14:27 +01:00
Vadim Galyant 62612a7e45 [USBPORT] Use USB2_HS_INTERRUPT_IN_OVERHEAD instead USB2_HS_ISOCHRONOUS_OUT_OVERHEAD. 2018-02-21 13:35:25 +09:00
Pierre Schweitzer 69f51d1533
[FASTFAT] Drop read ahead locking routines in favor of lazy writer routines.
This avoids code duplication while being consistent with MS FastFAT.
2018-02-17 13:49:15 +01:00
Doug Lyons 8ea42001d9
[I8042PRT] Apply a workaround for Dell Latitude D610
CORE-14324
2018-02-15 22:49:39 +01:00
Pierre Schweitzer a5e89014dc
[CDFS_NEW] Fix a bug in Microsoft CDFS implementation where the top level IRP
is set before locking is actually attempted for Cc worker thread (lazy write/read ahead).
So in case locking fails, the top level IRP is set and never unset, and latter
call will hit the assert where it expects the top level IRP to be NULL.

Should be reported upstream (tm).

CORE-14315
2018-02-12 20:47:32 +01:00
Vadim Galyant 11772da783 [USBPORT] Small changes for debugging. 2018-01-26 20:46:34 +09:00
Vadim Galyant f37a3dc42f [USBPORT] Add USB2_BIT_STUFFING_OVERHEAD constant. 2018-01-22 14:15:57 +09:00
Vadim Galyant 797ebcab72 [USBPORT] Fixing use DeviceSpeed instead Direction. 2018-01-21 19:36:01 +01:00
Vadim Galyant a4dee8e3ac [USBPORT] Add a space in indentation. 2018-01-21 19:36:00 +01:00
Vadim Galyant ecd0097e37 [USBPORT] Delete DPRINTs. 2018-01-21 19:36:00 +01:00
Vadim Galyant 0f8079df3a [USBPORT] Add USB2_PREV_MICROFRAME constant. 2018-01-21 19:35:59 +01:00
Vadim Galyant fd5beb5593 [USBPORT] Moving array CMASKS[] to start file. 2018-01-21 19:35:59 +01:00
Vadim Galyant 2c73523b76 [USBPORT] Removing optional braces. 2018-01-21 19:35:59 +01:00
Vadim Galyant c86210e800 [USBPORT] Correcting check Period. 2018-01-21 19:35:58 +01:00
Vadim Galyant dd1297f0d0 [USBPORT] Use min(), max() macro. 2018-01-21 19:35:58 +01:00
Vadim Galyant ab88f25048 [USBPORT] Check Period instead Factor. 2018-01-21 19:35:58 +01:00
Vadim Galyant 954cc021da [USBPORT] Proper naming. 2018-01-21 19:35:57 +01:00
Vadim Galyant 18f4fc71c8 [USBPORT] Use min() macro. 2018-01-21 19:35:57 +01:00
Vadim Galyant 9426d2986d [USBPORT] Fixing calculation pointer for FdoExtension->Usb2Extension. 2018-01-21 19:35:56 +01:00
Vadim Galyant 7b92b8a6e2 [USBPORT] Implement USBPORT_FreeBandwidthUSB2(). 2018-01-21 19:35:56 +01:00
Vadim Galyant 57f092106a [USBPORT] Correcting USB2_DeallocateEndpointBudget(). 2018-01-21 19:35:56 +01:00
Vadim Galyant bc9046c635 [USBPORT] Implement USB2_PromotePeriods(). 2018-01-21 19:35:55 +01:00
Vadim Galyant 0558635f98 [USBPORT] Add USB2_ChangePeriod(). 2018-01-21 19:35:55 +01:00
Vadim Galyant 69406c2628 [USBPORT] Implement USB2_DeallocateEndpointBudget(). 2018-01-21 19:35:54 +01:00
Vadim Galyant 5ad7a2faa5 [USBPORT] Implement USB2_RebalanceEndpoint(). 2018-01-21 19:35:54 +01:00
Vadim Galyant 522c0d3c69 [USBPORT] Implement USB2_Rebalance(). 2018-01-21 19:35:54 +01:00
Vadim Galyant 5d12e3040c [USBPORT] Add stub for USB2_RebalanceEndpoint(). 2018-01-21 19:35:53 +01:00
Vadim Galyant bbbcb1dc75 [USBPORT] Rename variables only in USB2_AllocateTimeForEndpoint(). 2018-01-21 19:35:53 +01:00
Vadim Galyant 3ba9fffbb2 [USBPORT] Start implementation USB2_DeallocateEndpointBudget(). 2018-01-21 19:35:53 +01:00
Vadim Galyant 3031695100 [USBPORT] Add USB2_CommonFrames(). 2018-01-21 19:35:52 +01:00
Vadim Galyant ae800da85b [USBPORT] Implement USB2_MoveTtEndpoint(). 2018-01-21 19:35:52 +01:00
Vadim Galyant c48093573b [USBPORT] Implement USB2_DeallocateHS(). 2018-01-21 19:35:51 +01:00
Vadim Galyant 00dd0c67b6 [USBPORT] Correcting USB2_AllocateHS(). 2018-01-21 19:35:51 +01:00
Vadim Galyant 1926238056 [USBPORT] Reduces output of debug messages. 2018-01-21 19:35:51 +01:00
Vadim Galyant 5ffefbe945 [USBPORT] Add USB2_GetCMASK(). 2018-01-21 19:35:50 +01:00
Vadim Galyant f3c869a16b [USBPORT] Add USB2_GetSMASK()and USB2_ConvertFrame(). 2018-01-21 19:35:50 +01:00
Vadim Galyant df44bc6d84 [USBPORT] Add stub for USB2_MoveTtEndpoint(). 2018-01-21 19:35:50 +01:00
Vadim Galyant ab5810576f [USBPORT] Add stub for USB2_DeallocateHS(). 2018-01-21 19:35:49 +01:00
Vadim Galyant 8b9d5d1514 [USBPORT] Correcting USB2_InitTtEndpoint(). 2018-01-21 19:35:49 +01:00
Vadim Galyant e262bb610d [USBPORT] End implementation USB2_AllocateTimeForEndpoint(). 2018-01-21 19:35:49 +01:00
Vadim Galyant 2be475db5d [USBPORT] Correcting USB2_GetStartTime(). 2018-01-21 19:35:48 +01:00
Vadim Galyant 7553e54199 [USBPORT] Start implementation USB2_AllocateTimeForEndpoint(). 2018-01-21 19:35:48 +01:00
Vadim Galyant 65f8f961a3 [USBPORT] Continue implementation USBPORT_AllocateBandwidthUSB2(). 2018-01-21 19:35:47 +01:00
Vadim Galyant 67138e7d54 [USBPORT] Use ExFreePoolWithTag() instead ExFreePool() for TtExtension. Add debug info. 2018-01-21 19:35:47 +01:00
Vadim Galyant 3bda39fcb8 [USBPORT] Add USBPORT_DumpingEndpointProperties() and USBPORT_DumpingTtEndpoint(). 2018-01-21 19:35:47 +01:00
Vadim Galyant 698f092ab1 [USBPORT] Implement USB2_AllocateHS(). 2018-01-21 19:35:46 +01:00
Vadim Galyant 720d7cfd9b [USBPORT] Add USB2_GetHsOverhead(). 2018-01-21 19:35:46 +01:00
Vadim Galyant 2d4bd7b744 [USBPORT] Reduces output of debug messages. 2018-01-21 19:35:46 +01:00
Vadim Galyant 816b3a572c [USBPORT] Remove unnecessary semicolon. 2018-01-21 19:35:45 +01:00
Vadim Galyant 5654674e8c [USBPORT] Add stubs for USB2_AllocateHS() and USB2_DeallocateEndpointBudget(). 2018-01-21 19:35:45 +01:00
Vadim Galyant e39b88e3e7 [USBPORT] Add USB2_GetPrevMicroFrame(). 2018-01-21 19:35:45 +01:00
Vadim Galyant 71a7208f69 [USBPORT] Add USB2_IncMicroFrame(). 2018-01-21 19:35:44 +01:00
Vadim Galyant 22b8777f84 [USBPORT] Add USB2_GetStartTime(). 2018-01-21 19:35:44 +01:00
Vadim Galyant 0216b033cc [USBPORT] Add USB2_GetLastIsoTime(). 2018-01-21 19:35:44 +01:00
Vadim Galyant c3803bed8a [USBPORT] Add USB2_CheckTtEndpointInsert(). 2018-01-21 19:35:43 +01:00
Vadim Galyant e701da4923 [USBPORT] Add USB2_AllocateCheck(). 2018-01-21 19:35:43 +01:00
Vadim Galyant c034297f2d [USBPORT] Add USB2_AddDataBitStuff(). 2018-01-21 19:35:43 +01:00
Vadim Galyant 754f749cfd [USBPORT] Add USB2_GetOverhead(). 2018-01-21 19:35:42 +01:00
Vadim Galyant c2ae849dab [USBPORT] Start implementation USBPORT_AllocateBandwidthUSB2(). 2018-01-21 19:35:42 +01:00
Vadim Galyant 02d1cfd37f [USBPORT] Change debug message in USBPORT_RemoveDevice((). 2018-01-21 19:35:41 +01:00
Vadim Galyant 5e15ba48b9 [USBPORT] Add support for transaction translators in USBPORT_RemoveDevice(). 2018-01-21 19:35:41 +01:00
Vadim Galyant cbba6e80fc [USBPORT] Correcting USBPORT_InitializeDevice() and USBPORT_RestoreDevice() (DEVICE_HANDLE_FLAG_USB2HUB). 2018-01-21 19:35:41 +01:00
Vadim Galyant 664e48cad5 [USBPORT] Implement USBPORT_FreeBandwidth(). 2018-01-21 19:35:40 +01:00
Vadim Galyant aae6dd6073 [USBPORT] Implement USBPORT_AllocateBandwidth(). 2018-01-21 19:35:40 +01:00
Vadim Galyant c6ca2a8f02 [USBPORT] Add support for transaction translators in USBPORT_OpenPipe() and USBPORT_ClosePipe(). 2018-01-21 19:35:40 +01:00
Vadim Galyant 7c398f6eb7 [USBPORT] Initialize FdoExtension->Bandwidth[] in USBPORT_StartDevice(). 2018-01-21 19:35:39 +01:00
Vadim Galyant 0f8425ed44 [USBPORT] Add USBPORT_GetTt(). 2018-01-21 19:35:39 +01:00
Vadim Galyant c92f591144 [USBPORT] Add support for transaction translators in USBPORT_CreateDevice(). 2018-01-21 19:35:39 +01:00
Vadim Galyant 3fcbd7744c [USBPORT] Add support for transaction translators in USBPORT_OpenPipe(). 2018-01-21 19:35:38 +01:00
Vadim Galyant e48d6136ec [USBPORT] Add USBPORT_UpdateAllocatedBwTt(). 2018-01-21 19:35:38 +01:00
Vadim Galyant 18702047a1 [USBPORT] Implement USBPORT_InitializeTT(). 2018-01-21 19:35:38 +01:00
Vadim Galyant da1e283837 [USBPORT] Add USB2_InitTtEndpoint(). 2018-01-21 19:35:37 +01:00
Vadim Galyant 9cdc1d64b3 [USBPORT] Add USB2_InitTT(). 2018-01-21 19:35:37 +01:00
Vadim Galyant 0f2f4c6ca2 [USBPORT] Add USB2_InitController(). 2018-01-21 19:35:37 +01:00
Vadim Galyant faa792987b [USBPORT] Add initial support for transaction translators in USBPORT_AddDevice(). 2018-01-21 19:35:36 +01:00
Vadim Galyant 0b78ad8eb2 [USBPORT] Use constants in USBPORT_OpenPipe(). 2018-01-21 19:35:36 +01:00
Vadim Galyant d2b088e9d6 [USBPORT] Define structures for Transaction Translator. 2018-01-21 19:35:36 +01:00
Vadim Galyant a3dd5620d3 [USBPORT] Use constants in USBPORT_CalculateUsbBandwidth(). 2018-01-21 19:35:35 +01:00
Vadim Galyant 41f4814c44 [USBPORT] Define constants for Transaction Translator. 2018-01-21 19:35:35 +01:00
Amine Khaldi bb888f9b11 [CMAKE] My eyes! 2018-01-21 13:54:18 +01:00
Amine Khaldi 94e0942644 [USBSTOR_NEW] Create usbstor_new based on usbstor in order to contain Vadim Galyant's work. 2018-01-21 13:51:07 +01:00
Ged Murphy 37a39f1843 Formatting, no code change 2018-01-20 18:22:44 +00:00
Amine Khaldi f2f2dd0552 [USBOHCI_NEW] Bring-in the USB OHCI miniport driver created by Vadim Galyant. (#244)
[USBOHCI_NEW] Add the new usbport-based OHCI driver.
2018-01-12 21:09:58 +01:00
Vadim Galyant a0296dd3de
[USBPORT] In USBHI_GetExtendedHubInformation, pass the correct port index to RH_GetPortStatus. 2018-01-10 18:59:25 +01:00
Vadim Galyant c0f157e589
[USBHUB] Move DPRINT after check Status. 2018-01-10 18:59:23 +01:00
Vadim Galyant 86af8d49fb
[USBHUB] Correcting L"USB\\Vid_0000&Pid_0000" for case BusQueryDeviceID in USBH_PdoQueryId() if INIT_PORT_FAILED. 2018-01-10 18:59:21 +01:00
Thomas Faber f54fb980ba
[TCPIP] Fix buffer sizes in ReadIpConfiguration. 2018-01-10 11:25:05 +01:00
Thomas Faber d87786bf6c
[TCPIP] Check for allocation failures in ReadIpConfiguration. CID 1411924 2018-01-10 11:25:03 +01:00
Serge Gautherie d6fab4158e [FASTFAT] Improve code style in addition to 8294118174. 2018-01-07 19:29:23 +01:00
Pierre Schweitzer f0a1a5c773
[FASTFAT] Notify on file size change in FileAllocationInformation/FileEndOfFileInformation 2018-01-07 15:29:33 +01:00
Pierre Schweitzer 8294118174
[FASTFAT] Add a wrapper around FsRtlNotifyFullReportChange 2018-01-07 14:16:31 +01:00
Pierre Schweitzer 2a36b632ef
[FASTFAT] When a file gets overwritten, notify about the changes 2018-01-07 11:44:25 +01:00
Pierre Schweitzer ffeb3f070b
[FASTFAT] When overwriting a file, also update its write time 2018-01-07 11:34:41 +01:00
Pierre Schweitzer 0eacb0b1ef
[FASTFAT] When dealing with attributes on IRP_MJ_CREATE, filter user input to ensure we have only attributes we can handle.
This applies to files newly created, or for files overwritten where attributes are reset/modified.
2018-01-06 22:02:10 +01:00
Pierre Schweitzer 7bea4ec07e
[NTFS] Apply fix from 52f0726: allow partial info copy on dir enumeration on first entry return.
This is assorted with misc fixes to make this code closer to what we currently have in FastFAT.
This also allows fixing a memory leak in case of single entry return.

CORE-13367
2018-01-06 21:39:25 +01:00
Pierre Schweitzer 48382d1448
[FLTMGR] Properly allocate CCB in CreatePortCCB()
CID 1427031
2018-01-06 13:54:21 +01:00
Pierre Schweitzer 2b4d5c5cff
[FASTFAT] When overwriting a file with FILE_OVERWRITE*, don't erase previous file attributes, only update them.
Keep erasing them in case the file gets overwritten with FILE_SUPERSEDE.

CORE-14158
2018-01-01 14:29:15 +01:00
Pierre Schweitzer f3fecf92c1
[FASTFAT] On file overwrite, deny it if file as HIDDEN/SYSTEM flag and caller doesn't set them.
CORE-14158
2018-01-01 12:13:46 +01:00
Timo Kreuzer a2f7de7ee8
Amd64/misc 64bit fixes (#236)
[REACTOS] Misc 64 bit fixes

* [NTOS:MM] Allow MEM_DOS_LIM in NtMapViewOfSection on x64 as well
* [NTOS:MM] Implement x64 version of MmIsDisabledPage
* [HAL] Remove obsolete code
* [NTOS:KE] Fix amd64 version of KeContextToTrapFrame and KeTrapFrameToContext
* [XDK] Fix CONTEXT_XSTATE definition
* [PCNET] Convert physical address types from pointers to PHYSICAL_ADDRESS
2018-01-01 12:07:50 +01:00
Pierre Schweitzer d2a5322576
[NTFS] Start using different tags for allocations.
They all be Ntf? as for the Windows NTFS driver
2017-12-31 23:11:57 +01:00
Pierre Schweitzer 2d3d74151b
[NTFS] Fix a memory leak on error
CID 1427053
2017-12-31 14:18:02 +01:00
Pierre Schweitzer 216a2cae73
[NTFS] Use LookasideList allocations for FILE_RECORD_HEADER.
TODO: use a specific tag

This, and previous commit, should speed up a bit the driver until caching gets implemented
2017-12-31 14:14:24 +01:00
Pierre Schweitzer 3ddf44ff10
[NTFS] Use LookasideList allocations for NTFS_ATTR_CONTEXT.
TODO: use a specific tag
2017-12-31 12:15:17 +01:00
Pierre Schweitzer 849fa7fbae
[NTFS] Rewrite ReleaseAttributeContext() so that its null checks are consistent
CID 1427067
2017-12-31 10:38:58 +01:00
Pierre Schweitzer 007d3d382a
[NTFS] Don't dereference NULL IRP
CID 1427057
2017-12-31 10:38:58 +01:00
Pierre Schweitzer 7a88e3bfd4
[NTFS] Don't leak memory in case of failure while creating a directory
CID 1427065
2017-12-31 10:38:58 +01:00
Pierre Schweitzer 9d9cce2838
[NTFS] Don't leak attributes contextes in the btree management functions
CID 1427030, 1427062
2017-12-31 10:38:58 +01:00
Pierre Schweitzer 391056ba22
[NTFS] Don't leak memory when reading or writing non-resident attributes
CID 1427048, 1427070
2017-12-31 10:38:58 +01:00
Thomas Faber 4f8379a02b
[DRIVERS] Use KeClearEvent instead of KeResetEvent where the previous state is not needed. 2017-12-30 11:44:25 +01:00
Amine Khaldi a76fdbd8cb [UNIATA] Update to v0.46e5. CORE-14117 2017-12-25 14:18:21 +01:00
Pierre Schweitzer 453e42beb5
[FASTFAT] Revert bd1e7bf: our VPB swapout implementation in FastFAT is buggy and
leaves volumes in half-(dis)mounted state and thus they get remounted while not
completely dismounted.
This can lead to major breakage and data corruption.
This requires deeper fixes (let's just drop that driver!).

CORE-14124
CORE-14126
CORE-14133
2017-12-25 11:24:13 +01:00
Pierre Schweitzer b9b461bde9
[DISK] Properly implement querying partition information for partition 0.
In spite of what was implemented in our NT DDK sample, this is a legit operation.

This may have been turned legit starting NT5 (reminder, our implementation is
NT4 based...). So, in this situation, just return the information about the whole
disk (and not a random size) and also, mark everything with default values.

See disk_new for an example of how it works in NT5+.

CORE-14124
2017-12-24 21:58:47 +01:00
Ivan Labutin 925f1a67ea [SAC] Fix wrong sized variable in SAC driver 2017-12-20 06:56:09 +01:00
Pierre Schweitzer 5a650f6ba5
[FS] During 1st stage, disable any FS we don't support install to in order to let RawFS these volumes.
This avoids bloated setup and avoids potential bugs in 3rd party drivers.

This is following 806cd1.
2017-12-18 08:46:24 +01:00
Pierre Schweitzer bd1e7bf85e
[FASFAT] Enable FAT volume dismount using VPB swapout 2017-12-17 23:29:33 +01:00
Pierre Schweitzer 806cd16328
[SETUP] Remove FSDs which have broken dismount implementation.
This avoids issues when these partitions are formatted to FAT for setup.

For now, this commit doesn't change anything, but once IopParseDevice hack
gets removed, this will make a difference!

CORE-6305
2017-12-17 23:16:01 +01:00
Pierre Schweitzer dcd95c1a85
[FASTFAT] Add a comment (and an ASSERT) in VfatCreateFile() that shows that my stats code is broken... 2017-12-17 18:25:43 +01:00
Pierre Schweitzer 64bc96558e
[FASTFAT] While closing FCBs on dismount, release from tail to head and not the contrary.
It fixes assertion failure in vfatDestroyFCB() where we would have release parent before child.
This is still not perfect, but less bug prone...

With this commits (and ENABLE_SWAPOUT defined), ReactOS seems to unmount FAT volumes quite nice! :-)
(Tried with fsutil volume dismount X:)
2017-12-17 18:24:01 +01:00
Pierre Schweitzer de03686148
[FASTFAT] Fix a handle count leak on volume close. This can prevent locking a volume! 2017-12-17 18:24:01 +01:00
Pierre Schweitzer 27773dbb3f
[FASTFAT] When not able to lock a volume due to open handles, print open handles 2017-12-17 18:24:01 +01:00
Jason Wendt 0fdb5d9b63 [SWENUM] Add version information. CORE-14112
Improves setup of DirectX 9.0b 4.09.00.0902 (which the game Halo wants
to install) after manually lowering DirectX version in registry.
2017-12-17 02:22:28 +01:00