Commit Graph

1579 Commits

Author SHA1 Message Date
zhuyanlin
3e92a4e5fb fs:procfs: add waiting_paging_fill state names
Follow task_state in tcb_s.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-09-18 10:08:00 -03:00
chao.an
6dde42d79b vfs/poll: correct the return event if inode has closed
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-15 12:02:53 +08:00
Jiuzhu Dong
6df9d1907c fs/ioctl: using FIOC_FILEPATH instead of FIOC_FILENAME.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-13 08:56:10 +08:00
Jiuzhu Dong
37fc5036bc inode_getpath: correct get path whether path buffer is clean or not.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:30:22 +08:00
Alin Jerpelea
151f6eab3c author: Anton D. Kachalov: update licenses to Apache
Anton D. Kachalov has submitted the ICLA
as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-01 21:02:34 +08:00
Alin Jerpelea
f48e561abb LICENSE: add fs/spiffs license
Add add fs/spiffs license to the LICENSE file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-30 22:39:04 +08:00
Alin Jerpelea
bca973ac51 License: BSD: NFS client file system
the NFS client file system uses the BSD license and should
be excluded by default

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-08-30 22:39:04 +08:00
Xiang Xiao
af72376773 fs: Remove magic field from partition_info_s
since it is wrong and impossible to return file
system magic number from the block or mtd layer.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-20 09:19:52 -03:00
Jiuzhu Dong
dc97ee9b36 fs/mount: fix crash becauseof bad release order
N/A

Change-Id: I850f0706f4554d140a86f935b8dce07d23beedaf
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-19 20:44:18 -07:00
chao.an
9701a678bd net/tcp: add nonblock connect(2) support
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-19 19:19:05 -07:00
Xiang Xiao
4f8c3ab901 fs: Support 64bit in register_[block|mtd]partition
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-16 10:16:09 -03:00
mi
21316466d2 fs/littlefs: improve littlefs flash block erase balance performance 2021-08-14 11:21:44 -07:00
Xiang Xiao
162893cc3b fs/partition: Support BIOC_PARTINFO
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-13 08:45:18 -03:00
Xiang Xiao
6b6c11f0ad mtd: Replace MTDIOC_XIPBASE with BIOC_XIPBASE
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-12 08:01:29 -03:00
Xiang Xiao
177e1ced3f Revert "mtd: Add MTDIOC_FLUSH IOCTL like MTDIOC_XIPBASE"
to simplify flt and partion layer implementation

This reverts commit 2e49e1bc5c.
2021-08-12 08:01:29 -03:00
Xiang Xiao
a09f262f1e fs/userfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 14:57:48 -03:00
Xiang Xiao
9d96c54b1b fs/unionfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 14:57:34 -03:00
Alan C. Assis
9d79f82e24 mmap: Fix note: initialize the variable 'ret' 2021-08-10 09:08:25 -07:00
Xiang Xiao
d7cb4567e6 fs/nfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 21:28:52 +09:00
Xiang Xiao
580de38832 fs/nfs: Return nanosecond from nfs_fstat and nfs_stat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 21:28:52 +09:00
Xiang Xiao
7a60efab35 fs/nfs: Support 64bit file length
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 21:28:52 +09:00
Xiang Xiao
776458143c fs/hostfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 17:55:44 -03:00
Xiang Xiao
6c61d032db fs: Add utimens and lutimens
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
https://www.daemon-systems.org/man/utimens.2.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 17:55:44 -03:00
Xiang Xiao
7f60376d3a fs/hostfs: Change all priv_ to priv
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 13:20:19 +02:00
Jiuzhu Dong
5c5e75ac6f cmd/df: Fix the abnormal output after off_t change
Change-Id: Ieaf063cb636a77eea971cb19e6eaeea6421bff4b
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-06 08:08:36 -07:00
Xiang Xiao
5025fbef8d Rename LIB_ to LIBC_ for all libc Kconfig
follow other libc component naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-05 19:45:24 +02:00
Xiang Xiao
6a396eb224 Fix the printf warning after off_t change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id46daa2ee690a73d3187b479f0e7ab0e2e361764
2021-08-04 06:48:30 -07:00
Xiang Xiao
319474b1b1 fs: Change off_t and related types to int64_t if long long is supported
since it is very popular that the storage capcacity is large than 4GB
even in the embedded system:
https://www.opengroup.org/platform/lfs.html
https://en.wikipedia.org/wiki/Large-file_support

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I019dc08aff02f9ea01eb6d750033bbc358994da5
2021-08-04 06:48:30 -07:00
Xiang Xiao
a262eebe34 libc: Rename match to fnmatch
specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/fnmatch.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 08:23:35 -03:00
Xiang Xiao
307cc61893 fs: Add fchstat and chstat callback into mountpt_operations
and implement all status related change function. the individual
file system change will provide in other upcoming patchset.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I8fde9db8eba9586e9c8da078b67e020c26623cf4
2021-07-29 06:33:49 -03:00
Jiuzhu Dong
11faf0cb20 fs/inode: add sanity check for inode to avoid nullpointer
Change-Id: Ib2c74ba308b8f15756fac4e69632c296243eb4ab
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-25 23:01:37 -07:00
jordi
f3af6edf93 Kconfig: add quotes in source to clean warnings from setconfig
To avoid the setconfig warning "style: quotes recommended around xxx in
source xxx"
2021-07-23 02:32:19 -07:00
Masayuki Ishikawa
e5dafc825d fs: mount: Change the format for df
Summary:
- This commit changes the format for df to support big
  storage up to 2TB.

Impact:
- None

Testing:
- Tested with spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-07-19 04:26:44 -07:00
Masayuki Ishikawa
cfd1c28606 fs, include: Use fsblkcnt_t and fsfilcnt_t instead of off_t
Summary:
- On Linux, fsblkcnt_t and fsfilcnt_t are used in struct statfs
- This commit applies the same logic

Impact:
- None

Testing:
- Tested with spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-07-19 04:26:44 -07:00
Masayuki Ishikawa
a3f1abfb45 fs: nfs: Fix statfs for NFS
Summary:
- I noticed that the results of the df command are incorrect for NFS.
- Finally, I found that obj_attributes is not needed to
  communicate with the NFS server on Linux
- This commit fixes this issue

Impact:
- None

Testing:
- Tested with spresense:rndis_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2021-07-19 04:26:44 -07:00
Xiang Xiao
02a6966ad5 fs: mkdir return EEXIST if the path already exist
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie1808697b860974367c17e0ba614ca5cae79f324
2021-07-18 10:25:54 -03:00
Xiang Xiao
7053707e0a fs/tmpfs: Handle the tail '/' correctly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia2beeaced2de9c38afefd92a2ddc13dfb4919c45
2021-07-18 10:25:54 -03:00
Xiang Xiao
663104a2e9 fs: Simplify sendfile implementation
and avoid call nx_ file API in the kernel space

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Id951ca161df2c2ee267dc4b5a0d7dfa67df4c1e6
2021-07-17 07:39:15 -03:00
Xiang Xiao
2e0901fcaa net: Add file_socket function
and move the socket special process from fstat/nx_vfcntl/ to file_fstat/file_vfcntl

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia10341538488ba3a8444df8e73fb5257b2a1f512
2021-07-17 07:39:15 -03:00
Xiang Xiao
a44f62ddf7 fs: should only apply umask to the userspace caller
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I608e3107aaf3d85045958163a742a1ef1107de91
2021-07-17 13:58:58 +09:00
Xiang Xiao
a0f2f6c362 fs: Move umask to task_info_s
and implement the related semantic correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I0587341e2c505e41b5e24e55dba039ed200d65f2
2021-07-14 10:35:15 -03:00
Xiang Xiao
0148e1d501 fs: Support the root file system attributes(mode, uid, gid and time)
Note: all attributes is guarded by PSEUDOFS_ATTRIBUTES to save the space

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I664d60382e356068fd920f08aca5b4a49d8d92a9
2021-07-14 10:35:15 -03:00
Xiang Xiao
1f3a8b5adf Fix mmap compiler error when CONFIG_FS_RAMMAP equals y
fs_munmap.c:122:15: error: ‘struct fs_rammap_s’ has no member named ‘kernel’
fs_rammap.c:110:52: error: expected ‘:’ before ‘;’ token

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-13 14:39:14 -03:00
Xiang Xiao
30135b5f18 vfs: stat_recursive should return -ENOSYS if stat callback is NULL
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ic342b6fff112d24c7355ddc8aa0937dfc544f1b4
2021-07-13 11:32:52 -03:00
Xiang Xiao
d539998446 fs: fstat shouldn't follow the symbol link
since the decision is already done at open time(from path to fd)

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Idc1df3c1d7fe60927b0643173f3f40895aaffd4c
2021-07-13 10:05:50 -03:00
Xiang Xiao
c3c4053263 fs/profs: Add ordblks in meminfo_progmem
forget in commit:
Author: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
Date:   Wed Apr 28 11:05:20 2021 +0800

    cmd/free: add nused/nfree field in command free

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-12 16:49:56 -03:00
Xiang Xiao
7ef29ecce6 profs: Print StackAlloc by procfs_snprintf
since snprintf return the wrong number in case of insufficient buffer

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-12 16:49:56 -03:00
hujie1
025bddfc6c nuttx: littlefs_close should return value bugfix
N/A

Change-Id: I5fea016fe01ac0e87ddeabdae67d36ab4125ea55
2021-07-12 10:05:49 -03:00
Jiuzhu Dong
9b1f554429 sched: Dynamically extend the pid hash table
Change-Id: I3a719bc575cd408cd530a39efa203f507b44fa9c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-07-11 19:42:30 -07:00
Xiang Xiao
2fa1e55628 libc: Implement ttyname and ttyname_r
Note: this patch can get file path from root pseudo file handle,
but a general infrastructure is setup for other file system too.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I86cd79ebb741f2f43fdd398bb7498c40687d949b
2021-07-09 18:23:34 -03:00