-
Notifications
You must be signed in to change notification settings - Fork 665
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong drive letter assigned and mounted #317
Comments
Hi @rkrikava, I have not been able to reproduce the behavior you describe. |
It doesn't happen reliably but I'd say probably 1 in 25 times running the app. I will try to reproduce with the mirror app. |
@rkrikava any news from this ? |
I haven't been able to reproduce this in the mirror app, yet. I had set up On Tue, Sep 6, 2016 at 4:05 PM, Liryna notifications@github.com wrote:
Roland Krikava |
Please find attached a zip containing everything needed to reproduce the bug on a Win10 x64 machine. The README.txt explains the steps necessary. I'm not quite sure why this bug could not be produced in a VM, but on my machine it reliably triggers after about 22 iterations. |
Have you been able to reproduce the bug? Let me know if you have any questions. |
@rkrikava sorry didn't had time for it now 😢 busy week |
It seems you are using mount manager option here. Have you try without |
I ran the test without '/o' option. Currently at 375th iteration of mouting/umounting, so it looks like this bug is mount manager specific. @Liryna It seems there is more than one bug:
What functionality am I loosing by omitting the mount manager? A little off topic: Is there a way to keep (or register) a mount point across user sessions / reboots? Thanks, |
Ah thank you for your test @rkrikava ! Mount manager give you the ability to use Recycle bin and some advanced win32 api will only work on the device if the option is enabled. The option is generally only used if you need such things. But here the mount point reported should be updated according to the real one 👍 |
@Maxhy confirmed me that when mount manager is used, we suggest the mount manager during We should look in a way to update the real mount point or return an error. |
This will probably have to be done in 2.0.0 since it will need to change/create an IRP to update the user land FS with the real mount point before Mounted event. For information, this is very rare to produce. You really need to make a race with another mount. |
A bit off topic, but would you mind explaining a bit more why it is so important to keep kernel/user protocol compability in a minor release? Why couldn't it always be required that the same dokanX.dll/dokanX.sys pair is installed together? Is it because you want others to distribute their own dokanX.dll? |
Hi @Kerbox , Exactly, I would like that all application using dokan 1.x.x (with embedded dokan1.dll) can simply check if dokan1.sys is already present or not, if it is: they can safely know that it is compatible with their application. This also gives the ability to have multiple software using different dokan version with the same MAJOR API on the system. https://github.com/dokan-dev/dokany/wiki/How-to-package-your-application-with-Dokan Tell me I answered correctly or if something is missing in the wiki 😃 |
That is a fair reason. Pity it makes fixing bugs like this and adding features a bit cumbersome, but as long as the major release schedule isn't too infrequent, I guess it's not a problem. |
I also encountered this issue. We have one particular Windows 10 machine where this bug is reproduced consistently. However, we can not reproduce it in other Windows machines that we have. When we are waiting for the eventual notification, I'm wondering if there is any reliable way for our FS to find out which drive letter was actually assigned? |
I think the current workaround should probably be to scan all devices and find the one with the correct information that you have set in GetVolumeInformation (serial number, name, FS,...). |
Liryna: Thank you for the suggestion. That solution can work. However, there is till a problem in this case. Supposed I request Dokany to mount at D: but it ends up mounting up E: instead:
|
@trungdinhtrong this behavior happens because we currently do not update the internal mountpoint with the final mountpoint that the kernel give us during IOCTL_MOUNTDEV_LINK_CREATED. I will try to make a patch to fix this issue. |
Hi @trungdinhtrong , I made a change 60311c2 that will make able to use DokanRemoveMountPoint on the new mount point. Currently userland has still no idea of the new mount point. This will only be done in 2.0.0. |
Hi @Liryna , Finally got a chance to verify your change - it works on my side also. Thank you :) |
Here is How to Change Drive Letter name in Windows 10 Right click on the “Start” icon positioned at the lower left corner of your screen. Click on “Disk Management” to open Disk Management Settings Window. Under the “Volume” section, right click on any hard drive and click on “Change Drive Letter and Paths”. For instance, right click on “New Volume (E:) and click on the same. Click on “Change” to allow the name and path changes to be made on this drive. Now, you can drop down the letters list to choose a new driver letter amongst the list of letters available. After selecting the desired choice, click on “OK”. A warning window will be displayed on the screen saying that “some programs that rely on drive letters might not run correctly. Do you want to continue?” Click “Yes” to accept the driver letter and path changes. Source:- [( http://merabheja.com/change-drive-letter-name-in-windows-10/ )] |
on occasion (linked above) YASFW would ignore provided mount point and would use first unused drive letter instead. it that case during unmount both YASFW behavior changes (two "fairwell" lines are omitted from output) and - notifications of "new drive" and "removed drive" are not sent to userland applications. i suspect Line 568 in 31f8381
Frankly, the whole design seems off.
I wonder how Windows doing it on regular USB Thumb insertion, is there some monitoring part in every user session for it? Like that OLE DLL probably responsible for "Eject" command in Windows Explorer? or is there some system service that can be asked to initiate it on all the desktops?.. Dokany does not have a service but only a driver, so there is some kind of "who will wbe shouting out?" problem there indeed. Funny thing is that |
...or maybe even compiled and linked into .EXE from .OBJ files. This has one more consequence - hard to make a shim/bridge/filter like layer. But maybe it is stupid and no one actually can ever need that. |
You mean the one installed in system32 ? We actually suggest apps to use their own version
That's against the license 😉 It is true that a service could solve the broadcast issue. Actually, the Dokan legacy code had one but it was removed. |
This is now fixed in 2.0.0 see changelog |
Environment
Check List
Description
Every so often dokany will assign drive letter 'M' instead of the specified mount point (In my case "S:"), and mounts the file system on 'M:'. When this bug occurs, the drive 'M' remains after the drive is unmounted. Below I have provided the pertinent sections of the kernel logs.
Logs
01421044 5660.48828125 [DokanFS] ==> DokanDispatchIoControl
01421045 5660.48828125 [DokanFS] ProcessId 10988
01421046 5660.48828125 [DokanFS] IdType = DGL
01421047 5660.48828125 [DokanFS] => DokanGlobalDeviceControl
01421048 5660.48828125 [DokanFS] IOCTL_EVENT_START
01421049 5660.48828125 [DokanFS] ==> DokanEventStart
01421050 5660.48828125 [DokanFS] Using Mount Manager
01421051 5660.48828125 [DokanFS] Checking for MountPoint \DosDevices\S:\
01421052 5660.48828125 [DokanFS] DiskDeviceName: \Device\Volume{d6cc17c5-1722-4085-bce7-964f1e9f5de9} - SymbolicLinkName: \DosDevices\Global\Volume{d6cc17c5-1722-4085-bce7-964f1e9f5de9} - MountPoint: \DosDevices\S:
01421053 5660.48828125 [DokanFS] IoCreateDevice DeviceType: 8
01421054 5660.48828125 [DokanFS] SymbolicLink: \DosDevices\Global\Volume{d6cc17c5-1722-4085-bce7-964f1e9f5de9} -> \Device\Volume{d6cc17c5-1722-4085-bce7-964f1e9f5de9} created
01421055 5660.48828125 [DokanFS] MountId:23
01421056 5660.48828125 [DokanFS] DeviceName:\Volume{d6cc17c5-1722-4085-bce7-964f1e9f5de9}
01421945 5660.49414063 [DokanFS] ==> DokanDispatchIoControl
01421946 5660.49414063 [DokanFS] ProcessId 10988
01421947 5660.49414063 [DokanFS] IdType = DCB
01421948 5660.49414063 [DokanFS] => DokanDiskDeviceControl
01421949 5660.49414063 [DokanFS] DiskDeviceControl Device name \Device\Volume{d6cc17c5-1722-4085-bce7-964f1e9f5de9}
01421950 5660.49414063 [DokanFS] IOCTL_MOUNTDEV_LINK_CREATED
01421951 5660.49414063 [DokanFS] MountDev Name: \DosDevices\M:
01421952 5660.49414063 [DokanFS] Mount Point already assigned to the device. New mount point ignored.
01421953 5660.49414063 [DokanFS] <= DokanDiskDeviceControl
01421954 5660.49414063 [DokanFS] status = 0x0
01421955 5660.49414063 [DokanFS] status = STATUS_SUCCESS
01421956 5660.49414063 [DokanFS] status = 0x0
01421957 5660.49414063 [DokanFS] status = STATUS_SUCCESS
01421958 5660.49414063 [DokanFS] <== DokanDispatchIoControl
The text was updated successfully, but these errors were encountered: