Commit graph

373 commits

Author SHA1 Message Date
Pierre Schweitzer 4fe7aafe10
[FASTFAT] Magic values-- 2018-08-19 09:56:12 +02:00
Pierre Schweitzer 047479e0a2
[FASTFAT] Don't leak statistics on dismount 2018-08-18 19:03:30 +02:00
Pierre Schweitzer 639e6d635f
[FASTFAT] Reduce the usage of the generic allocation tag
And use tag compatible with MS FastFAT, to use debug with WinDBG
2018-08-18 19:03:30 +02:00
Pierre Schweitzer 50b00f0fcc
[FASTFAT] Implement delayed close
When we're about to close a file (ie, forget everything about it
and release any associated structure), actually delay it.
This allows keep data fresh in memory for faster reuse in case
it would be required. The effective closing will only happen after some time.

For specific operations, this will produce a real speed up in ReactOS.
For instance, with that patch, Winamp starts within seconds, instead of dozen
of minutes.
In most cases, it will bring ReactOS to performances it had before fixing
the huge leak in FastFAT (commit 94ead99) without leaking the whole FS.

For now, due to regressions, this is only activated for files and not
for directories. Once it gets fixed, it will be enabled for both.

CORE-14826
CORE-14917
2018-08-18 19:03:30 +02:00
Thomas Faber 5403094339
[USBPORT] Fix 64 bit warnings. 2018-08-16 14:14:42 +02:00
Thomas Faber bd4529b717
[USBPORT] Specify the correct length for the root hub's hub descriptor. 2018-08-16 14:14:31 +02:00
Thomas Faber db54e5eb1c
[USBPORT] Remove an unnecessary check in USBPORT_AllocateBandwidthUSB2. CID 1434261 2018-08-16 14:14:23 +02:00
Thomas Faber 7ad4cf96f3
[USBPORT] Remove an unnecessary check in USB2_ConvertFrame. CID 1434244 2018-08-16 14:14:15 +02:00
Thomas Faber d1e5699e60
[USBPORT] Accept negative BusTime in USB2_MoveTtEndpoint. CID 1434226 2018-08-16 14:14:04 +02:00
Mike Swanson 3c7e9bb332 Remove unnecessary executable bits 2018-08-15 18:29:09 +02:00
Pierre Schweitzer c13ccc92f6
[BTRFS] Leak the root stream file object on mount.
For whatever (unknown) reason yet, this stream file object
seems to be deleted when still in use while installing
ReactOS on BtrFS partition, leading to use after free.

So, quick and dirty hack: leak it to prevent deletion.

CORE-13769
2018-08-15 16:38:56 +02:00
Pierre Schweitzer 80e11516b1
[BTRFS] Allow driver to start at first stage when no hive is present.
Contrary to upstream, we will ignore failure when opening registry
and will keep going.

CORE-13769
2018-08-15 16:35:05 +02:00
Serge Gautherie 7d6bda16c6
[REACTOS] Improve how some ASSERTMSG() message values are printed: enforce ending "\n".
NB: Not touching calls in "third-party" code: class and classpnp.
2018-08-08 22:03:45 +02:00
Timo Kreuzer 9e066abe2a [DRIVERS] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Timo Kreuzer f8bf0e9c3a [UNIATA] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Timo Kreuzer c1944118ca [USBPORT] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Stanislav Motylkov 0854c69a75 [I8042PRT] Move DMI/SMBIOS parsing functions into library 2018-08-02 21:29:57 +02:00
Stanislav Motylkov a9f20984cd
[I8042PRT] Dump SMBIOS tables into registry for usermode access
Reference:
https://social.msdn.microsoft.com/Forums/en-US/0bb0840e-85f4-4cdb-9710-7581f7348f2f/how-to-get-motherboard-serial-number-without-using-wmi-in-c

CORE-12105 CORE-14867
2018-08-02 21:15:28 +02:00
Timo Kreuzer 3a85d2764c [BLUE] Use ByteOffset.QuadPrt instead of ByteOffset.LowPart 2018-07-07 16:15:58 +02:00
Timo Kreuzer 741c3c0022 [BLUE] Reformat and add missing success checks + DPRINTs on failure 2018-07-07 16:15:58 +02:00
Timo Kreuzer 64f46045af [BLUE] Formatting, no code change 2018-07-07 16:15:58 +02:00
Timo Kreuzer ca9fd861aa [DRIVERS][NTOS][NDK] Use IO_STACK_LOCATION instead of EXTENDED_IO_STACK_LOCATION and remove the latter from NDK 2018-07-01 14:45:21 +02:00
Thomas Faber 05b4bd3833
[AFD] Respect the maximum receive buffer size for datagram sockets. CORE-14048 2018-06-10 13:00:37 +02:00
Pierre Schweitzer 52f0f80a83
[FASTFAT] Don't add an extra \, when renaming a file at root.
This fixes failures to rename a file where destination is
the root of a FAT volume.

CORE-10503
2018-06-09 22:17:17 +02:00
Pierre Schweitzer 6aa4beeefb
[FASTFAT] Use the FastFAT mechanism for counting clusters already implemented
This allows us having more accurate statistics regarding available clusters
count. Even though FastFAT and chkdsk still don't agree!

CORE-3877
2018-06-09 18:23:07 +02:00
Pierre Schweitzer 704baed2df
[FASTFAT] Start implementing FAT32 statistics support
Not fully perfect yet, chkdsk still complains.

CORE-3877
2018-06-09 12:36:43 +02:00
Pierre Schweitzer 04640f9264
[FASTFAT] Save the FSINFO sector location 2018-06-09 12:11:43 +02:00
Pierre Schweitzer 01e2877161
[FASTFAT] Properly check for buffer size on dir enumeration.
This avoids improper returns when multiple entries are requested
and, in rare circumstances, entries not being seen by umode.

CORE-14699
2018-06-07 19:34:47 +02:00
Serge Gautherie c1256dda20 [EXT2FS][REISERFS] VSSolution: Actually disable C4189 errors (#540)
Multiple "error C4189: '[...]': local variable is initialized but not referenced".

Thanks to Yuntian Zhang, who hinted at this in CORE-11836.

CORE-11280
2018-06-05 20:16:22 +02:00
Pierre Schweitzer 9f3169b295
[FASTFAT] Lock DirResource on flush in case we're updating entry
CORE-14660
2018-05-28 19:37:56 +02:00
Pierre Schweitzer fc788cf2fd
[FASTFAT] Lock DirResource when modifying an entry on disk.
Likely not optimal, but fixes some races conditions where
the directory is uninit in the middle of the write.
2018-05-26 17:13:08 +02:00
Pierre Schweitzer c7806a6b29
[BTRFS] Upgrade to 1.0.2
CORE-14655
2018-05-26 10:44:36 +02:00
Pierre Schweitzer 47b9db9d02
[FASTFAT] Initialize cache if neded for changing volume label.
CORE-14654
2018-05-26 10:12:55 +02:00
Eric Kohl f7c01906e7 [STORPORT] Enumerate attached devices
- Implement AcquireSpinlock, ReleaseSpinlock and GetExtendedFunctionTable notifications.
- Implement a bus scan routine, borrowed from scsiport.

Storport and storahci are now able to detect a disk device attached to a Virtual Box AHCI controller.
2018-05-24 11:39:47 +02:00
Pierre Schweitzer b4363068d1
[FASTFAT] Properly handle IRPs that can wait and these that cannot.
CORE-14634
2018-05-22 21:30:08 +02:00
Pierre Schweitzer e9e14be661
[FASTFAT] Properly queue pending write IRPs.
Addendum to 30b836b
2018-05-21 10:41:59 +02:00
Pierre Schweitzer 30b836bf3f
[FASTFAT] When extending a file, also lock the DirResource.
This avoids race conditions under high IOs and thus corruption on
the FS, or assertions failures in the kernel.
Easily triggered by building ReactOS on ReactOS ;-).
2018-05-21 10:30:14 +02:00
Pierre Schweitzer a10f6c7a0c
[FASTFAT] Fail if allocating the stream FO fails. 2018-05-20 13:53:43 +02:00
Pierre Schweitzer 7283f3cfd9
[FASTFAT] Addendum to d69f318 2018-05-19 13:46:34 +02:00
Pierre Schweitzer d69f31848e
[FASTFAT] Misc. fixes spotted by Thomas. 2018-05-19 10:07:14 +02:00
Pierre Schweitzer 7c01587680
[FASTFAT] Completely rewrite support for dirty volumes.
Until now, our support for dirty volumes was totally broken
to a point where, on FAT32 volume, the dirty couldn't even
be written nor read from the disk.

This commit totally rewrites its handling, for both FAT16 and FAT32
so that it's now fully functionnal. Furthermore, it also gets
totally compatible with our vfatlib, and thus, autochk.
Now, on mount, FastFAT will check if the volume is dirty or not, and
autochk will be able to ask for a repair if dirty. vfatlib will
repair the volume and remove the dirty bit. So that, on next
reboot, the volume will be mounted clean.

As a reminder, the dirty bit is set immediately after mounting
the volume, so that, if you crash or have a powercut, autochk
will always attempt to repair your volume (with more or less,
that's FAT!).

If you want to experience without breaking your FAT volume,
just boot, open a cmd prompt and type: fsutil dirty set c:
and reboot!

CORE-13758
CORE-13760
CORE-13759
2018-05-18 23:05:05 +02:00
Pierre Schweitzer efa75dd5b2
[FASTFAT] Allow locking system volume on boot.
This is a hack, and totally not the default behavior.
But it will allow autochk locking the boot volume in
order to verify it on boot, in case it would have
been improperly dismounted.

CORE-13759
2018-05-18 23:05:05 +02:00
Pierre Schweitzer a837694518
[FASTFAT] Uninit directory cache on last handle close.
CORE-14629
CORE-14557
2018-05-18 14:51:24 +02:00
Pierre Schweitzer 3c3ebe3320
[FASTFAT] Only initialize directory cache on use.
This avoids initializing cache directly on directory
open/create.
The advantage is we reduce the load on cache manager
and on memory manager by avoiding creating everytime
a stream file object, and initializing cache for it.

This will avoid initializing cache for started
applications 'current directory' which is just opened
for having a valid handle but no read/write is performed
in it, by default.

This is a step forward for autochk.

CORE-14629
2018-05-18 14:09:30 +02:00
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