EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Callbackfs: OnRead callback size of reads?

Posted: 04/25/2008 11:34:42
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

What determines the size of the BytesToRead parameter that is passes in to the OnFsReadFile callback?

Running it in debug mode it seems to be 1280 for every read in the sample that I am copying. How can I make that a larger value so I can read files in bigger chunks?
Posted: 04/25/2008 11:42:25
by Eugene Mayevski (Team)

That's amount of data requested by the OS. CBFS doesn't do it's own reading.

Sincerely yours
Eugene Mayevski
Posted: 04/25/2008 11:48:20
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

Yes, I realize that, but do you know of some way of influencing the OS to ask for more than it is asking for?

For example, does changing the sector size have any effect on this? Is it somehow related to the size of the file?
Posted: 04/25/2008 13:52:38
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

:) Never mind!

I realized after thinking about this more thoroughly, that the influencing factor is the application that opens the file. It determines how many bytes it wants to read from the file and asks the operating system for that amount and then that number is just passed on to us.

So, for my application, I have a certain user application that is going to be the foremost user of the Virtual Disk that I am providing, so I just have to get that user application to adjust the way it is reading files.

Thank you for all your help and sorry to bother you with unanswerable questions. :D
Posted: 04/25/2008 14:52:18
by Eugene Mayevski (Team)

Generally speaking, the OS should do some read-ahead reading to fill the cache with the file. I don't know why it doesn't do this. Maybe there's some way to control this, but not that I am aware of (and I know WinAPI quite well).

Sincerely yours
Eugene Mayevski
Posted: 04/25/2008 15:02:17
by Volodymyr Zinin (Team)

Read ahead reading does not occur because the UseSystemCache property is set (i.e. the system caching isn't used in the CallbackFS driver).



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