Commit Graph

37 Commits

Author SHA1 Message Date
Far 9515d53dcc fix: 恢复了FATFS设置卷标的功能
Liteos_a FATFS需要提供格式化时设置卷标的功能,该功能在当前系统中缺失。
现在恢复该功能,使用方法与原来一致。即使用set_label设置卷标文本后,调用format对设备格式化。

Close #I3Y5G8

Signed-off-by: Far <yesiyuan2@huawei.com>
2021-06-28 15:43:15 +08:00
openharmony_ci 5db839acef !362 修复在Liteos-a在FATFS中创建的文件夹在Ubuntu中不可见的BUG
Merge pull request !362 from Far/fatfs
2021-06-25 07:20:10 +00:00
Far a9fc1e0e5d fix: Liteos-a创建的文件夹在Ubuntu中不可见
Linux的文件夹需要包含"."和".."才会被视为一个有效的目录
通过在新建的文件夹中创建"."和".."目录项修复这个BUG

Close #I3XMY6

Signed-off-by: Far <yesiyuan2@huawei.com>
2021-06-24 15:09:12 +08:00
openharmony_ci 008fa8660d !337 fix: fatfs memory leak
Merge pull request !337 from jianjian/master
2021-06-24 05:36:29 +00:00
openharmony_ci e5a3ee6f33 !331 LOSCFG_FS_FAT_VIRTUAL_PARTITION宏开关错误作用域引起的FATFS功能错误
Merge pull request !331 from Far/master
2021-06-21 13:13:06 +08:00
jianjian fbfd71dfe3 fix: fatfs memory leak
Signed-off-by: jianjian <xingjian_liu@yeah.net>
2021-06-20 13:42:01 +08:00
mucor 73a777777e fix: remove redundant headfile
1.remove redundant headfile in kernel, such as:
  compiler.h;debug.h;automount.h;inode.h;syslog.h;net.h;
2.split fs.h to file.h and driver.h
3.move vnode.h and path_cache.h to vfs/include
4.remove redundant interface and defines

close: #I3RTNR

Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-19 17:32:47 +08:00
Far acda419a2d fix: 修复了LOSCFG_FS_FAT_VIRTUAL_PARTITION宏开关错误作用域引起的功能错误
在init_cluster函数中,若未打开LOSCFG_FS_FAT_VIRTUAL_PARTITION会导致循环初始化
簇时,未调用sync_window函数,进而导致创建的文件夹未能正确置零。

Close #I3W1IW

Signed-off-by: Far <yesiyuan2@huawei.com>
2021-06-17 20:56:36 +08:00
chenjing e50cf0be6f feat: fatfs支持符号链接功能
1 将fatfs_creat与fatfs_mkdir抽象成fatfs_creat_obj,通过参数type控制创建的对象类型;
2 新增fatfs_symlink与fatfs_readlink接口,其中:
   1) fatfs_symlink通过fatfs_creat_obj创建出符号链接文件,并为其申请新簇,将target内容写入簇的第一个sector;
   2) fatfs_readlink读出符号链接文件对应簇中第一个sector的内容

close #I3V8D1

Signed-off-by: chenjing <chenjing139@huawei.com>
Change-Id: I38dfaa28af156399817530923534d5b73b4c64af
2021-06-15 11:32:55 +08:00
chenwei 101a55d119 fix: codex
1,VFS代码中不修改参数增加const修饰
2,fs_file_mapping.c: 增加安全函数的判空
3,path_cache.c: sizeof改为使用类型
4,fs_syscall.c: 对NULL解引用
5,VnodeLookup:冗余的判空,及不正确的判空

close: I3UMWD
Signed-off-by: yansira <yansira@hotmail.com>
2021-06-07 22:45:40 +08:00
kenneth 12d98b144b fix: fix length typo
fix typos length、there、necessary

close https://gitee.com/openharmony/kernel_liteos_a/issues/I3RSY0
2021-05-18 14:33:59 +08:00
Far 9503c4a9fc fix: statfs can't get f_bfree and f_bavail of a FAT12/FAT16 partition
FAT12/FAT16 partition has no FSINFO sector storing the free cluster number,
so scanning the FAT is necessary to get the free clusters nums.

Close #I3Q0VS
2021-05-08 10:02:55 +08:00
openharmony_ci 67f9f7506c !192 format函数错误分支未释放锁
Merge pull request !192 from Far/fatfs
2021-04-29 09:57:58 +08:00
Far 9b2b700fa0 fix: some branch in format does not release the vnode mutex properly
if fatfs_mkfs returns a error, format may return without drop the vnode mutex, which may cause deadlock

Close #I3OFAY
2021-04-27 16:49:23 +08:00
chenjing af61187587 fix: fix the inappropriate errno in FatFs
The errno of unrecognized fat filesystem changes from ENOENT to ENOTSUP.

Close #I3O8IF
2021-04-26 16:18:51 +08:00
openharmony_ci be40fa1381 !178 当从hashtable中获取Vnode缓存时,需要刷新Vnode的parent指针
Merge pull request !178 from Far/fatfs
2021-04-24 11:30:01 +08:00
Far f32caa52c6 fix: parent point of vnode found by VfsHashGet should be updated
When fatfs_lookup find a vnode from hashlist, the field parent of vnode should be updated,
because the old parent may be reclaimed.

Close #I3NNFA
2021-04-22 16:24:08 +08:00
JING 3027cfe543 fix ftruncate 2021-04-22 11:12:28 +08:00
chenjing b9c544d898 Description: [fix]ftruncate bugfix
Bug: #I3NEVN
Test:
2021-04-21 16:16:08 +08:00
Caoruihong 7e73c929a2 remove __cplusplus guards in .c files
Change-Id: I052d930d54e63179b17b77f02c107a015f3cfc3f
2021-04-19 18:28:25 +08:00
chenjing 9c13a59ac0 Description: [fix]Uninitialized parameter
Bug: #I2E08N
Test:
2021-04-17 10:04:29 +08:00
JING 580ed3ea62 update fs/fat/virpart/src/virpart.c. 2021-04-16 15:49:35 +08:00
chenjing 77e8075f2f Description: [fix]Initialize parameter
Bug: Uninitialized parameter
Test:
2021-04-16 15:37:26 +08:00
chenjing b9b9d6dbaf Description: [fix] LFN dir entry leak
Bug: #I3J1IC
Test: io test 1000 time
2021-04-16 11:39:37 +08:00
Far beca52b61b Feature: Fatfs scandir format and mmcblk read/write optimization
1. Bcache block with high mem address is after lower mem address in RCU list when initing bcache.
2. Format will clear the bcache before writing the FAT.
3. The fatfs_readdir use the bcache writing block to reduce the chance of data switching out
4. Add performance analysing macron switch

Change-Id: I8fbc48418509d2e660d725d2c265266e931c26f8
2021-04-15 14:49:43 +08:00
openharmony_ci e3ca50e8ad !92 fix bad code in fs codes
Merge pull request !92 from 野生毛霉君/master
2021-03-30 09:49:11 +08:00
openharmony_ci f2ba6f956e !93 four code defect need to be fixed
Merge pull request !93 from ysy4tc3/master
2021-03-27 09:08:56 +08:00
li_zan 195172e655 change config for fs 2021-03-26 17:00:15 +08:00
mucor 1884fa0523 fix readdir, rename
Change-Id: Ic443742e125915f0e5332a338dedea5c40348928
2021-03-24 18:15:06 +08:00
YOUR_NAME 63edd9afd1 Description: code defect fix
Change-Id: I9c49073ad2bbd668102d20da8ff7a8d680890deb
2021-03-24 17:02:25 +08:00
wangchenyang d970750808 Description:vfs refactoring
Feature or Bugfix:Feature
Binary Source:Huawei
PrivateCode(Yes/No):Yes

Change-Id: I175d2648bc6f9078c34de2c0a5c93fda10b86c47
ChangeID:13306388
2021-03-19 13:22:46 +08:00
mamingshuai 73a7b66116 update openharmony 1.0.1 2021-03-11 18:43:57 +08:00
laokz 5f4f8e0c99 fatfs.c避免不同配置下`未使用变量`编译错误 2021-01-20 21:02:38 +08:00
evanscjv 58260bf5fe Bugfix for fatfs double lock 2020-10-16 10:16:14 +08:00
Caoruihong 63bd69267a drop unnecessary executable file permission mode
Change-Id: Ia6c1f6302407a707b3ec9b805f4c92d8a7970b86
2020-10-13 16:37:25 +08:00
Caoruihong aef38baf44 !2 【轻量级 PR】:#I1UT4S 排版问题
Merge pull request !2 from Caoruihong/N/A
2020-09-11 17:21:26 +08:00
wenjun 6df931fc98 add OpenHarmony 1.0 baseline 2020-09-08 17:22:24 +08:00