Welcome, Guest. Please login or register.

Author Topic: increasing block size, CF  (Read 1368 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline orangeTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2799
  • Country: 00
    • Show only replies by orange
increasing block size, CF
« 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 ?
“Giving up is always an option, but not always a failure.”
 

Offline Thomas

Re: increasing block size, CF
« Reply #1 on: October 27, 2011, 01:38:00 PM »
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.

Offline orangeTopic starter

  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 2799
  • Country: 00
    • Show only replies by orange
Re: increasing block size, CF
« Reply #2 on: October 27, 2011, 02:13:23 PM »
Quote from: Thomas;665331
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.
« Last Edit: October 27, 2011, 02:20:29 PM by orange »
“Giving up is always an option, but not always a failure.”
 

Offline Thomas

Re: increasing block size, CF
« Reply #3 on: October 27, 2011, 02:25:19 PM »
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.