none
cannot delete folders in FlashDisk when using persistent hive-based TFAT RRS feed

  • Question

  • Hello,

    I'm having a problem deleting folders in the FlashDisk when using persistent hive-based TFAT with WEC7.

    Recently I enabled persistent hive-based TFAT with WEC7 and I found that the folders in FlashDisk couldn't be deleted.

    Here is what I did:

    1. copy a folder containing some files to FlashDisk (NAND Flash).

    2. select that folder and delete it.

    3. all the files inside that folder are deleted, but the folder still exists.

    4. delete the folder.

    5. error message "Cannot delete "New Folder": Access is denied".

    I have no problem deleting files from FlashDisk. The hive-based registry files are stored in FlashDisk.

    The following is the registry settings for NAND flash:

    ; @CESYSGEN IF CE_MODULES_FSDMGR
    ; HIVE BOOT SECTION

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDisk\FATFS]
        "DisableAutoScan"=dword:1
        "FormatNumberOfFats"=dword:2        
        "Flags"=dword:14        ;; comment out this to enable fat filesystem
    ;    "EnableWriteBack"=dword:1
        "FormatTFAT"=dword:1    ;; comment out this to enable fat filesystem
        "ForceWriteThrough"=dword:1    ;; Force file writes to be always writethrough
    ;    "TransactData"=dword:1        
        "MountAsRoot"=dword:0
        "MountAsBootable"=dword:1     
        "MountPermanent"=dword:1     ; Do not allow un-mounting (else we'd fail to flush the registry)
        "MountAsROM"=dword:0
        "MountHidden"=dword:0
        "CheckForFormat"=dword:0     ; Ask the OAL if we should format on boot (i.e. cold reset)

    ; @CESYSGEN IF CE_MODULES_FSREPLXFILT
    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDisk\FATFS\Filters\fsreplxfilt]
        "dll"="fsreplxfilt.dll"
        "order"=dword:52000000
    ; @CESYSGEN ENDIF CE_MODULES_FSREPLXFILT

    [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\FlashDisk]
       "DriverPath"="Drivers\\BuiltIn\\FlashDisk"
       "LoadFlags"=dword:1
       "BootPhase"=dword:1          ; Make NAND available in BootPhase1, to load the persisted registry
       "Order"=dword:0
       "AutoMount"=dword:1
       "AutoPart"=dword:0
       "AutoFormat"=dword:0
       "DefaultFileSystem"="FATFS"
       "PartitionDriver"="mspart.dll"
       "Folder"="FlashDisk"

    [HKEY_LOCAL_MACHINE\Drivers\BuiltIn\FlashDisk]
        "Dll"="omap_nand.dll"
        "Prefix"="DSK"
        "Index"=dword:1
        "Order"=dword:4
        "MemBase"=multi_sz:"6E000000","08000000"
        "MemLen"=multi_sz:"00001000","00001000"
        ;"DmaCh"=dword:3
        ; CE_DRIVER_BLOCK_GUID
        "IClass"="{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
        "Profile"="FlashDisk"

    ; END HIVE BOOT SECTION

    I also test with disabling persist when using hive-based registry TFAT. In this case, the registry files are stored in Windows folder and I can delete folders in FlashDisk without any problem.

    Does anyone know the reason behind that and have a solution?

    Thanks a lot,

    James

    Tuesday, May 22, 2012 5:16 PM

All replies

  • That looks very similar to how Windows XP works - that is File Explorer doesn't do a refresh after deleting a folder, so the icon doesn't get removed from the GUI.   Are you sure that the folder wasn't deleted?

    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com

    Wednesday, May 23, 2012 5:51 PM
    Moderator
  • Hi Bruce,

    I'm sure that the folder wasn't deleted since I restarted the EVM and the folder was still there but it was empty.

    The strange thing was that if I did not enable persistent hive-based registry, the hive files were stored in Windows folder and I could delete folders without problem. If I enabled persistent hive-based registry, the hive files were stored in FlashDisk (in NAND flash) and problem occurred.

    Do you think the problem is because that the FlashDisk is configured as Bootable and Permanent?

    Regards,

    James

    Thursday, May 24, 2012 5:36 PM