Commit graph

664 commits

Author SHA1 Message Date
Pierre Schweitzer cc5c307b8e
[BTRFS] Fix MSVC build 2019-11-13 00:03:22 +01:00
Pierre Schweitzer 62e630de4c
[BTRFS] Upgrade to 1.5
CORE-16494
2019-11-12 19:35:43 +01:00
Pierre Schweitzer 887200703c
[CLASS2] Drop the drive letter hack 2019-11-11 18:18:32 +01:00
Hermès Bélusca-Maïto 3b2f158593
[NTOS][CLASS2][FFS][WIN32SS] Fix some pool tags so that they correctly appear in pool dump lists.
Reminder: in the code they are defined using reverse byte order
(Windows/ReactOS are little-endian OSes).
2019-11-01 19:12:27 +01:00
Pierre Schweitzer 6889cff5b5
[FLOPPY] Make floppy drives letters being handled by the MountMgr
This involves many changes/fixes in the floppy driver:
- Stop creating ourselves our DOS device, it's up to the MountMgr or to the kernel;
- Report each new floppy drive to the MountMgr (this is a hack for now);
- As a consequence, stop storing the symlink name into the DRIVE_INFO structure;
- Store the device name instead;
- On IOCTL_MOUNTDEV_QUERY_DEVICE_NAME, don't return DOS device, but device name;
- On IOCTL_MOUNTDEV_QUERY_DEVICE_NAME, properly return if buffer is way too small;
- Hackplement IOCTL_MOUNTDEV_QUERY_UNIQUE_ID so that it returns device name.
2019-10-27 11:35:23 +01:00
Robert Naumann 5f99f5c1a7 [REISERFS] Fix a copy paste Error. CID 1363527 2019-10-23 17:23:05 +02:00
Robert Naumann b8032d98a9 [UDFS] Fix a copy paste error. CID1321910 2019-10-23 17:23:05 +02:00
Pierre Schweitzer 457612702b
[MOUNTMGR] Fix invalid WorkerReferences check in QueueWorkItem()
This fixes shutting down ReactOS under certain circumstances, where
the references were incremented, but no worker thread started.
Also, took the opportunity to clarify the WorkerReferences comparisons
where relevant.

CORE-16446
2019-10-22 21:53:48 +02:00
Pierre Schweitzer b68104dd87
[DISK] Forcibly declare our partitions to the MountMgr
Because our disk.sys doesn't do anything related to PnP
(compared to disk_new.sys), forcibly declare our partitions
to the MountMgr so that it can references them and assign
them a DOS drive letter on demand later on.
2019-10-21 16:50:36 +02:00
Pierre Schweitzer 410c606999
[CLASS2] Hackplement support for IOCTL_MOUNTDEV_QUERY_UNIQUE_ID
This is required so that MountMgr can handle devices that are still
using class2 instead of classpnp.
Given we have no unique ID to return, we'll return device path, which
is far from perfect but which is enough for now to have everything
working.
2019-10-21 16:45:28 +02:00
Pierre Schweitzer 16fcf694ef
[MOUNTMGR] Fix setting up reparse index file name
This fixes memory smashing while attempting to volume
reparse index (we were previously trying to copy the
name on itself, in the middle of itself...).
This code won't go farther on FAT, it requires NTFS.

Now, with this, ReactOS can properly boot with MountMgr
handling DOS devices without any crash or code disabled.
Cf: what was written in 7608ac9.

Modifications in class2, disk, and ntoskrnl are still to
be committed to enable all this.
2019-10-21 12:58:30 +02:00
Pierre Schweitzer bced3eaa25
[MOUNTMGR] That was not meant to be committed
Even though it shows there might be a bug in the
code handling remote databases in the MountMgr ;-)

Addendum to 7608ac9
2019-10-21 11:03:43 +02:00
Pierre Schweitzer 7608ac9f71
[MOUNTMGR] Misc. fixes for WorkerThread()
- Properly quit the active loop when we're out of work items;
- Fix timeout duration (setting it to 1s);
- Fix handling the "Unloading" variable in case of a shutdown
  so that waiting loop is properly stopped;
- Documented why we're waiting on VolumesSafeForWriteAccess.

This fixes shutting down ReactOS with work items queued.
This is needed here because no one ever sets that event (properly)
created by SMSS though. A. Ionescu was explaining in 2018 that it's
autochk responsibility, but it doesn't seem to be the case in W2K3.
To be investigated.

This fix with all the previous ones and more uncommitted stuff (yet ;-))
allows reaching the first steps towards a NT5 storage stack:
https://twitter.com/HeisSpiter/status/1186199631740506112
2019-10-21 10:58:14 +02:00
Pierre Schweitzer a058e680b6
[MOUNTMGR] Don't kill Mm when a device has several symlinks
On preflight to compute output size, device name & unique ID were
counted only once per device.
Then, on copy, these two were copied on every MOUNTMGR_MOUNT_POINT
structure. This is counter efficient (data duplication) but also,
it was overruning the output buffer, since the preflight was not
expecting these extra copies.
2019-10-19 18:04:30 +02:00
Pierre Schweitzer a53992180d
[MOUNTMGR] Fix enumerating drive letter for creating new mountpoint
This is purely a copypasta error fix, which was causing MountMgrNextDriveLetterWorker
to fail as no drive letters were enumerated previously.

With that set of patches, MountMgr now properly assigns drive letters to
new devices!
2019-10-19 16:59:58 +02:00
Pierre Schweitzer e359a3c888
[MOUNTMGR] Fix interpretation of QueryDeviceInformation GptDriveLetter
Being TRUE doesn't mean the device is GPT and has a drive letter. It just
means that it's not a GPT device with GPT_BASIC_DATA_ATTRIBUTE_NO_DRIVE_LETTER
attribute. In short, if TRUE, it means that the device can receive a drive
letter mount point.

This fixes MountMgrNextDriveLetterWorker bailing out for any attempt to
assign a drive letter to a device.
2019-10-19 16:59:58 +02:00
Pierre Schweitzer 961693f060
[MOUNTMGR] Fix IsFtVolume so that it returns TRUE only for FT volumes 2019-10-19 16:59:58 +02:00
Pierre Schweitzer 225a1e92bd
[MOUNTMGR] Query proper device when creating mount point
We must query the target device, and not the symbolic link
we attempt to create. The later will always fail as it doesn't
exist yet.

This fixes MountMgrCreatePointWorker not working.
2019-10-19 16:59:57 +02:00
Pierre Schweitzer 7b650d2c3e
[MOUNTMGR] Remove cancel routine before completing pending IRP 2019-10-19 16:59:57 +02:00
Pierre Schweitzer 2da92ac67b
[MOUNTMGR] QueryPointsFromMemory: take into account the multiple MOUNTMGR_MOUNT_POINT
This fixes returning too small structure on an IOCTL_MOUNTMGR_QUERY_POINTS call.
The multiple MOUNTMGR_MOUNT_POINT structures were ignored and thus the data of the
first one were erased by the multiple structures.
MountMgr now returns consistent output on this IOCTL call.
2019-10-17 22:42:47 +02:00
Serge Gautherie f5f52417cb [MOUNTMGR] QueryPointsFromSymbolicLinkName(): Fix a copypasta
Addendum to r55156.

CORE-16371
2019-10-16 21:07:47 +02:00
Serge Gautherie 09beb7502e [MOUNTMGR] Properly look for device and break when found
Also use same pattern in MountMgrCreatePointWorker().

Addendum to a7f97cc70f.
2019-10-06 10:58:30 +02:00
Serge Gautherie 9f8e5d1ce0 [MOUNTMGR] QueryPointsFromMemory(): Do not leak DeviceName.Buffer
Follow-up to 7601011f4e.
2019-10-06 10:52:05 +02:00
Pierre Schweitzer a7f97cc70f
[MOUNTMGR] Properly look for symlink and break when found
This fixes a bug where MountMgr was returning first found entry
on query even when not matching the requested device.
2019-10-05 21:30:55 +02:00
Serge Gautherie ed9f0dca14 [USBPORT] USBPORT_InvalidateEndpointHandler(): Properly enumerate endpoints 2019-09-29 13:39:12 +03:00
Thomas Faber 6ec38aa942
[HDAUDBUS] Build a device instance ID from Codec & node number. CORE-13702 2019-09-27 21:29:41 +02:00
Thomas Faber 4c6cc29bb8
[HDAUDBUS] Fix timeouts for hardware register operations. CORE-15874
Most needed to be multiplied by 10 to match Haiku's behavior.
In one case, the broken timeout was offset by a higher number of loop
iterations, which is now  restored.

This should fix failures on real hardware that result in the
"unable to exit reset" print, and avoid a possible subsequent Pnp
manager crash.

Compare with the following (both snooze and KeStallExecutionProcessor use microseconds):
ff38df48cf/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp (L466)
ff38df48cf/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp (L357)
ff38df48cf/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp (L978)
2019-09-26 10:27:31 +02:00
Serge Gautherie 085528c31a [MOUNTMGR] HasDriveLetter(): Simplify code by using a for() loop 2019-09-22 10:25:09 +02:00
Pierre Schweitzer 20b4f0a231
[FLOPPY] Implement IOCTL_MOUNTDEV_QUERY_DEVICE_NAME 2019-09-14 10:48:19 +02:00
Pierre Schweitzer bf6215c601
[MOUNTMGR] Properly enumerate pending IRPs on cleanup
CORE-16370
2019-09-14 09:41:47 +02:00
Pierre Schweitzer 0a5f86d44a
[MOUNTMGR] Fix MountState usage in MountMgrTargetDeviceNotification
CORE-13882
2019-09-13 20:08:39 +02:00
Pierre Schweitzer 5c678a76a6
[MOUNTMGR] Fix broken check
Only mark volume mounted if it's not waiting for unloading

CORE-13882
2019-09-13 20:08:39 +02:00
Timo Kreuzer a71a6531ef [UNIATA] Fix uniata on x64 2019-09-08 10:39:01 +02:00
Thomas Faber 5d4f13f625
[ACPICA] Update to version 20190816. CORE-16368 2019-09-08 07:46:53 +02:00
Pierre Schweitzer 7ff3658f10
[BTRFS] Reenable the MountMgr thread
Now that IOCTL_MOUNTMGR_QUERY_POINTS and IOCTL_MOUNTMGR_CHANGE_NOTIFY have
been fixed, the thread no longer eats 100% CPU nor prevent ReactOS shutdown
2019-09-07 23:28:58 +02:00
Pierre Schweitzer d904ee19c5
[MOUNTMGR] Properly return EpicNumber in MountMgrChangeNotify 2019-09-07 23:07:54 +02:00
Serge Gautherie 400eb23a64 [BTRFS] Revert "Allow driver to start at first stage when no hive is present."
Not needed anymore.

This reverts commit 80e11516b1.
2019-09-07 19:58:03 +02:00
Serge Gautherie e08dc30569 [BTRFS] Revert "Leak the root stream file object on mount."
Not needed anymore.

This reverts commit c13ccc92f6.
2019-09-07 19:58:03 +02:00
Pierre Schweitzer 6e3c0d360b
[BTRFS] bool must be 1-sized
CORE-16366
2019-09-06 08:56:26 +02:00
Serge Gautherie b45f27cf2e [MOUNTMGR] Remove a leftover UNREFERENCED_PARAMETER()
Addendum to 77657c22c9.
2019-09-06 08:34:14 +02:00
Pierre Schweitzer ff19ce934b
[MOUNTMGR] Don't overrun output buffer in QueryPointsFromMemory 2019-09-06 08:30:18 +02:00
Pierre Schweitzer 26a31b160a
[MOUNTMGR] Fix QueryPointsFromSymbolicLinkName and make it working
Select the current stack location for output buffer
And set output size so that buffer gets properly copied to caller
2019-09-06 08:28:36 +02:00
Pierre Schweitzer d592e00dfa
[MOUNTMGR] Fix QueryPointsFromMemory and make it working
Select the current stack location for output buffer
And set output size so that buffer gets properly copied to caller
2019-09-05 08:36:19 +02:00
Pierre Schweitzer 70d29ec423
[MOUNTMGR] Properly validate input buffer size
This avoids IOCTL_MOUNTMGR_QUERY_POINTS always failing
2019-09-05 08:36:19 +02:00
Pierre Schweitzer 77657c22c9
[MOUNTMGR] Fix global symbolic link creations
They were wrongly pointing to the original target once rewritten
instead of pointing to the proper target: the device.

This notably fixes opening the MountMgr device from user
mode (to perform IOCTL calls, for instance), and might
also fix various bugs dealing with global namespaces.
This might have some various effects in ReactOS~.
2019-09-05 08:36:19 +02:00
Pierre Schweitzer dcd463ba98
[BTRFS] Fix fileinfo.c build 2019-09-02 22:17:17 +02:00
Pierre Schweitzer 021e25f249
[BTRFS] Fix create.c build 2019-09-02 22:02:45 +02:00
Pierre Schweitzer fe0a6c9be4
[BTRFS] Fix dirctl.c build 2019-09-02 21:48:54 +02:00
Pierre Schweitzer 318da0c18c
[BTRFS] Upgrade to 1.4
CORE-16354
2019-09-02 08:19:48 +02:00
Stanislav Motylkov 053bf17e8b [BOOTVID] Refactor font data from i386 and arm bootdata.c (#1891) 2019-09-01 23:01:40 +02:00