Shop OBEX P1 Docs P2 Docs Learn Events
New FAT Driver functionality questions. — Parallax Forums

New FAT Driver functionality questions.

KyeKye Posts: 2,200
edited 2009-12-24 19:11 in Propeller 1
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,

Comments

  • Oldbitcollector (Jeff)Oldbitcollector (Jeff) Posts: 8,091
    edited 2009-12-23 01:23
    If you were to just give us the ability to cd in and out of a folder that would be peaches here. [noparse]:)[/noparse]
    Later I might pester you for the ability to make/delete folders.

    OBC

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

    Visit the: The Propeller Pages @ Warranty Void.
  • KyeKye Posts: 2,200
    edited 2009-12-23 03:01
    Already done,

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

    Thanks,

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • localrogerlocalroger Posts: 3,452
    edited 2009-12-23 03:16
    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
  • KyeKye Posts: 2,200
    edited 2009-12-23 22:36
    Need second opinions...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nyamekye,
  • whickerwhicker Posts: 749
    edited 2009-12-24 05:59
    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.
  • potatoheadpotatohead Posts: 10,261
    edited 2009-12-24 06:06
    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!
    8x8 color 80 Column NTSC Text Object
    Safety Tip: Life is as good as YOU think it is!
  • whickerwhicker Posts: 749
    edited 2009-12-24 06:13
    If I'm going to delete something major like a file tree, I'd rather somebody who really understands how FAT works writes it. [noparse]:)[/noparse]

    Don't let me anywhere near a chainsaw. [noparse];)[/noparse]
  • Cluso99Cluso99 Posts: 18,069
    edited 2009-12-24 06:50
    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,·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
  • KyeKye Posts: 2,200
    edited 2009-12-24 19:11
    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,
Sign In or Register to comment.