EldoS | Feel safer!

Software components for data protection, secure storage and transfer

OnGetVolumeSize and file system cluster size

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
#12010
Posted: 12/30/2009 03:12:23
by Mezeo Support (Basic support level)
Joined: 12/29/2009
Posts: 40

I have a network mounted file system using callback file system framework and I want to keep allocation size and end of file values to be same (It was coded earlier that way). There is no need to keep allocation size in the multiple of sector size from my file system perspective.

Current code is as below

SectorsPerAllocationUnit = 8;
BytesPerSector = 512;

making file system cluster size to be 4KB. But, some of the windows tests are failing due to this as allocation size is in the multiple of 4KB and equals end of file.

I thought of couple of solutions

Solution 1

When I modified the code as below

SectorsPerAllocationUnit = 1;
BytesPerSector = 1;

making file system cluster size to be 1 byte just to satisfy the tests, then network drive was not accessible saying "Incorrect function".

When I looked up in the device tree for \Device\CbFsStrorages\CbFs0, sector size was blank. Is it using default sector size which seems to be 512 and resulting network drive inaccessible ? Can we override the sector size member in device object ?

Solution 2

The other solution could be to set allocation size to the round up value of end of file size.

It seems first solution will require minimal code changes.
#12011
Posted: 12/30/2009 06:34:41
by Volodymyr Zinin (EldoS Corp.)

The sector size is always 512 bytes.
I think it's ok to ignore the AllocationSize feature. Just return success from the callbacks that ask you to set AllocationSize and when it's asked to return it return the same value as "end of file" has.
#12012
Posted: 12/30/2009 08:29:13
by Mezeo Support (Basic support level)
Joined: 12/29/2009
Posts: 40

Thanks Vladimir

I am from Calsoft working for one of your client.

Does following values acceptable by Eldos driver SectorsPerAllocationUnit = 1;
BytesPerSector = 1 ? Or these values are not accepted by windows operating system itself ?

We are testing our file system with IFS tests suit http://msdn.microsoft.com/en-us/library/dd424426.aspx. These tests expects AllocationSize to be in the multiple of file system cluster size SectorsPerAllocationUnit * BytesPerSector = 8 * 512 = 4K so we cant ignore it.

It seems I need to follow second solution. Provide your opinion on this
#12014
Posted: 12/30/2009 08:50:46
by Eugene Mayevski (EldoS Corp.)

Quote
Mayur Thigale wrote:
I am from Calsoft working for one of your client.


Before we continue, please assign the license ticket to your user account. Please ask your client for the license ticket.


Sincerely yours
Eugene Mayevski
#12019
Posted: 12/30/2009 21:40:08
by Mezeo Support (Basic support level)
Joined: 12/29/2009
Posts: 40

I will do that.
#12042
Posted: 01/05/2010 01:10:24
by Mezeo Support (Basic support level)
Joined: 12/29/2009
Posts: 40

I am done with necessary things regarding license ticket.Meanwhile I tried with second solution to make allocation size in multiples of file system cluster size. But those values are not reflected when I query for FILE_STANDARD_INFO. Even OnGetFileInfo callback was not invoked. I tried with disabling metadata cache also using DisableMetaDataCache.

Am I missing something ?
#12043
Posted: 01/05/2010 04:47:43
by Volodymyr Zinin (EldoS Corp.)

When the allocation size is requested for a file currently opened then the OnGetFileInfo callback isn't called but the CallbackFS driver itself handles such request by returning the allocation size that is usually equal to "end of file".
We will correct it so it will be possible to return the allocation size that is multiple to the cluster size. It will be done in the nearest release.

Quote
Mayur Thigale wrote:
I tried with disabling metadata cache also using DisableMetaDataCache.

DisableMetaDataCache only disables the cache for files that were opened before but now have already been closed. But the system usually calls allocation size for currently opened files.
#12045
Posted: 01/05/2010 06:08:58
by Mezeo Support (Basic support level)
Joined: 12/29/2009
Posts: 40

Thanks Vladimir.
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

Topic viewed 2689 times

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




|

Back to top

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

Got it!