Commit Graph

53 Commits

Author SHA1 Message Date
kenneth 0f878febb7 chore: 修复社区反馈问题Percpu结构体注释错误
修复社区反馈问题Percpu结构体注释错误,排查下其他拼写错误。

close #I4GMLH

Signed-off-by: kenneth <zhushangyuan@huawei.com>
2021-11-10 10:20:33 +08:00
Far c1c2be2a87 refactor: 文件系统Open性能优化
优化包括:
1. 提供VnodeLookupFullpath接口,如果路径是规范化的路径,则调用此接口可减少一次vfs_normalizepath接口的调用;
2. fatfs open钩子函数FIL和buffer同时malloc,减少一次malloc调用,同时去除不必要的数据写回;
3. 其他小细节的优化。

Close #I4E0CT

Signed-off-by: Far <yesiyuan2@huawei.com>
2021-10-15 11:59:38 +08:00
openharmony_ci de8bd2866a !609 三方库FatFs升级至r0.14a版本
Merge pull request !609 from Far/fatfs_update
2021-09-24 00:53:43 +00:00
Far d23f2fc73f feat:适配三方库FatFs升级至r0.14a版本
适配了_mkfs和find_volume接口的修改

Signed-off-by: Far <yesiyuan2@huawei.com>
2021-09-22 15:00:40 +08:00
openharmony_ci ecd9ca7781 !534 pagecache从filep改为使用vnode
Merge pull request !534 from LeonChan/pg
2021-09-15 03:51:50 +00:00
Leon Chan 38a6b804e9 feat: page cache backed by vnode instead of filep
1, change the owner of page to vnode
2, save the file path in vnode

close: #I44TBS
Signed-off-by: Leon Chan <chenwei26@huawei.com>
2021-09-14 15:31:33 +08:00
arvinzzz b3d96d166c refactor: 清理Makefile冗余项
清理Makefile冗余项,各模块Makefile里不需要再次引用公共路径,只需引用私有头文件路径

close: #I49MOO

Signed-off-by: arvinzzz <zhaotianyu9@huawei.com>
Change-Id: I2dd7189c866498896461f78bfed5444ae1d86876
2021-09-13 18:14:15 +08:00
Guangyao Ma f67c4dae51 feat: add sync() to vfs
新增sync方法,该方法每次调用,会遍历系统内所有的mount点,调用各个文件系统注册
的sync方法,完成对所有已挂载文件系统的sync操作。

close #I480HV

Signed-off-by: Guangyao Ma <guangyao.ma@outlook.com>
Change-Id: I57ced9c3f7685a448defd17ae56c842796b5668f
2021-09-08 15:41:52 +08:00
Caoruihong 9549f5ebd0 chore(musl): reduce the modifications of musl
Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I32b820bc0eb7465bf54d506e7f5e759ef64101e2
2021-08-19 16:07:12 +08:00
Kiita c3245b3ce3 fix: toybox update
【背景】liteos_a toybox 命令已知问题修复

【修改方案】
1、修复ls 统计文件大小问题。

Signed-off-by: yansira <yansira@hotmail.com>
Change-Id: I64c41d3970650a434409f332b2659e31bb9223ab
2021-08-03 21:16:42 +08:00
wangchen 698756d1e6 fix: A核代码告警清零
【背景】定期A核代码告警清零。

【修改方案】
根据工具扫描结果,对代码告警进行更改。

【影响】
对现有的产品编译不会有影响。

re #I4378T
Signed-off-by: wangchen <253227059@qq.com>
2021-07-30 17:13:55 +08:00
Kiita 76f45b3fb2 fix: toybox命令升级
【背景】liteos_a toybox 命令升级升级

【修改方案】
1、help命令列表不支持命令删除。
2、cp命令和mv命令拷贝文件失败和文件损坏等问题修复。
3、修复du命令统计nfs文件大小为0问题修复。
4、修复ls命令nfs文件时间打印信息有误问题。
5、更新命令不支持入参列表。

re #I41N2A

Signed-off-by: yansira <yansira@hotmail.com>
Change-Id: I5f5b82e33ba9193ae06e9547182d5b7bac0a3b44
2021-07-22 23:40:40 +08:00
Caoruihong a8805a65aa feat: add support for gn build system
add BUILD.gn for all kernel modules

Signed-off-by: Caoruihong <crh.cao@huawei.com>
Change-Id: I018446427bf64615f2596d47862b219659b58b34
2021-07-21 15:52:40 +08:00
Far 8729f6ee57 feat: 增加mount的MS_RDONLY标志的支持
增加mount的MS_RDONLY标志的支持,并修改vfs主要接口相关支持。
1. fatfs lseek接口在分区以MS_RDONLY方式和文件以只读打开时不再能够扩大文件的大小。
2. 直接在镜像中创建storage目录,而不是在挂载根文件系统时创建storage目录。
3. 增加了MS_RDONLY的测试用例。

Close #I3Z1W6

Signed-off-by: Far <yesiyuan2@huawei.com>
2021-07-20 16:21:08 +08:00
Far 33f5c70e6c fix: 修复FATFS中不同内部接口不支持FAT12/FAT16 FAT表结束标志
FATFS内部接口中,仅对FAT32的FAT表结束符0x0FFFFFFF做了判断,而忽略了FAT12和FAT16的结束标志。
这会导致子在FAT12/FAT16中,部分功能异常。

Close #I409R6

Signed-off-by: Far <yesiyuan2@huawei.com>
2021-07-13 10:05:06 +08:00
x_xiny e4ff04586f fix:消除编译告警
【背景】
 消除编译告警

【修改方案】
 消除编译告警

 re #I3ZC1R

 Change-Id: I594d0f57e4cbbdb246a6bef1c978a38228123a34

 Signed-off-by: x-xiny <1301913191@qq.com>

Change-Id: I1d75cdcdcf9d06ec28e541cdfea77300da7c6bb1
2021-07-08 20:30:33 +08:00
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