Commit graph

71832 commits

Author SHA1 Message Date
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 f2c44aa483
[NTOSKRNL] Fix lazy writer for in-use VACB.
Adjusting refcount and enabling lazy-write for pinned
VACB makes it actually more efficient, often purging
data to disk, reducing memory stress for the system.

This is required for defering writes.

This commit unfortunately (?) reverts a previous revert.

CORE-12081
CORE-14582
CORE-14313
2018-04-29 20:42:53 +02:00
Hermès Bélusca-Maïto 3055afce81
[MODE] Improve the way the DOS device statuses are enumerated via the "mode" command (without parameters). 2018-04-29 19:36:13 +02:00
Hermès Bélusca-Maïto 37deb7593e
[WINLOGON] Update french translation of the system shutdown dialog. 2018-04-29 18:02:41 +02:00
Eric Kohl 153c645b2c [WINLOGON] Add german translation of the system shutdown dialog 2018-04-29 17:44:41 +02:00
Eric Kohl ec2bfa2e11 [WINLOGON] Localize the shutdown timeout 2018-04-29 17:09:37 +02:00
Hermès Bélusca-Maïto 84e78e6a15
[MODE] Use more translated strings. CORE-12178 2018-04-29 16:57:11 +02:00
Eric Kohl b6ebd50d3f [SYSSETUP] Close the device key after the property sheet page has been released. 2018-04-29 15:41:38 +02:00
Bișoc George 6c16f12de5 [CALC][CLIPBRD][SOLITAIRE][SPIDER][NOTEPAD][REGEDIT][TASKMGR] Disable help menu/button 2018-04-29 15:24:11 +02:00
Eric Kohl 1cb019bd21 [SYSSETUP] Read driver settings from and write them to the registry
- Read the driver settings from the registry.
- Write the driver settings to the registry.
- Make the read-only edit control for the input buffer length look like a non-read-only one because it is controlled by the up-down control.
2018-04-29 14:55:57 +02:00
Pierre Schweitzer 00e843b1ed
[FASTFAT] Reduce the number of local declaration. 2018-04-29 12:33:53 +02:00
Pierre Schweitzer 3dc4d408b2
[SDK] Enforce callback type for KdRosRegisterCliCallback(), KdRosDeregisterCliCallback(). 2018-04-29 12:33:14 +02:00
Pierre Schweitzer fd8197645f
[FASTFAT] Use KdRosRegisterCliCallback() to register in KDBG. 2018-04-29 12:23:18 +02:00
Pierre Schweitzer de88611590
[SDK] Make KdRosRegisterCliCallback() return status from KdSystemDebugControl(). 2018-04-29 12:19:21 +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
Hermès Bélusca-Maïto cb20bf8c90
[WINLOGON] Usability enhancement for the RPC SystemShutdown functionality.
- Perform an immediate system shutdown if the timeout is zero, otherwise
  display the countdown shutdown dialog.
- Cleanup pShutdownParams->pszMessage as soon as the dialog goes away.
- It actually appears (tested on Windows 2000 and 2003) that sending
  WM_CLOSE messages from a user-mode app to the shutdown dialog really
  do nothing (and in particular does not cancel the shutdown!), so modify
  the code to take this fact into account.
2018-04-29 01:02:05 +02:00
Hermès Bélusca-Maïto 03c233bcd0
[CMD] Improve how the command prompt displays when one presses Ctrl-C/break after having pressed ENTER, or after a command has been run. 2018-04-29 00:57:16 +02:00
Hermès Bélusca-Maïto a3b36f8d3e
[CMD] Don't reset bCtrlBreak too early.
This allows to break commands such as:

C:\ReactOS\system32> for %f in (*.*) do dir

as one would expect: stop the currently running 'dir' and the 'for'.
"bCtrlBreak" doesn't need to be volatile too.
2018-04-29 00:53:49 +02:00
Hermès Bélusca-Maïto 6dd27bd467
[CMD] Use CheckCtrlBreak(). 2018-04-29 00:50:40 +02:00
James Woodcock 8b72fce3e1
[CMD] Use _T() rather than L to initialise TCHARS. 2018-04-28 22:16:59 +02:00
James Woodcock d7e71357dc
[CMD] Fix CTRL-C handling.
Using CTRL-C to cancel command line input would leave the prompt in
a state where the next command would be ignored.  For example:

dir<CTRL-C>
dir

would cause cmd.exe to ignore the second dir command.
2018-04-28 22:16:58 +02:00
James Woodcock 23de2099e0
[CMD] Don't pass CTRL-C to child processes.
CORE-11677

The standard Win32 Console Control Handler will give CTRL-C events to
processes spawned from cmd.exe. If cmd.exe calls GenerateConsolCtrlEvent()
then the child process will receive two CTRL-C events.
2018-04-28 22:16:50 +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 2ea6de8a42
[NTOSKRNL] Also try to extract name from FCB when leaking VACB 2018-04-27 19:01:35 +02:00
Pierre Schweitzer 43836b0fbb
[NTOSKRNL] In !filecache, try to display FCB name
When no name is set in the file object, try to read the name
from the FCB. We only support FastFAT (ours) FCB for now.

This is clearly a hack, but for a kdbg command, so ;-)
2018-04-27 18:57:30 +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
Pierre Schweitzer 579a784e04
[NTOSKNRL] In case we leak a VACB, debug as much information as possible.
CORE-14578
2018-04-27 14:14:56 +02:00
Pierre Schweitzer fcf83315dc
[NTOSKRNL] Noisily dereference mapped VACB on cache release.
It seems that on process killing, some VACB may be deleted while
still mapped. With current reference counting, they will actually
not be deleted, but leaked, and an ASSERT will be triggered.

CORE-14578
2018-04-27 10:23:06 +02:00
Thomas Faber 708d26acf3
[MSXML3] Fix buffer overflow in BindStatusCallback_GetBindInfo. CORE-14570 2018-04-26 15:00:24 +02:00
Jason Johnson 054c11a02c Correctly bugcheck if we aren't returning a usermode thread (#506)
Cause a corresponding bug check to occur for the reason of the user context flag being zero (a system thread), instead of using DbgBreakPoint.
2018-04-24 23:07:02 +01: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
Eric Kohl dd653de251 [SYSSETUP] PS2MousePropPageProvider: Use the UDN_DELTAPOS notification to change the input buffer size in steps of 10 2018-04-23 23:58:49 +02:00
Stanislav Motylkov 955048e50a [MSPAINT] Fix crash on zoom out
- Check the denominator for zero for both zoomed width and height.
- Do not allow to move zoom slider above possible position.
- Move commonly used `zoomTo` function into new header file.

CORE-14539
2018-04-23 20:11:43 +02:00
Eric Kohl 065e70048d [SYSSETUP] Initialize the property sheet page dialog and implement the Defaults button 2018-04-23 00:00:46 +02:00
Hermès Bélusca-Maïto a55d7c692b
[WIN32K] Implement UOI_FLAGS in NtUserGetObjectInformation(). Based from a patch by Jérôme Gardou.
CORE-13447 CORE-14422

This fixes closing nLite 1.4.9.3 (.NET2) application, as well as any
other program that expects that the interactive window station is
reported as being visible. I thank Mark Jansen and Joachim Henze for
help and testing.
2018-04-22 23:00:55 +02:00
Bișoc George e445b305bb [CPL][CONSOLE] Mistake corrections 2018-04-22 22:52:48 +02: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
Mark Jansen 63b6df6bc5
[SDB] Add a fix for Globulation 2 unloading / reloading an aux dll.
Reported in https://savannah.nongnu.org/bugs/?53219
2018-04-22 18:56:44 +02:00
Mark Jansen 8b15a5ecd7
[SDK][ACGENRAL] Add the shim IgnoreFreeLibrary 2018-04-22 18:52:00 +02:00
Mark Jansen 3551953c84
[XML2SDB] Add support for TAG_LINK_DATE and TAG_LINKER_VERSION. 2018-04-22 18:51:53 +02:00
Mark Jansen 2eaf526484
[SHIMLIB] Update helper functions, add ShimLib_StringNDuplicateA 2018-04-22 18:51:48 +02:00
Mark Jansen 0a5a0a3501
[APPSHIM_APITEST] Add a test for the shim IgnoreFreeLibrary 2018-04-22 18:51:21 +02:00
Eric Kohl 4970f92d6c [ZIPFLDR] Fix russian translation 2018-04-22 17:43:05 +02:00
Mark Jansen b569195ecf
[SHELL32] Partially sync SHGetFileInfo with wine to improve folder type names.
CORE-14542
2018-04-22 17:38:44 +02:00
Mark Jansen fd0b834a0a
[ZIPFLDR] Various usability improvements
- Take the user-entered folder into account
- Hide size / ratio for folders
CORE-14543
CORE-14542
2018-04-22 17:38:44 +02:00
Mark Jansen 2c90194ae4
[ATL] Add COMMAND_HANDLER macro.
CORE-14543
2018-04-22 17:38:38 +02:00
Stanislav Motylkov ae9fb8a68d [ZIPFLDR] Add Russian translation 2018-04-22 17:12:47 +02:00
Hermès Bélusca-Maïto e616a456c0
[NTOSKRNL] Minor PnP enhancements.
- For non-PnP devices reported to the PnP manager through the
  IoReportDetectedDevice() function, store the corresponding
  service/driver name and (non-)legacy information inside their
  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\ entries.
- Drivers flagged as "DRVO_BUILTIN_DRIVER" (basically, only those
  created via a IoCreateDriver() call) have their "Service" name that
  contain "\Driver\", which should be stripped before being used in
  building e.g. the corresponding "DETECTEDxxx" PnP compatible IDs.
  CORE-14247

- Use explicit REG_OPTION_NON_VOLATILE flag where needed in the
  IopCreateDeviceKeyPath() calls.
- Save NULL-terminated REG-SZ string properties in the enumeration tree
  for each device enumerated inside \Enum\Root\.
- Always use upcased key name for the "LEGACY_***" elements in \Enum\Root\.
- Add a default "ConfigFlags" value for the legacy elements.
- Simplify few parts of code.
2018-04-22 16:52:45 +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
Hermès Bélusca-Maïto fa103197ad
[NTOSKRNL] Whitespace fixes only. 2018-04-22 16:52:40 +02:00