Number of times drive can be started and stopped capped at 10 with latest checkout from head

57 views
Skip to first unread message

Andreas Schuler

unread,
May 22, 2009, 3:47:20 PM5/22/09
to Dokan
Hi all,

I was wondering whether anyone else has seen either of these problems:


1)
All I am basically doing is to call 'DokanMain', then 'DokanUnmount'
repeatedly (of course I do wait until DokanMain returns before I run
it again).

What I have noticed is that there seems to be a hidden cap at 10,
meaning that I consistently fail with DokanMain returning
DOKAN_MOUNT_ERROR (-5). Once I exhausted my 10 attempts it seems like
the driver does not allow me to start my drive again, even if I
restart my process.

I have tried to restart the mounter with no effect. I therefore assume
the issue is with the driver somehow.


2)
Another issue I have found is with 'DOKAN_OPTION_KEEP_ALIVE'. When
setting this option I cannot get DokanMain to return by calling
DokanUnmount.

Does anyone know under what circumstances I would even need this?




Again, both issues are with the latest code from head.

Has anyone else run into either of these problems? Any suggestions?
Have there been changes with how DokanMain needs to be called?


Thanks,

Andreas

Joe Burmeister

unread,
May 26, 2009, 6:56:51 AM5/26/09
to do...@googlegroups.com
Hi Andreas,

I have noticed something that sounds similar to 1).

I'm using Visual Studio for my filesystem, and have two drives, i.e.
two threads calling DokanMain. (This is because both heavily share
resources (DBs mainly) and it simplifies + optimizes to have them in
the same process.)

Old habbits die hard and I keep doing shift-F5 when I want to make
some big changes. This means the drives don't get shutdown properly.
Sometimes this ends up with one or both the the drives not able to be
setup, like 1). What I've noticed is that using winobj.exe is that
there are sometimes dokan devices left over from the previous
executions. Debugging into a failing DokanMain I see it's trying to
recreate one of those devices, which of course it can't because they
exist. I'm guessing these devices should be closed down when what they
connect to is dead, but for some reason haven't. I've had a quick look
through the code a few times and haven't been able to see anything I
can do, and have put of looking harder for later. For now I curse
myself and just reboot the VM and get going again.

Don't know anything about 2) though.


Joe
Reply all
Reply to author
Forward
0 new messages