This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

use RTFS on C6747, function fsck() problem

Hi, I already implemented a file system in NAND chip on  my  board, every thing works correct, except one thing:

at start up, I use fsck() function to check the disk before system run, and when I use following code :

 fsck ( diskname, &fsck_stat, FSCK_FIXPROBLEMS | FSCK_FREELOSTCLUSTERS | FSCK_FREEFILESWITHERRORS | FSCK_FREESUBDIRSWITHERRORS);

it return result 0, and report no error, but all files that large 32768 bytes(about, not actual test) is deleted, and only directory is left,

and then , when I use following code :

 fsck ( diskname, &fsck_stat, FSCK_FIXPROBLEMS);

all files that large 32768 bytes is truncated to 32768 bytes,  also report no error.

if I not use fsck () to check disk at start up, read back file, compare to orginal, it's correct, and file write also have no problem.

It;s strange , is it because it's a free version? I am using version RFTS 1_10_01_31.

Is that somebody have any sense about it?  thanks.

 

 

 

 

 

 

  • Hi Ting Li,

    I have been looking into the problem you mentioned and it seems like a bug to me.

    I am able to reproduce the truncation issue that you are seeing when a file is larger than 32768 .  I reproduced this by creating a file of size 52Kbytes, then calling

    fsck(diskname, &fsck_stat, FSCK_FIXPROBLEMS);

    after the above call, the file size is then truncated down to 32768 bytes, just as you are reporting.

    But, I was not able to reproduce the scenario in which the files are actually being deleted.

    One important thing to note is that I did not see this problem at all with the SD card example, so this suggests that it may be a NAND specific issue.

    Would you be able to attach your project (including executable) that has the problem of files being deleted?

    I will continue to look into this problem and get back to you as soon as I find the root cause.

    Thanks and Regards,

    Steve

  • Hi, Steven Connell

    thanks for your response.

    because I implement the file system on my own board, not C6747 DSK tools

    ( it default has no  NAND chip on board), so it's may can not test by you.  and my project

    is include many other component, it's diffcult to attach.

    the detail for my board is :

    NAND chip is Samsung K92G08UCM(256M chip).

    when system start up, I call OS_FileSystemInitAfterOSStartup() in attached files,

    it will reproduce the problem.

     

    source file attached:( NOTE: for correct operation, I found it must call getdrvinfo() before do others for each partion.)


    #include <p6k_dsp_board/include/OSFullInclude.h>
    #include <iom.h>
    #include <p6k_dsp_board/FileSystem/FileSystem.h>
    #include <ti/pspiom/nand/NandDiskInit.h>
    #include <p6k_dsp_board/Include/P6KDspDebugGrp.h>

    #define RETInitFileSystemMSG0( s )   RETAILMSG0( MSG_GRP_FILE_SYSTEM, s )
    #define RETInitFileSystemMSG1( s, a )  RETAILMSG1( MSG_GRP_FILE_SYSTEM, s, a )
    #define RETInitFileSystemMSG2( s, a, b ) RETAILMSG2( MSG_GRP_FILE_SYSTEM, s, a, b )
    #define RETInitFileSystemMSG3( s, a, b, c ) RETAILMSG3( MSG_GRP_FILE_SYSTEM, s, a, b, c )

    #define DBGInitFileSystemMSG0( s )   DEBUGMSG0( MSG_GRP_FILE_SYSTEM, s )
    #define DBGInitFileSystemMSG1( s, a )  DEBUGMSG1( MSG_GRP_FILE_SYSTEM, s, a )
    #define DBGInitFileSystemMSG2( s, a, b ) DEBUGMSG2( MSG_GRP_FILE_SYSTEM, s, a, b )
    #define DBGInitFileSystemMSG3( s, a, b, c ) DEBUGMSG3( MSG_GRP_FILE_SYSTEM, s, a, b, c )


    /*
    #define SYS_SETTING_DISK_NAME "D:"
    #define INFO_LOGGLE_DISK_NAME "E:"
    */

    char SYS_SETTING_DISK_NAME[8];
    char INFO_LOGGLE_DISK_NAME[8];

    #define SYS_CONFIG_DISK_CYLINDERS_PERCENT 20

    #define FILESYS_PARTITION_TYPE_FAT32 (0xc)
    #define FILESYS_PARTITION_TYPE_FAT16 (0x04)

    STATICFUNC BOOL8 FILESYS_CheckDisk( CHAR* diskname )
    {
     INT32 result;
     DRV_INFO DiskInfo;
     FSCK_STATS fsck_stat;

     memset( &DiskInfo, 0, sizeof(DiskInfo) );
     result = getdrvinfo( diskname, &DiskInfo, FALSE );
     if( result )
      result = getdrvinfo( diskname, &DiskInfo, FALSE );

     if( result )
     {
      INT32 DiskErrNo = rtfserrno;
      ASSERT( DiskErrNo );
      ASSERT( (PEINVALIDDRIVEID != DiskErrNo) && (PEINVALIDPARMS != DiskErrNo) );
      RETInitFileSystemMSG2( TEXT( "FILESYS_CheckDisk : getdrvinfo() for disk %s fail, error %d\n" ), diskname, DiskErrNo );
      return FALSE;
     }

    #if 0
     memset( &fsck_stat, 0, sizeof(fsck_stat) );
     result = fsck ( diskname, &fsck_stat, FSCK_FIXPROBLEMS /*| FSCK_FREELOSTCLUSTERS | FSCK_FREEFILESWITHERRORS | FSCK_FREESUBDIRSWITHERRORS*/ );
     if( result == 0 )
     {
      if( fsck_stat.has_errors )
      {
       RETInitFileSystemMSG1( TEXT( "FILESYS_CheckDisk : fsck() for disk %s success, disk problem fiexed.\n" ), diskname );
      }
     }
     else
     {
      RETInitFileSystemMSG1( TEXT( "FILESYS_CheckDisk : fsck() for disk %s fail.\n" ), diskname );
      return FALSE;
     }
    #endif  
     return TRUE;
    }

    STATICFUNC BOOL8 FILESYS_ClearPartition( CHAR* drive )
    {
     INT32 result;
     /* Partition the drive */
     struct bfs_specification mbrspecs;
     /* Clear the specifications */
     memset(&mbrspecs, 0, sizeof(mbrspecs));
     mbrspecs.mbr_sector_location = 0;    /* The mbr is always at sector zero */
     mbrspecs.device_mbr_count    = 0;    /* Clear the partition table */

     result = partdrv(drive, &mbrspecs);
     if( result )
     {
      ASSERT( rtfserrno );
      RETInitFileSystemMSG1( TEXT( "FILESYS_ClearPartition : clear partition fail, error %d.\n"), rtfserrno );
      return FALSE;
     }
     return TRUE;
    }


    STATICFUNC BOOL8 FILESYS_RebulidPartition( CHAR* drive )
    {
     INT32 result;
     DRV_GEOMETRY  geometry;
     DWORD total_cylinders;
     DWORD sectors_per_cylinder;
     DWORD sectors_per_track;
     INT32 num_partitions;
     DWORD sizeincylinders[4];
     BYTE partitiontypes[4];
     DWORD logical_sectors_this_partition;
     INT32 part;
     DWORD current_start_cylinder;
     struct bfs_specification mbrspecs[2];

     /*
     * Get geometry information and then populate two arrays:
     * dword sizeincylinders[] (size in cylinders of each partition)
     * byte   partitiontypes[] (type of each each partition)
     */
     memset( &geometry, 0, sizeof(geometry) );
     if ( getdrvparms(drive, &geometry) )
     {
      RETInitFileSystemMSG1( TEXT( "FILESYS_RebulidPartition : getdrvparms() fail, error %d.\n"), rtfserrno );
      return FALSE;
     }

     /* Cylinder align */
     sectors_per_cylinder  = (DWORD)(geometry.dev_geometry_heads & 0xff);
     sectors_per_cylinder *= geometry.dev_geometry_secptrack;
     total_cylinders       = geometry.dev_geometry_lbas/sectors_per_cylinder;
     sectors_per_track     = geometry.dev_geometry_secptrack;

     DBGInitFileSystemMSG0( TEXT( "FILESYS_ClearPartition : disk geometry : \n") );
     DBGInitFileSystemMSG1( TEXT( "\t total cylinders : %d\n"), total_cylinders );
     DBGInitFileSystemMSG1( TEXT( "\t total sectors   : %d\n"), total_cylinders*sectors_per_cylinder );
     DBGInitFileSystemMSG1( TEXT( "\t sector byte size: %d\n"), geometry.bytespsector );

     /* for system config disk */
     sizeincylinders[0] = SYS_CONFIG_DISK_CYLINDERS_PERCENT * total_cylinders / 100 + 1;
     logical_sectors_this_partition = (sizeincylinders[0] * sectors_per_cylinder);
     DBGInitFileSystemMSG1( TEXT( "\t system config disk cylinders : %d\n"), sizeincylinders[0] );
     DBGInitFileSystemMSG1( TEXT( "\t system config disk sectors   : %d\n"), logical_sectors_this_partition );
     partitiontypes[0] = logical_sectors_this_partition > 0xffff ? FILESYS_PARTITION_TYPE_FAT32 : FILESYS_PARTITION_TYPE_FAT16;


     /* for info loggle disk */
     sizeincylinders[1] = total_cylinders - sizeincylinders[0];
     logical_sectors_this_partition = sizeincylinders[1] * sectors_per_cylinder;
     DBGInitFileSystemMSG1( TEXT( "\t info loggle disk cylinders : %d\n"), sizeincylinders[1] );
     DBGInitFileSystemMSG1( TEXT( "\t info loggle disk sectors   : %d\n"), logical_sectors_this_partition );
     partitiontypes[1] = logical_sectors_this_partition > 0xffff ? FILESYS_PARTITION_TYPE_FAT32 : FILESYS_PARTITION_TYPE_FAT16;

     num_partitions = 2;

     /* Clear the specifications */
     memset( &mbrspecs, 0, sizeof(mbrspecs) );
     
     /* The mbr is always at sector zero */
     mbrspecs[0].mbr_sector_location = 0; 
     mbrspecs[0].device_mbr_count = 1;   /* There will be at least one master mbr */

     current_start_cylinder = 0;
     for (part = 0; part < num_partitions; part++)
     {
      mbrspecs[0].entry_specifications[part].partition_start =
       (current_start_cylinder * sectors_per_cylinder) + sectors_per_track;

      mbrspecs[0].entry_specifications[part].partition_size =
       ( sizeincylinders[part] * sectors_per_cylinder) - (sectors_per_track + 1);

      mbrspecs[0].entry_specifications[part].partition_type = partitiontypes[part];

      mbrspecs[0].entry_specifications[part].partition_boot = 0x80;
      current_start_cylinder = current_start_cylinder + sizeincylinders[part];
     }

     result = partdrv( drive, &mbrspecs[0] );
     if( result )
     {
      ASSERT( rtfserrno );
      RETInitFileSystemMSG1( TEXT( "FILESYS_RebulidPartition : partdrv() fail, error %d.\n"), rtfserrno );
      return FALSE;
     }
     return TRUE;
    }


    BOOL8 OS_FileSystemInitBeforeOSStartup()
    {
     /* can not use debug info output now */
     rtfsPosixInit();
     return TRUE;
    }


    BOOL8 OS_FileSystemInitAfterOSStartup()
    {
     INT32 result;
     BOOL8 infoLogDiskExist = FALSE;
     BOOL8 sysCfgDiskChkState = FALSE;
     BOOL8 infoLogDiskChkState = FALSE;

     DBGInitFileSystemMSG0( TEXT("OS_FileSystemInitAfterOSStartup : called.\n" ) );

     result = nandStorageInit( FALSE );
     if( result != IOM_COMPLETED )
     {
      RETInitFileSystemMSG1( TEXT( "OS_FileSystemInitAfterOSStartup : nandStorageInit fail, result 0x%0x\n" ), result );
      return FALSE;
     }

     /* get driver letter */
     memset( SYS_SETTING_DISK_NAME, 0, sizeof(SYS_SETTING_DISK_NAME) );
     memset( INFO_LOGGLE_DISK_NAME, 0,  sizeof(INFO_LOGGLE_DISK_NAME) );
     result = getdriveid( BFS_DEVICE_TYPE_NAND, 0 , 0, SYS_SETTING_DISK_NAME );
     if (result >= 0)
     {
      RETInitFileSystemMSG1( TEXT( "OS_FileSystemInitAfterOSStartup : setting disk letter is %s.\n" ), SYS_SETTING_DISK_NAME );
     }
     else
     {
      RETInitFileSystemMSG0( TEXT( "OS_FileSystemInitAfterOSStartup : nand disk not found.\n" ) );
      return FALSE;
     }

     {
      /* to ensure RTFS mount the partition, use getdrvinfo(), call 3 time
       first time getdrvinfo() will fail, but then partition is mount in file system
       second time getdrvinfo() will success.
       after this, getdriveid for all partition will work.
       */
      DRV_INFO DiskInfo;
      result = getdrvinfo( SYS_SETTING_DISK_NAME, &DiskInfo, FALSE );
      result = getdrvinfo( SYS_SETTING_DISK_NAME, &DiskInfo, FALSE );
      result = getdrvinfo( SYS_SETTING_DISK_NAME, &DiskInfo, FALSE );
     }

    /*
     memcpy( INFO_LOGGLE_DISK_NAME, SYS_SETTING_DISK_NAME, sizeof(INFO_LOGGLE_DISK_NAME) );
     INFO_LOGGLE_DISK_NAME[0] ++;
     infoLogDiskExist = TRUE;
    */
     
     result = getdriveid( BFS_DEVICE_TYPE_NAND, 0 , 1, INFO_LOGGLE_DISK_NAME );
     if (result >= 0)
     {
      infoLogDiskExist = TRUE;
      RETInitFileSystemMSG1( TEXT( "OS_FileSystemInitAfterOSStartup : info log disk letter is %s.\n" ), INFO_LOGGLE_DISK_NAME );
     }

     if( infoLogDiskExist != TRUE )
     {
      RETInitFileSystemMSG0( TEXT( "OS_FileSystemInitAfterOSStartup : info long disk partition not exist, rebulid driver.\n" ) );
      if( FILESYS_ClearPartition( SYS_SETTING_DISK_NAME ) && FILESYS_RebulidPartition( SYS_SETTING_DISK_NAME ) )
      {
       INT32 fmtLogDiskResult;
       INT32 fmtSysDiskResult;

       memset( SYS_SETTING_DISK_NAME, 0, sizeof(SYS_SETTING_DISK_NAME) );
       memset( INFO_LOGGLE_DISK_NAME, 0,  sizeof(INFO_LOGGLE_DISK_NAME) );
       result = getdriveid( BFS_DEVICE_TYPE_NAND, 0 , 0, SYS_SETTING_DISK_NAME );
       if (result >= 0)
       {
        RETInitFileSystemMSG1( TEXT( "OS_FileSystemInitAfterOSStartup : setting disk letter is %s.\n" ), SYS_SETTING_DISK_NAME );
       }
       else
       {
        RETInitFileSystemMSG0( TEXT( "OS_FileSystemInitAfterOSStartup : get setting disk ID fail after rebuild.\n" ) );
        return FALSE;
       }

       result = getdriveid( BFS_DEVICE_TYPE_NAND, 0 , 1, INFO_LOGGLE_DISK_NAME );
       if (result >= 0)
       {
        RETInitFileSystemMSG1( TEXT( "OS_FileSystemInitAfterOSStartup : info log disk letter is %s.\n" ), INFO_LOGGLE_DISK_NAME );
       }
       else
       {
        RETInitFileSystemMSG0( TEXT( "OS_FileSystemInitAfterOSStartup : get info log disk ID fail after rebuild.\n" ) );
        return FALSE;
       }

       fmtSysDiskResult = fmtdrv( SYS_SETTING_DISK_NAME );
       if ( fmtSysDiskResult )
       {
        RETInitFileSystemMSG2( TEXT( "OS_FileSystemInitAfterOSStartup : Formatting %s fail, error %d\n" ), SYS_SETTING_DISK_NAME, rtfserrno );
       }

       fmtLogDiskResult = fmtdrv( INFO_LOGGLE_DISK_NAME );
       if ( fmtLogDiskResult )
       {
        RETInitFileSystemMSG2( TEXT( "OS_FileSystemInitAfterOSStartup : Formatting %s fail, error %d\n" ), INFO_LOGGLE_DISK_NAME, rtfserrno );
       }

       if( (fmtSysDiskResult == 0) && ( fmtLogDiskResult == 0 ) )
       {
        RETInitFileSystemMSG0( TEXT( "OS_FileSystemInitAfterOSStartup : partition create and formated successed.\n" ) );
        return TRUE;
       }
       return FALSE;
      }
      else
      {
       RETInitFileSystemMSG0( TEXT( "OS_FileSystemInitAfterOSStartup : partition operation fail.\n" ) );
       return FALSE;
      }
     }

     /*
     after get driver name, if normal, the file NAND should already bind to RTFS
     we need to check partition created and formated normal/abnormal
     */
     sysCfgDiskChkState = FILESYS_CheckDisk( SYS_SETTING_DISK_NAME );
     if( sysCfgDiskChkState )
     {
      RETInitFileSystemMSG0( TEXT( "OS_FileSystemInitAfterOSStartup : system config partition check OK.\n" ) );
     }
     infoLogDiskChkState = FILESYS_CheckDisk( INFO_LOGGLE_DISK_NAME );
     if( infoLogDiskChkState )
     {
      RETInitFileSystemMSG0( TEXT( "OS_FileSystemInitAfterOSStartup : info loggle partition check OK.\n" ) );
     }

     if( (sysCfgDiskChkState == FALSE) && (infoLogDiskChkState == FALSE) )
     {
      RETInitFileSystemMSG0( TEXT( "OS_FileSystemInitAfterOSStartup : all partition check fail, rebuild partition table\n" ) );
      if( FILESYS_ClearPartition( SYS_SETTING_DISK_NAME ) && FILESYS_RebulidPartition( SYS_SETTING_DISK_NAME ) )
      {
       INT32 fmtLogDiskResult;
       INT32 fmtSysDiskResult = fmtdrv( SYS_SETTING_DISK_NAME );
       if ( fmtSysDiskResult )
       {
        RETInitFileSystemMSG2( TEXT( "OS_FileSystemInitAfterOSStartup : Formatting %s fail, error %d\n" ), SYS_SETTING_DISK_NAME, rtfserrno );
       }

       fmtLogDiskResult = fmtdrv( INFO_LOGGLE_DISK_NAME );
       if ( fmtLogDiskResult )
       {
        RETInitFileSystemMSG2( TEXT( "OS_FileSystemInitAfterOSStartup : Formatting %s fail, error %d\n" ), INFO_LOGGLE_DISK_NAME, rtfserrno );
       }

       if( (fmtSysDiskResult == 0) && ( fmtLogDiskResult == 0 ) )
       {
        RETInitFileSystemMSG0( TEXT( "OS_FileSystemInitAfterOSStartup : partition create and formated successed.\n" ) );
        return TRUE;
       }
       return FALSE;
      }
      else
      {
       RETInitFileSystemMSG0( TEXT( "OS_FileSystemInitAfterOSStartup : partition operation fail.\n" ) );
       return FALSE;
      }
     }
     else
     {
      BOOL8 operState = TRUE;
      if( sysCfgDiskChkState == FALSE )
      {
       INT32 fmtDiskResult = fmtdrv( SYS_SETTING_DISK_NAME );
       RETInitFileSystemMSG1( TEXT( "OS_FileSystemInitAfterOSStartup : disk %s formated.\n" ), SYS_SETTING_DISK_NAME );
       if ( fmtDiskResult )
       {
        operState = FALSE;
        RETInitFileSystemMSG2( TEXT( "OS_FileSystemInitAfterOSStartup : Formatting %s fail, error %d\n" ), SYS_SETTING_DISK_NAME, rtfserrno );
       }
       else
       {
        RETInitFileSystemMSG1( TEXT( "OS_FileSystemInitAfterOSStartup : Formatting %s  success\n" ), SYS_SETTING_DISK_NAME );
       }
      }

      if( infoLogDiskChkState == FALSE )
      {
       INT32 fmtDiskResult = fmtdrv( INFO_LOGGLE_DISK_NAME );
       RETInitFileSystemMSG1( TEXT( "OS_FileSystemInitAfterOSStartup : disk %s formated.\n" ), INFO_LOGGLE_DISK_NAME );
       if ( fmtDiskResult )
       {
        operState = FALSE;
        RETInitFileSystemMSG2( TEXT( "OS_FileSystemInitAfterOSStartup : Formatting %s fail, error %d" ), INFO_LOGGLE_DISK_NAME, rtfserrno );
       }
       else
       {
        RETInitFileSystemMSG1( TEXT( "OS_FileSystemInitAfterOSStartup : Formatting %s  success\n" ), INFO_LOGGLE_DISK_NAME );
       }
      }
      /*bfs_shell();*/
      return operState;
     }
    }

    BOOL8 OS_FileSystem_FlushBuffer( CHAR* diskDir )
    {
     static CHAR buf[16];
     INT32 idx = 0;
     if( memcmp( diskDir, RTFS_HDR, RTFS_HDR_LEN ) == 0 )
     {
      diskDir += RTFS_HDR_LEN;
     }

     while( diskDir[idx] )
     {
      if( idx < 15 )
      {
       buf[idx] = diskDir[idx];
       if( buf[idx] == ':' )
        break;
      }
      else
       return FALSE;
      idx ++;
     }

     if( (buf[idx] != ':') || (idx == 0)  )
      return FALSE;

     buf[idx+1] = 0;
     if( flushdrv( buf ) )
     {
      RETInitFileSystemMSG1( TEXT( "OS_FileSystem_FlushBuffer :flushdrv() fail, error %d.\n" ), rtfserrno );
      return FALSE;
     }
     return TRUE;
    }

    BOOL8 OS_FileSystemShutDown()
    {
     INT32 result = nandStorageDeInit();
     if ( IOM_COMPLETED == result)
     {
      RETInitFileSystemMSG0( TEXT( "OS_FileSystemDeInit : nandStorageDeInit() succeeded\n" ) );
     }
     else
     {
      RETInitFileSystemMSG0( TEXT( "OS_FileSystemDeInit : nandStorageDeInit() fail\n" ) );
     }

     return IOM_COMPLETED == result ? TRUE : FALSE;
    }

     

     

     

     

  • Hi, Steven Connell

    I can't attach file accessories,

    would you be able to send a email to me?  so I can email the

    project for you.

    thanks.

  • Ting Li,

    Since this forum is external, I am not allowed to post my email on it (as anyone can see it and it will show up in search engine results, etc.)

    However, if you don't mind this, you may post your email here and I can then email you directly.  After that, you could reply with your project.  Would this work for you?

     

    Steve

  • Ting Li, you can attach files to your forum posts.  When you are composing the message, click on the Options link at the top and you will then see a button to attach a file.

  • Hi, Steven Connell

    I already post the main file that related to file system operation before, now I post the

    project of library for file system initialize, but for me, I can not post entire project because

    it contain many other component, the  system initialize lib is called before any other component

    initialize, so the  file system library may enough for this problem.

     my email is lich09@263.net

    welcome email to me.

    thank you for you help.

     

     

     

    FileSystem.rar
  • Ting Li,

    Thanks for posting your project.  One other question, could you also let me know the versions of the following components you are using?

    • DSP/BIOS
    • PSP drivers
    • EDMA 3 LLD

     

    I am still looking into the root cause of this problem, but it is obvious that fsck() is flagging files as problematic when it should not be.

    Can you try calling fsck() without using the flags that will potentially modify files?  (i.e. FSCK_FIXPROBLEMS | FSCK_FREELOSTCLUSTERS | FSCK_FREEFILESWITHERRORS | FSCK_FREESUBDIRSWITHERRORS)

    perhaps you can just call fsck() as follows until we get to the bottom of this problem, so that you can move forward with your work?

        /* check the file system but don't modify any files or directories */

        result = fsck(drive, &checkstat, FSCK_VERBOSE);

    Steve

  • Hi,  Steven

    currently I use the software version is :

    1. DSP/BIOS is bios_5_41_03_17

    2. PSP driver : pspdrivers_01_30_00_06 for blkmedia only, and the nand driver is modified according to my board

       the orignal version is pspdrivers_01_20_00_07,  and some bugs of that version is fixed( ECC logic for nand of orginal version

      has some bugs ), and I already reviewed differ bettween 01_20_00_07 and 01_30_00_06 ,  version changes not associate to C6747

    3. EDMA 3 LLD is also modified according my board(orginal version is enable the interrupt that I do not accepte),

       orginal version is edma3_lld_01_10_00_01, and blkmedia driver and nand driver,   not use EDMA function at all, and  file system

    is  use poll mode only ( EDMA resource is used by other critical task, file system is none critical )

      I will try  tomorrow for
          result = fsck(drive, &checkstat, FSCK_VERBOSE);

    I will post the result later.

    thank you for you help.

    ting li

       

     

  • Hi Ting Li,

    There is a new RTFS patch release that is now available which fixes the file truncation issue you reported seeing.  More specifically, the following bugs have been fixed:

    • SDOCM00072885 - Calling fsck with FIX_PROBLEMS = true on a file > 32K on nand causes file to truncate to 32K
    • SDOCM00072886 -  Directory corruption problem when filesize > 140K on nand

    Please download and rebuild against this latest RTFS update in order to allow the call to fsck() to work correctly in your application.  The release is available here:

    DSP/BIOS File System 1.10.02.32 Release:

    http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/bios_file_system/index.html

    Thanks,

    Steve