PDA

View Full Version : New FAT Driver functionality questions.



Kye
12-23-2009, 08:10 AM
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,

Oldbitcollector (Jeff)
12-23-2009, 09:23 AM
If you were to just give us the ability to cd in and out of a folder that would be peaches here. :)
Later I might pester you for the ability to make/delete folders.

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Visit the: The Propeller Pages (http://www.warrantyvoid.us/tiki-index.php?page=Propeller) @ Warranty Void.

Kye
12-23-2009, 11:01 AM
Already done,

I'm supporting everything however. That said, I need help figuring out what the best options to include are.

Thanks,

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

localroger
12-23-2009, 11:16 AM
Hi Kye,

Kye said...
Hey guys,

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.

ANSWER: No, it's rarely used and too expensive.

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.

ANSWER: No, it's rarely used and too expensive.· It should be a no-brainer that pulling a SD card out of an embedded device is not a good idea.

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.

ANSWER: Only as an option that can be disabled.· I'm much more interested in using the least possible amount of Hub RAM, and throughput is not an issue for any of my applications.· I find this a problem with the current direction FSRW is taking, it's nice and all but what I really want is minimal Hub RAM footprint and I don't care if I can stream audio.

Would anyone like formating functions·also? I'm thinking of including a partition formating function and a MBR formating function.

ANSWER:· Not as a standard thing in the default build used by normal applications.· Developing it would be good but more for a separate app you load from the SD or elsewhere.· You don't want to waste all that Hub RAM for something you hardly ever use.

Anyway, that's all for now. Thanks for any feedback.
Keenly awaiting your results.· I had to abandon my work on a filesystem because The Phone Rang and other projects took up priority.

--Roger

Kye
12-24-2009, 06:36 AM
Need second opinions...

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,

whicker
12-24-2009, 01:59 PM
I still think driver help with deleting a non-empty folder would be useful.
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.

potatohead
12-24-2009, 02:06 PM
Can't those things be done with a library of methods?

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! (http://propeller.wikispaces.com/)
8x8 color 80 Column NTSC Text Object (http://obex.parallax.com/objects/550/)
Safety Tip: Life is as good as YOU think it is!

whicker
12-24-2009, 02:13 PM
If I'm going to delete something major like a file tree, I'd rather somebody who really understands how FAT works writes it. :)

Don't let me anywhere near a chainsaw. ;)

Cluso99
12-24-2009, 02:50 PM
Kye: I am with localroger. We already have a fast and detailed fsrw. But for a slow and compact version, this would be ideal.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:

· Home of the MultiBladeProps: TriBlade (http://forums.parallax.com/showthread.php?p=786418),·RamBlade (http://forums.parallax.com/showthread.php?p=849265),·SixBlade (http://forums.parallax.com/showthread.php?p=780033), website (http://bluemagic.biz/cluso.htm)
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator) (http://forums.parallax.com/showthread.php?p=790917)
· Prop Tools under Development or Completed (Index) (http://forums.parallax.com/showthread.php?p=753439)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) (http://forums.parallax.com/showthread.php?p=778427) ZiCog (Z80) (http://forums.parallax.com/showthread.php?p=788511) , MoCog (6809) (http://forums.parallax.com/showthread.php?p=811043)
· Search the Propeller forums (http://search.parallax.com/search?site=parallax&client=parallax&output=xml_no_dtd&proxystylesheet=parallax&proxycustom=<HOME/>&ie=&oe=&lr=)·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz (http://www.bluemagic.biz)·· MultiBladeProp is: www.bluemagic.biz/cluso.htm (http://www.bluemagic.biz/cluso.htm)

Kye
12-25-2009, 03:11 AM
Whicker - Thanks for the input.

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,