wangchen
698756d1e6
fix: A核代码告警清零
...
【背景】定期A核代码告警清零。
【修改方案】
根据工具扫描结果,对代码告警进行更改。
【影响】
对现有的产品编译不会有影响。
re #I4378T
Signed-off-by: wangchen <253227059@qq.com>
2021-07-30 17:13:55 +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
openharmony_ci
d7387508e3
!402 消除编译告警
...
Merge pull request !402 from x_xiny/master
2021-07-09 08:37:20 +00: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
chenjing
56a95b9ec9
fix: 修复内核access chmod chown接口
...
1、修复内核的access chmod chown功能;
2、此三个接口的syscall直接调用内核态接口执行操作。
close #I3Z5L6
Signed-off-by: chenjing <chenjing139@huawei.com>
Change-Id: I301f00fb341252b697b04b9970db86f0e7f978df
2021-07-05 16:03:16 +08:00
mucor
56b8ecaf17
fix: add (void) to GetFileMappingList method
...
close: #I3XPXY
Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-24 20:32:47 +08:00
mucor
3d1cf683f3
feat: add clear cache cmd to /proc/fs_cache
...
write "clear pathcahe" to clear pathcaches and vnodes
write "clear pagecache" to clear pagecaches
write "clear all" to clear both pathcaches and pagechaches
the cache in use will not be cleared
close: #I3XLPH
Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-24 15:11:50 +08:00
mucor
231cb6be27
feat: add /proc/fs_cache to display cache info
...
add /proc/fs_cache to display vnode, path cache, page cache.
also change some bad virable name
close: #I3WWBD
Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-22 14:53:17 +08:00
SimonLi
2f3d7efc24
回退 'Pull Request !342 : 增加/proc/fs_cache来显示文件系统缓存维测信息'
2021-06-21 21:33:52 +08:00
mucor
53c6d96c6f
feat: add /proc/fs_cache to display cache info
...
add /proc/fs_cache to display vnode, path cache, page cache.
also change some bad virable name
close: #I3WESD
Signed-off-by: mucor <mucorwang@gmail.com>
2021-06-21 16:11:06 +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
openharmony_ci
b91fabb76c
!292 新增link/symlink/readlink接口的系统调用及内核实现
...
Merge pull request !292 from JING/link
2021-06-10 13:02:04 +08:00
chenjing
6eddc869d3
feat: support link/symlink/readlink
...
新增link/symlink/readlink接口的系统调用及内核实现,当前仅支持jffs2文件系统。具体接口说明如下:
一、hard link
接口原型:
int link(const char *oldpath, const char *newpath);
int linkat(int olddirfd, const char *oldpath, int newdirfd, const char *newpath, int flags);
作用:
创建oldpath的硬链接,名为newpath。
功能说明:
1、newpath与oldpath必须在同一挂载分区内。
2、若newpath已存在,不会覆盖,错误码EEXIST。
3、oldpath必须为普通文件或者软链接文件。
4、如果oldpath是一个软链接文件,那么:
若调用link接口或者linkat(flags=0),创建出软链接文件的硬链接;
若调用linkat(flags = AT_SYMLINK_FOLLOW),创建出软链接所指向源文件的硬链接。
5、oldpath与newpath对应同一个文件,对oldpath与newpath任一名字的操作都是直接操作文件,没有“原始文件”的说法。
6、使用cp命令拷贝一个硬链接文件,生成文件的拷贝,新文件的nlink数为1。
7、删除oldpath或newpath,底层文件仍存在,可以通过另一个path访问。只有当两个path都删除之后,才会真正将文件删除,空间释放。
二、symbol link
接口原型:
int symlink(const char *target, const char *linkpath);
int symlinkat(const char *target, int newdirfd, const char *linkpath);
作用:
创建一个软链接文件linkpath,存储字符串target。
功能说明:
1、target可以为任意字符串(长度小于PATH_MAX)。
2、若linkpath文件名已存在,不会覆盖,错误码EEXIST。
3、用readlink函数可读取软链接的target内容。
4、软链接文件本身大小为target长度。
5、ls时软链接文件类型显示为 'l'。
6、symlink最大循环次数为CONFIG_FS_MAX_LNK_CNT(目前为40),超出则返回错误,错误码ELOOP。
7、使用cp命令拷贝一个软链接文件:
若target是一个文件:创建一个源文件的拷贝,类型为普通文件;
若target非文件:拷贝失败。
三、readlink
接口原型:
ssize_t readlink(const char *pathname, char *buf, size_t bufsiz);
ssize_t readlinkat(int dirfd, const char *pathname, char *buf, size_t bufsiz);
作用:
读取软链接文件存放的的target内容。
功能说明:
1、pathname必须为软链接文件,否则错误码EINVAL。
2、如果bufsiz小于target长度,则截断target。
close #I3Q0OD
Change-Id: I3864d6069b627b705a369e8e32dc1eb922dc0157
Signed-off-by: chenjing <chenjing139@huawei.com>
2021-06-09 16:39:41 +08:00
lzl
6352d6e1da
kernel adapter
...
Signed-off-by: lzl <sucer_fater@163.com>
2021-06-08 09:07:04 +00:00
openharmony_ci
1a3f3f54e7
!302 fix: Codex告警清零
...
Merge pull request !302 from Far/master
2021-06-08 08:48:48 +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
Far
b5370af822
fix: codex clean
...
1. 修复可能对NULL指针解引用的场景
2. 将不修改内容的指针入参修改为const
3. 对getpgrp的返回值进行校验后再使用
4. 修复了局部变量未初始化的问题
Close #I3UOFN
Signed-off-by: Far <yesiyuan2@huawei.com>
2021-06-07 17:08:02 +08:00
openharmony_ci
a580754751
!295 修复删除/dev目录下的文件但是vnode number没有减小的问题
...
Merge pull request !295 from LeonChan/lc-bugfix-vnode
2021-06-04 21:50:32 +08:00
chenwei
4f514a16af
fix: the total used vnode number not increased after unlink a file under
...
/dev/
fix #I3TS1Y
Signed-off-by: yansira <yansira@hotmail.com>
2021-06-04 16:49:04 +08:00
arvinzzz
8cde768588
refactor: Refactored the kernel boot process and added a init framework
...
close: #I3I768
Change-Id: I4f801df4abe1a9afdf43391c28276e96a5e81513
2021-05-20 16:45:43 +08:00
zhOu
f76fa4a344
feature: support ipc copy fd to process
2021-05-11 14:56:09 +08:00
mucor
04bcb11c3c
fix:add vnode destory for unregister dev node
...
Change-Id: I2205bbf42e7c2339f81443ace6924b12f4fa1c09
2021-04-30 15:31:03 +08:00
mucor
749420308e
fix:shell cmd rm -r crash when open target dir failed
...
Change-Id: I1146ab12b02aeef3f9a2a0422ee45936f5e4c105
2021-04-29 16:52:13 +08:00
openharmony_ci
1d0a3f022b
!186 将VnodeInUseIter和VnodeFreeAll函数改为非递归
...
Merge pull request !186 from Far/dev
2021-04-29 10:04:50 +08:00
openharmony_ci
6467ebb2dd
!194 PathCacheMemoryDump内存占用统计错误
...
Merge pull request !194 from Far/master
2021-04-29 09:58:45 +08:00
Far
5f6656cb36
fix: VnodeInUseIter and VnodeFreeAll used to be recursive
...
Function VnodeInUseIter and VnodeFreeAll used to be recursive.
Now we traverse the current in-use vnode list to find the vnode in
1 filesystem
Close #I3NN3U
2021-04-28 14:35:29 +08:00
Far
87da7c794c
fix: PathCacheMemoryDump miscalculate the RAM usage of PathCache
...
PathCacheMemoryDump miscalculate the RAM usage of PathCache for not
counting the name field of PathCache, which is allocated with PathCache
Close #I3OBXY
2021-04-28 14:31:31 +08:00
mucor
aa34ffe7c7
fix:remove redundant code
...
Change-Id: I8662952ac9d7912aaf2e2e72f779b3def41d14c4
2021-04-28 09:57:32 +08:00
openharmony_ci
fbdb808d11
!169 los_disk_cache_clear错误日志缺少换行符
...
Merge pull request !169 from Far/dev
2021-04-24 09:39:54 +08:00
Far
9f47faff73
fix: PathCacheFree try to free name field in struct PathCache
...
The name field of struct PathCache is not allocated. It should not try to free it by free(nc->name)
Close #I3NTH9
2021-04-23 15:28:44 +08:00
openharmony_ci
89ed41a016
!173 [Desc] fix bug: kernel crashed after rmdir the umounted folder
...
Merge pull request !173 from LeonChan/lc-master
2021-04-21 19:31:12 +08:00
chenwei
ac0d083b1c
fix: kernel crashed after rmdir the umounted folder
...
Close: I3NGBT
Change-Id: I70130c42061e51f5978b48befea66a5925386343
2021-04-21 17:31:28 +08:00
Far
5f6f683fab
style: los_disk_cache_clear error message has no \n(LF)
...
Close #I3NCDD
2021-04-21 11:01:09 +08:00
openharmony_ci
6ee33eb893
!165 【轻量级 PR】:update fs/vfs/vnode_hash.c.
...
Merge pull request !165 from 冷钦街/N/A
2021-04-21 08:37:54 +08:00
openharmony_ci
7dd3b59fb0
!166 【轻量级 PR】:update fs/vfs/mount.c.
...
Merge pull request !166 from 冷钦街/N/A
2021-04-21 08:37:09 +08:00
冷钦街
d7798fd0ab
update fs/vfs/path_cache.c.
2021-04-20 22:16:09 +08:00
openharmony_ci
5605063950
!163 [Desc] add debug code to fix bug: kernel crashed after rmdir the umounted folder 3
...
Merge pull request !163 from LeonChan/lc-master
2021-04-20 19:09:47 +08:00
冷钦街
0566bccffa
update fs/vfs/mount.c.
2021-04-20 18:35:15 +08:00
冷钦街
9bcead9a8f
update fs/vfs/vnode_hash.c.
2021-04-20 18:26:48 +08:00
chenwei
c6e921241b
fix: kernel crashed when delete a umounted folder
...
Close: I3MZZ6
Change-Id: Iab3919a2eebb44c82531a7fa7a2f688ec4bcc5a0
2021-04-20 16:10:24 +08:00
Far
902a11de9a
fix: lookup new vnode may cause parent vnode freeing
...
Close #I3MYP4
Change-Id: I533f4bacaf7e6dd500f5ac3ce4f5343b3b885988
2021-04-20 11:43:14 +08:00
Caoruihong
7e73c929a2
remove __cplusplus guards in .c files
...
Change-Id: I052d930d54e63179b17b77f02c107a015f3cfc3f
2021-04-19 18:28:25 +08:00
openharmony_ci
75a85e4483
!151 [Desc] add debug code to fix bug: kernel crashed after rmdir the umounted folder, parentVnode->data null
...
Merge pull request !151 from LeonChan/lc-master
2021-04-19 11:00:57 +08:00
chenwei
296274b60f
add debug code to fix bug: kernel crashed after rmdir the umounted folder, parent->data null
...
Change-Id: I44981eb9475feb4604ffe91244b4dff00f7d1548
2021-04-17 11:44:03 +08:00
openharmony_ci
0e56ee6509
!147 fix capabilities in write and execute case
...
Merge pull request !147 from 野生毛霉君/master
2021-04-17 09:46:29 +08:00
mucor
c6b898ea30
fix capabilities in write and execute case
...
Change-Id: Ic9abc53cd0aafa1fd6272fab8191493c609ea995
2021-04-16 17:33:40 +08:00
openharmony_ci
af2b0ac75b
!144 用于检测umount栈溢出的调测功能
...
Merge pull request !144 from ysy4tc3/dev
2021-04-16 17:11:28 +08:00
chenwei
a7c5abf64c
add debug code to fix bug: kernel crashed after rmdir the umounted folder
...
Change-Id: Ia956fd09f1bd734cd26ab631359c1e2131fe1e37
2021-04-16 11:30:04 +08:00
Far
7e0e46828b
Bugfix: add vnode iteration debug feature for a bug
...
buginfo: when try to umount a nfs node, it may casue stack overflow.
Change-Id: I7d96f74a770607c990ca5f51cb92fb2843a08d12
2021-04-16 11:00:38 +08:00