euripedessobrinho / dokan

Automatically exported from code.google.com/p/dokan
0 stars 0 forks source link

Notepad access over a share with Win 7 as host does not work #181

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Created a share on a drive that is being driven by Dokan
2. Open a .txt file with Word = OK
3. Open a the same file with Notepad
4. In windows 7 (Do not even need another machine - this is not a library)
- a) Create a share via Manage to allow everyone access on a directory in the 
DOKAN Drive.
- b) Go to Network
- c) Select Machine name
- d) Go to the share name created
- e) Open a .txt file in Wordpad = OK
- f) close and then attempt to open via notepad

What is the expected output? 
- Notepad can open the file on the Win 7 Host, on the Dokan drive
- Wordpad works regardless of access (i.e.on Host and via share)
- Share access Open with notepad works on XP SP3

What do you see instead?
http://liquesce.codeplex.com/workitem/7025

What version of the product are you using? 
- 0.5.3
On what operating system?
- Works as expected on XP SP3
- Does not work on Win 7 (32)

Please provide any additional information below.
http://liquesce.codeplex.com/workitem/7025

Original issue reported on code.google.com by smurf...@gmail.com on 29 Aug 2010 at 4:06

GoogleCodeExporter commented 9 years ago
Installed 0.5.1 and that reports the same issue when attempting to open with 
Notepad via a share on the Win 7 Host

Original comment by smurf...@gmail.com on 30 Aug 2010 at 11:41

GoogleCodeExporter commented 9 years ago
Not just Win 7 but also XP..
It seems when notepad opens over a netwrk it makes an extra call 
"QueryAllInformationFile"

I get the following report when notepad attempts to open the file
And then notepad reports the error

Date & Time:    02/10/2010 18:58:30
Event Class:    File System
Operation:  QueryAllInformationFile
Result: NOT IMPLEMENTED
Path:   \\Xp_dev\(2010) Aphrodite\New Text Document.txt
TID:    2180
Duration:   0.0565692

Original comment by smurf...@gmail.com on 2 Oct 2010 at 6:05

GoogleCodeExporter commented 9 years ago
Dokan's sources; it doesn't deal with oplocks at all:
http://code.google.com/p/dokan/source/browse/tags/dokan-0.5.3/sys/fscontrol.c?r=
169
The code of the DokanUserFsRequest(), which you see there at first, just 
returns STATUS_INVALID_PARAMETER upon oplock fsctls.
Thus, trouble with shares.

Original comment by smurf...@gmail.com on 5 Jan 2011 at 4:47

GoogleCodeExporter commented 9 years ago
Thank you for your report.
When I added fake implementations of op lock controls (just return 
STATUS_SUCCESS), notpad could open a file. Dokan needs to support op locks. 
BTW, this doesn't solve Win7 x64 file sharing issue.

Original comment by asa...@gmail.com on 7 Jan 2011 at 1:33

GoogleCodeExporter commented 9 years ago
Solved by this:

It seems that this is something to do with SMB 1 opportunistic locking.
The Liquesce service that is feeding the XP client will need to have the 
following registry key REG_DWORD value set to 0:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Ena
bleOplocks

See the following for an explanation of the setting: 
http://support.microsoft.com/kb/296264

Original comment by smurf...@gmail.com on 29 Apr 2012 at 5:53