Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: orange on October 27, 2011, 01:32:02 PM
-
if we increase the block size from 512bytes to 4Kb (or more), would OS write files in larger chunks?
iirc, someone said PFS always uses 512byte block size, is there a way to overcome that?
I ask because those cheap CF cards that are so popular in Amiga world, probably use MLC instead of SLC flash.
So using larger logical block (equal to physical) would be better ?
-
Nobody has yet reported what happens when you use a device with physical blocksize different from 512. It may already fail on that level, so thinking about what happens with logical block sizes is of no use yet.
-
Nobody has yet reported what happens when you use a device with physical blocksize different from 512. It may already fail on that level, so thinking about what happens with logical block sizes is of no use yet.
I see, thanks for the reply.
I had thought that using larger logical blocks would prevent having two files in same CF block.
perhaps that wouldn't be wise anyway, given how small Amiga files usually are.
edit:
btw, I found this simple method for flash block size: http://kim.oyhus.no/FlashBlockSize.html
haven't tried it yet. beware, dd might destroy data on drive if not used properly.
-
It depends how the CF card reports itself to the operating system. If it reports itself with 512 bytes physical blocksize, then it should work with AmigaOS. Then it's up to the user to know that the real physical blocksize is 4K. There is no support for this in AmigaOS.
First thing to do is to align partitions to physical blocks. The easiest way to do this is to choose a geometry where the cylinder size is divisible by 4K (this means the number of blocks per cylinder needs to be divisible by 8).
Only after that you can choose to use 4K logical blocks for the file system. I don't think that PFS3 in its currently available version can be changed to use 4K blocks, therefore you might need to change to FFS or SFS.
Using 4K logical blocks on non-aligned partitions is even worse than to use 512 byte logical blocks, because accessing each logical block would need to access two physical blocks.
Fortunately with the usual IDE geometry of 1008 or 2016 blocks per cylinder, partitions are already aligned.