it's more simple to reuse the resolve argument as the recursive count
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I826b2fef3af8b12aae230e4766ab09f8de988f8a
ensure the behaviour is same in all ioctl function variant
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie67cfbc579004c8488ef5004c9be7fb179e77041
and caclulate the available block more accurately
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ia6382239f422970771ccefbd6e461241a5f995a5
since it's hard to adjust all childern to point back the new parent
location. Let's allocate the dynamical part(e.g. tdo_entry) separately
and remove the back pointer.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I53afb8336360b7845bd8ecb5aa908acea20e7797
Follow up commit for [1] in response to the request to make the mount
behaviour configurable whether the number of free clusters is read
from the fsinfo section or computed (as the white paper suggests).
Default is the original behaviour of NUTTX, just read fsinfo.
[1] https://github.com/apache/incubator-nuttx/pull/3760
If the close is blocked(like net close timeout 5s),
then other file operation can't access in this 5s.
Change-Id: Ia6c4ec88d90db0330134d0aaa30e94cb71c8a066
Signed-off-by: ligd <liguiding1@xiaomi.com>
Summary:
- I noticed that an NFS connection is automatically dropped.
- Actually, this happens in TCP mode if no traffic happens
for 600 seconds.
- I confirmed that the NFS client on Ubuntu automatically
reconnects to the NFS server when an RPC call failed.
- This commit adds the same behavior to fix the issue.
Impact:
- NFS client in TCP mode
Testing:
- Tested with spresense:rndis_smp
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
since kernel component should use UTC instead local time
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Icf939e1ab0af8e577105f539d2553bc67b3b3d10
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
Previously the value of the FSInfo section was taken as granted.
As described in the white paper of FAT [1] this value is unreliable
and has to be computed at mount time.
[1] https://www.win.tue.nl/~aeb/linux/fs/fat/fatgen103.pdf
Fix bug that select() did not return when the nfds argument
was set to a negative value. The specification is that -1 is
set to the return value and EINVAL is set to errno.
If the current cluster is invalid, don't use the error code for calculating
the sector number. Instead just return the error code.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
Summary:
- Since binding to a local port is not necessary in TCP mode,
it should be done only in UDP mode
Impact:
- None
Testing:
- Tested with NFS server on Ubuntu 18.04 (x86_64)
- Tested with spresense:rndis (defconfig will be updated later)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- I noticed that receiving a read large packet (e.g. 2KB) in TCP
mode does not work correctly
- Actually, rpcclnt_receive() only received up to MSS
- This commit fixes this issue
Impact:
- TCP mode only
Testing:
- Tested with Ubuntu 18.04 (x86_64)
- Tested with spresense:rndis (defconfig will be updated later)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
Summary:
- I noticed that NFS over TCP does not work with Ubuntu 18.04
- Finally, I found that the record marking packet should not
be sent separately
- This commit fixes this issue
Impact:
- TCP mode only
Testing:
- Tested with NFS server on Ubuntu 18.04 (x86_64)
- Tested with spresense:rndis (defconfig will be updated later)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
arch: Allocate the space from the beginning in up_stack_frame
and modify the affected portion:
1.Correct the stack dump and check
2.Allocate tls_info_s by up_stack_frame too
3.Move the stack fork allocation from arch to sched
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Ken Pettit has submitted the ICLA and we can migrate the licenses
to Apache.
Sebastien Lorquet has submitted the ICLA and we can migrate the licenses
to Apache.
Gregory Nutt has submitted the SGA and we can migrate the licenses
to Apache.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
And redirect assert and log to NuttX's version
which is possible after:
commit c0cc0a417e727764ccce6f1284e3570898d750e6
Author: Christopher Haster <chaster@utexas.edu>
Date: Mon Jan 18 14:01:53 2021 -0600
Enabled overriding of LFS_ASSERT/TRACE/DEBUG/etc
This is useful for testing the new erroring assert behavior in CI.
Asserts do not error by default, so this macro needs to be overriden.
It is possible to test this behavior using the existing option of
overriding lfs_util.h with a custom file, by using a small sed
one-line script. But this is much simpler.
This does raise the question if more of the configuration options in
lfs_util.h should be opened up for function-like macro overrides.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie70814e1a2777e19a7310358d3a94ff965287d7b
Since 7a046358d9 the top-level COPYING
file has been deleted and replaced by DISCLAIMER, LICENSE, and NOTICE
files. However, some references to the old COPYING file remained in
Kconfig help text and documentation.
Documentation/contributing/coding_style.rst:
Documentation/introduction/about.rst:
boards/arm/lpc17xx_40xx/olimex-lpc1766stk/README.txt:
boards/arm/sam34/arduino-due/README.txt:
boards/arm/sam34/sam4l-xplained/README.txt:
boards/arm/sama5/giant-board/README.md:
boards/arm/sama5/sama5d2-xult/README.txt:
boards/arm/sama5/sama5d4-ek/README.txt:
boards/arm/samd2l2/samd20-xplained/README.txt:
boards/arm/samd2l2/samd21-xplained/README.txt:
boards/arm/samd2l2/saml21-xplained/README.txt:
boards/arm/stm32/hymini-stm32v/README.txt:
boards/arm/stm32/stm3210e-eval/README.txt:
fs/fat/Kconfig:
libs/libc/string/Kconfig:
* Updates stale references to the old top-level COPYING file to
either LICENSE or NOTICE (or both), as appropriate in each
instance.
it is wrong to define a new grpid_t, but not reuse pid_t,
because it make getpid(parent) == getppid(child) impossible.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This change reflects that the geometry isn't related to the largest
allocatable unit on the platform.
Calls to read and write block devices are also affected and have
been updated.
let's call either nx_dup/nx_dup2 or file_dup/file_dup2
instead just like other fs api: xxx->nx_xxx->file_xxx
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I1aacfb9e25dc7b3fcb0345ff7b269b1953a01e5b
the argument passed to file_dup2 doesn't always come from task file list
so it doesn't make sense to hold the file list lock and then it is better
to do the protection in the new function files_dupfd2
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ibf02cea9b0b275e7472f9c04fd66b9242285b957
these functions are the implementation detail and then
don't need expose to external
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ief832391d5b42d1f1645907eb465631650490234
the kernel user should call file_open directly instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5bf7f661006f5d43739bc8618abfb4b983fde78d
on the other hand, open/nx_open call file_open instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I66990a77cdeb6ff18f7bf48a65bbc7b701dad552
let's replace the content of file in place instead
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I538910d55815c7aec656c05dba4eab2fa1d6d964
NULL inode passed to files_allocate doesn't mark file struct in the
allocated state, so other threads which invovle in file allocation
(e.g. open or dup) may allocate the same file struct again.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I53ff876eae3c7a1e311e7f671686b73a4b4ef891