EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CBFS as local cloud cache

Posted: 02/25/2014 10:46:58
by Eugene Mayevski (Team)

Hmm. That all sounds very strange. Are you calling NotifyDirectoryChange somewhere in between (in a separate thread)? NotifyDirectoryChange on a directory will invalidate handles to all currently opened files if memory serves (Vladimir will comment on this).

Also, how are reading the file? Is it some component or you just read FileStream instance or ... ?

Sincerely yours
Eugene Mayevski
Posted: 02/25/2014 11:04:45
by Peter Williams (Standard support level)
Joined: 02/18/2014
Posts: 10


I am not calling NotifyDirectoryChange anywhere.

In my test program IOTester, i am simply calling File.Copy(CBFSPath, LocalTempFilePath).

My readfile code does the following:

First, I am checking to see if the file being requested is still being downloaded. once that is complete, i check to see if we have an existing usercontext. If not i set one and return the requested bytes. Else, i use the existing and return the requested bytes.

I can post my source code from my readfile() callback if you would like.

Posted: 02/25/2014 11:04:46
by Volodymyr Zinin (Team)

The 0xC000022D error means STATUS_RETRY. CBFS returns such error in the case of the timeout. The timeout is set during the MountMedia call. During the development/debugging you can set it to 0 in order to disable.
For details see the CBFS FAQ:
Posted: 02/25/2014 11:18:16
by Peter Williams (Standard support level)
Joined: 02/18/2014
Posts: 10

Eugene and Vladimir,

Thank you thank you thank you! That was the exact issue.

Reseting the timeout to infinite while the readfile() thread sleeps until the download is complete did the trick.




Topic viewed 4883 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!