EldoS | Feel safer!

Software components for data protection, secure storage and transfer

CBFSReadFile PDF vs other Files

Posted: 10/28/2013 09:12:30
by David Reber (Basic support level)
Joined: 10/28/2013
Posts: 2

Why does CBFS open PDF not sequential like other files ( text, image, movie etc. )? And why after reading a couple bytes the Position is not page size comform ?
other Files:
Postition 0 Read Page Size (4096)
Position 4096 Read Page Size (4096)
and so on

Position 0 Read Page Size (4096)
Position 245760 Read 2378 rest: 330
Position 4096 Read Page Size
Position 200704 Read Page Size
Position 236098 Read Page Size <- 236098 modulo 4096 = 2626 not conform
Posted: 10/28/2013 09:39:39
by Eugene Mayevski (Team)

Thank you for the good question.

CBFS itself doesn't read anything. It translates OS requests (which are usually originated by various user-mode processes). So you have (with minor exceptions) what the application asks. If the application asks you to write 2Gb in one chunk, then you'll get such large request.

The exceptions are that in .NET the requests are split into 64Kb blocks for optimal performance of .NET GC and that you can configure maximal size of the block for a write call. None of those exceptions applies to your questions.

Sincerely yours
Eugene Mayevski
Posted: 10/28/2013 09:55:39
by David Reber (Basic support level)
Joined: 10/28/2013
Posts: 2

Is the position also given by the user-mode process ? 
Does the user-mode process say where and how much to read / write ?

Sincerely yours
David Reber
Posted: 10/28/2013 13:15:08
by Volodymyr Zinin (Team)

The position to read/write is given by an originator process. But CBFS also contains the file data cache which can request via the OnRead and OnWrite callbacks another data chunk to read or write. This cache can be switched off by the use of the CallbackFileSystem.FileCacheEnabled property.

BTW you can see what I/O requests are passed to file system by means of Process Monitor from sysinternals.com. Set there to filter only your virtual disk (by adding a filter rule "Path"->"begins with"->"X:").



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