New FAT Driver functionality questions.
Kye
Posts: 2,200
Hey guys,
I have some more questions about what would be liked for FAT driver functionality (Asking Heater and the rest of the interested people).
So,
For file/folder deletion should the function be recursive to handle the·deleting of non empty folders? The function already has a stack size of about 44 Longs, so a deep call could easily eat through system memory.
Should I actively support hard drive error flags? By this I mean that if you turned off the power or unplugged the SD card without unmounting it the computer (windows/linux)·would be able to tell. This feature is supported by FAT16 and FAT32.
I have support for the FAT32 fileSystem Info sector which allows for·speeding up·finding the next empty cluster and finding the amount of empty disk space.·Should I include an optimize function·that could be called to do all this stuff for you in times of no activity? As in it would optimize disk functionality.
Would anyone like formating functions·also? I'm thinking of including a partition formating function and a MBR formating function.
Anyway, that's all for now. Thanks for any feedback.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
I have some more questions about what would be liked for FAT driver functionality (Asking Heater and the rest of the interested people).
So,
For file/folder deletion should the function be recursive to handle the·deleting of non empty folders? The function already has a stack size of about 44 Longs, so a deep call could easily eat through system memory.
Should I actively support hard drive error flags? By this I mean that if you turned off the power or unplugged the SD card without unmounting it the computer (windows/linux)·would be able to tell. This feature is supported by FAT16 and FAT32.
I have support for the FAT32 fileSystem Info sector which allows for·speeding up·finding the next empty cluster and finding the amount of empty disk space.·Should I include an optimize function·that could be called to do all this stuff for you in times of no activity? As in it would optimize disk functionality.
Would anyone like formating functions·also? I'm thinking of including a partition formating function and a MBR formating function.
Anyway, that's all for now. Thanks for any feedback.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Comments
Later I might pester you for the ability to make/delete folders.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?
Visit the: The Propeller Pages @ Warranty Void.
I'm supporting everything however. That said, I need help figuring out what the best options to include are.
Thanks,
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
--Roger
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Maybe just scan first for difficulty to spit out "too complicated" if the nesting goes too deep. depth could be set with a constant? default 5?
Don't just start deleting and then ooops, stack overrun.
HDD error flags could be useful. I guess I'm not sure how it works, but I can see issues about losing power during the middle of a write. It would be nice to know that the process failed.
I'm leery about background optimization. I don't think any of us have really reliable power sources connected to our prop boards, and there isn't a power-fail signal so it can hurry-up-quick-finish the current write like some systems can do. Windows CE had in the past tried to do something like this, and it was a complete disaster. (People power up their boring gray industrial machine one day, just like any other day, except that the operator interface panel doesn't work anymore cuz it borked its flash file system last night because they turned it off at just the wrong time).
I can't really see a use for partitioning or MBR. I think if people want separate disks, they'll just use two cards. "firmware.bin" in the root of the card, instead of something hidden in the boot block, works just fine.
Seems to me there is the core driver, exposing the file system and the disk as a block device, and there is then various utilities that can operate above that, doing stuff like recursive deletes, formats and other things where a developer can cull those down to the necessary things, without impacting the core functions needed.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
Don't let me anywhere near a chainsaw. [noparse];)[/noparse]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
Okay, so for the delete I'm just going to make it unix style to avoid problems. If the directory has any files or folders in it the function will abort with an error message.
As it turns out the optimize funtion was only 8 lines of code because it just calls a bunch of other functions which compute the freeCluster count and next free cluster. All it has to do is write data to the disk for FAT32. This functionality will not be dangerous to the flash card. The optimization is basically ALOT of reading and then just 1 write to a non important part of the disk which is optional in use.
However, I'm not sure what to do with the hard drive error flags. I will support getting them into memory fo you so that anyone else can mode the driver to include more functionality. But I would like some more ideas on what to do here.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,