EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Refreshing Virtual Drive/Disk

Posted: 12/17/2008 08:25:27
by Dave Wright (Standard support level)
Joined: 12/17/2008
Posts: 2

I just want to follow up on Kurt's question, as this is a serious issue for us and we will need to find a solution.
Note that it's very easy to replicate this situation using the Mapper sample with the SDK:
1. Mount the filesystem (e.g. Z:\ -> C:\1)
2. Create a text file on Z: with notepad with the contents "1234", and close the file
3. Edit the same text file on C:\1 with the contents "12345678" save the file. This simulates the file being "changed" outside of the CBFS filesystem (e.g. on a network or database)
4. Open the file on Z: - you'll still see 1234

The NotifyDirectoryChange mechansim isn't a good solution. In almost any case where the filesystem is stored in a database or on a network file system you won't know that a file has changed until you get a request to open it - at which point it's too late to call NotifyDirectoryChange.

Obviously there is a way for you to clear the Windows cache of this data, since you do it in NotifyDirectoryChange.
Would it be possible to add a flag so that the cache is cleared for a file every time the file is opened (before calling into our callback)? While that may impact performance, for shared filesystems it's the only way to ensure consistency. The option could be off for those developing just local filesystems.
Posted: 12/17/2008 08:50:09
by Eugene Mayevski (Team)

Does the same probem happen when you mount the file system using AddNetworkMountingPonit?

For local disks the OS expects the file system to know about internal state changes. For remote disks it doesn't.

Sincerely yours
Eugene Mayevski
Posted: 12/17/2008 09:12:52
by Kurt Griffiths (Standard support level)
Joined: 12/08/2008
Posts: 34

That would be awesome. Having to call from a worker thread certainly complicates things.
Posted: 12/17/2008 09:56:39
by Dave Wright (Standard support level)
Joined: 12/17/2008
Posts: 2

In my testing with Mapper AddNetworkMountingPoint had no effect on the issue.
Posted: 12/17/2008 11:07:53
by Eugene Mayevski (Team)

Dave Wright wrote:
In my testing with Mapper AddNetworkMountingPoint had no effect on the issue.

That's strange. Anyway, first network redirector will be completed, and maybe the problem will go away (at least for AddNetworkMountingPont() call). If no, Vladimir will modify NotifyDirectoryChange functionality.

Sincerely yours
Eugene Mayevski
Posted: 02/05/2010 10:38:07
by WKP  (Standard support level)
Joined: 08/10/2009
Posts: 7


When I call i.e. NotifyDirectoryChange(L"\\a\\b\\c.txt", CallbackFileSystem::fanModified) from other thread it always hangs up...
When I call it from the same thread (which hosts CBFS callbacks), even from callback method (I know this is wrong - I did it only for test) its OK.
I use VC++ and 32bit Win XP Professional.


Posted: 02/05/2010 11:01:41
by Eugene Mayevski (Team)

Moved to helpdesk.

Sincerely yours
Eugene Mayevski



Topic viewed 9568 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!