Why is error code -36 (FS_FILE_EXISTS) returned by FS_CreateDir just after memory card is removed
来源:互联网 发布:网络渗透工具 编辑:程序博客网 时间:2024/05/11 21:38
After memory card is removed, FS can't know this event immediately. Therefore, there is a gap after memory card is removed and before FS is acknowledged by driver. Any operations during this period may lead to unexpected behaviors.
Because FS_Open will exactly return error code -101 (FS_MSDC_READ_SECTOR_ERROR), for this kind of issue, we suggest user should create folders "only if" FS_Open returns error code -9 (FS_NOT_FOUND).
The insight is, FS_Open will try to count the space occupied by directory entries which belong to the target folder. It will lead to a memory card read sector operation. If memory card is removed, such access will get error code -101 (FS_MSDC_READ_SECTOR_ERROR) from memory card drivers.
However, FS_CreateDir will firstly check FS buffer cache. If meta data (directory entries) of parent folder is fully cached, error code -36 (FS_FILE_EXISTS) will be returned even if memory card is removed.
In this time, FS is unaware of memory card removal because the acknowledge process is not finished yet.
In the future, we will co-work with memory card driver to immediately update mount status of memory card for hot plug-in/plug-out case. In that day, this ambiguous error code will not happen any more.
Because FS_Open will exactly return error code -101 (FS_MSDC_READ_SECTOR_ERROR), for this kind of issue, we suggest user should create folders "only if" FS_Open returns error code -9 (FS_NOT_FOUND).
The insight is, FS_Open will try to count the space occupied by directory entries which belong to the target folder. It will lead to a memory card read sector operation. If memory card is removed, such access will get error code -101 (FS_MSDC_READ_SECTOR_ERROR) from memory card drivers.
However, FS_CreateDir will firstly check FS buffer cache. If meta data (directory entries) of parent folder is fully cached, error code -36 (FS_FILE_EXISTS) will be returned even if memory card is removed.
In this time, FS is unaware of memory card removal because the acknowledge process is not finished yet.
In the future, we will co-work with memory card driver to immediately update mount status of memory card for hot plug-in/plug-out case. In that day, this ambiguous error code will not happen any more.
- Why is error code -36 (FS_FILE_EXISTS) returned by FS_CreateDir just after memory card is removed
- Null value is eliminated by an aggregate or other SET operation and returned error code 0xC0202009
- Caused by: code is 9998;desc is dao exception is org.hibernate.exception.DataException: error execu
- the error code is 2503
- Managing Dynamic Memory Is Error-prone
- Why in the code “456”+1, output is “56”
- What is virtual memory, how is it implemented, and why do operating systems use it?
- why total memory is less than atual memory in /proc/meminfo,
- 安装python3.5.2 error code is 2503
- C++ MoveFileA Error code is 0x2
- Why ConcurrentHashMap is better than Hashtable and just as good as a HashMap
- Firefox is just cool.
- Just what is SMB?
- Why Ruby is Simple
- Why extends is evil
- Why is China angry?
- why is me?
- why gpDesc is NULL?
- EXT3中的表格选中复制问题
- How to deal with “Quota over disk” or “Quota usage warning” during boot up procedure
- PHP 正则表达式
- C#读取C++编写的DLL时遇到的一个问题
- 推荐几个基于J2EE的开源BI项目
- Why is error code -36 (FS_FILE_EXISTS) returned by FS_CreateDir just after memory card is removed
- 求助
- 11B Cosmos 平台手写笔画显示比较滞后问题
- 音频采样和音频采样频率和位速的说明
- 输入五分制成绩,统计每种成绩的人数
- 代码中特殊的注释技术——TODO、FIXME和XXX的用处
- gdb 查看内存
- spring配置文件加载流程
- vmware安装系统注意点