reactos/drivers
Hermès Bélusca-Maïto 9e07d0cc74
[PARTMGR] Trigger mount points removal when a partition/volume is deleted (#7034)
CORE-18139

When a partition is created, PartMgr notifies the volume manager
(FTDisk on Windows <= 2003, VolMgr on Vista+) of its presence.
(Note that currently in ReactOS, our partmgr does the job of both
PartMgr *AND* VolMgr.)
The VolMgr then sends a `GUID_DEVINTERFACE_VOLUME` PnP notification,
which is handled by the mount manager (MountMgr) as part of a
`GUID_DEVICE_INTERFACE_ARRIVAL` notification:
```
MountMgr!MountMgrMountedDeviceNotification -> MountMgrMountedDeviceArrival
followed by
MountMgr!MountMgrTargetDeviceNotification
```

When a partition is deleted, via e.g. Disk Management or DiskPart,
it can be observed, on Windows, that the PartMgr gets notified by
the PnP manager, as part of QueryDeviceRelations. Before actually
removing the partition, it notifies the VolMgr. The latter invalidates
any volume mounted on that partition (`*PartitionRemoved*` functions
for basic volumes), then requests (`*DeleteMountPoints` function)
the MountMgr to delete all the mount points associated to the volume:
```
VolMgr!*DeleteMountPoints
-> MountMgr!MountMgrDeviceControl -> MountMgrDeletePoints
```
**** THIS is the new functionality that is implemented for ReactOS ****
**** in the present commit.                                        ****

Following this, a subsequent PnP notification is sent, which calls
```
MountMgr!MountMgrTargetDeviceNotification
-> MountMgr!MountMgrMountedDeviceRemoval
```
(Note that this observation somewhat invalidates the modification
made in ReactOS commit 62a4f9d42b : our MountMgr placed in Windows
*WOULD* receive a `GUID_TARGET_DEVICE_REMOVE_COMPLETE` target-device
notification...)

Finally, a `GUID_DEVICE_INTERFACE_REMOVAL` PnP notification is sent
to the MountMgr:
```
MountMgr!MountMgrMountedDeviceNotification
-> MountMgr!MountMgrMountedDeviceRemoval
```
2024-07-11 13:46:52 +02:00
..
base [KDVM] Fix definition of RtlEqualMemory() (#6988) 2024-06-10 22:29:22 +02:00
battery [BATTC] Make input buffer on IOCTL_BATTERY_QUERY_TAG optional 2024-02-01 10:08:51 +01:00
bluetooth
bus [ACPI] Register a device interface class with ACPI fans 2024-05-22 20:23:06 +02:00
crypto
filesystems [CMAKE] Clang*: Add '-Werror=unknown-warning-option' for C/CXX (#6383) 2024-05-31 16:26:11 +02:00
filters
hid
input [INPORT] Fix swapped buttons for the inport bus mouse 2023-08-05 16:40:07 +03:00
ksfilter [AUDIO] Implement support for WAVE_FORMAT_EXTENSIBLE audio format (#6686) 2024-04-11 11:59:14 +02:00
multimedia [BDASUP][KMIXER][MMIXER][STREAM] Replace meaningless YDEBUG (#5818) 2023-10-31 12:04:24 +00:00
network [DD] Keep the network drivers infs 8.3 like on MS Windows (#7007) 2024-06-17 22:41:31 +02:00
parallel
processor [DRIVERS][INF] Update Romanian (ro-RO) translation (#6088) 2023-12-09 20:19:54 +01:00
sac
serial
setup [BLUE] Optimize ScrIoControl for speed (#5185) 2023-03-28 08:12:38 +09:00
storage [PARTMGR] Trigger mount points removal when a partition/volume is deleted (#7034) 2024-07-11 13:46:52 +02:00
usb [USBOHCI] Fix broken indentation 2024-03-23 23:08:01 +01:00
wdm [AC97] Use individual Decibel range for Master Volume control (#6950) 2024-06-01 12:31:53 +02:00
wmi
CMakeLists.txt