EldoS | Feel safer!

Software components for data protection, secure storage and transfer

GetVolumeSize => Enlarge maximum size?

Posted: 11/23/2012 07:10:46
by Julian  (Basic support level)
Joined: 11/23/2012
Posts: 1

Hello :-)

i'm actually trying to configure an Mounter-example by editing the GetVolumeSize-callback-method. The original code looks like the following:

void CbFsGetVolumeSize(
   CallbackFileSystem* Sender,
   __int64* TotalNumberOfSectors,
   __int64* NumberOfFreeSectors
    MEMORYSTATUS status;

    *TotalNumberOfSectors = status.dwTotalVirtual / g_CbFs.GetSectorSize();
    *NumberOfFreeSectors  = (status.dwTotalVirtual - CalculateFolderSize(g_DiskContext) + g_CbFs.GetSectorSize()/2) / g_CbFs.GetSectorSize();

Now i'm trying to implement a functionality so that the size of the mounted volume does never end. E.g.:

if (*NumberOfFreeSectors < *TotalNumberOfSectors/2){//enlarge maximum size}

Could there be any problems? What would be the best way for implementation?

Thanks for your support! :-)

Posted: 11/23/2012 10:59:45
by Volodymyr Zinin (Team)

You idea should work. But it's better to check it. CallbackFS does nothing extra with the storage size. It just passes the result returned from the GetVolumeSize callback to the system.



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