AnsweredAssumed Answered

MFS Create Directory issue

Question asked by Guillaume Tiffineau on May 12, 2015
Latest reply on May 28, 2015 by Radek Sestak

Hello,

 

I'm using the MFS stack with MQX 4.0.

I have an issue with the stack. When I create a directory (just one subdirectory), it takes several seconds (2 or 3 seconds).

 

The SD card is a recent SD card and I have no issue in writting or reading the files.

I can't use an other version of MQX.

 

The instruction that takes time is : error_code = ioctl(filesystem_handle, IO_IOCTL_CREATE_SUBDIR, _DirectoryName);

 

Is it normal that a creation of directory takes so much time? How can I do it faster?

Can you help me?

 

This is a part of my code if it's usefull :

 

char * _DirectoryName;

 

_DirectoryName = strtok(_str, "\\");

 

while(_DirectoryName != NULL)

        {                       

            error_code = ioctl(filesystem_handle, IO_IOCTL_CHANGE_CURRENT_DIR, _DirectoryName);

           

            if(error_code == FS_PATH_NOT_FOUND)

            {

                error_code = ioctl(filesystem_handle, IO_IOCTL_CREATE_SUBDIR, _DirectoryName);

                error_code = ioctl(filesystem_handle, IO_IOCTL_CHANGE_CURRENT_DIR, _DirectoryName);

            }

           

            _DirectoryName = strtok(NULL, "\\");

        }

 

 

Regards,

 

Guillaume

Outcomes