EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Small sector sizes?

Posted: 11/24/2013 11:24:13
by Andy Key (Standard support level)
Joined: 11/12/2013
Posts: 16

I am trying to write a CP/M filesystem.
On CP/M, sectors are 128 bytes long, and there isn't really the idea of clusters.

So I tried :-


My program crashes executing the first method.
Because of an anomoly with link.exe not being able to find vc110.pdb for object files in cbfs.lib, I can't give a lot more detail, other than to say it looks like an unhandled exception resulting in a call to terminate.

The online docs on this site for SectorSize say it is 512 by default, and can be 1024, or 2048, ... if needed.

What is the significance of these sizes?
Can you say more about what values are acceptable?
Can you say more about the relationship between the choice of these sizes and any values returned as AllocationSize for example?

I'm not sure this is a big issue for me.
I suppose I could round down the NumberOfFreeSectors returned from GetVolumeSize for example...

{{{ Andy
Posted: 11/24/2013 11:39:26
by Eugene Mayevski (Team)

The size of the sector must be multiple of 512 and it can't be less than 512. Moreover, larger values, while generally working, can be unexpected for some software or even system modules (depending on whether the programmer thought about larger sector sizes). So the best approach is not to change sector size.

Note that CBFS emulates mainly a filesystem and as it doesn't let the OS or the application read or write sectors, this property has limited use.

Sincerely yours
Eugene Mayevski
Posted: 11/24/2013 12:17:35
by Andy Key (Standard support level)
Joined: 11/12/2013
Posts: 16

Thanks for the info.
That's good advice you give there too.
Might be worth making the online doc explicit about this.
By the way, I caught the exception, and sure enough, its an ECBFSError telling me I am trying to use an illegal sector size.

{{{ Andy
Posted: 11/24/2013 12:20:15
by Eugene Mayevski (Team)

In version 5 documentation reflects what I've written.

Sincerely yours
Eugene Mayevski



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