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
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>
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>
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>
The following nxstyle errors are not new.
(macros like SIZEOF_rpc_reply_readdir)
fs/nfs/nfs_vfsops.c:848:12: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1020:16: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1420:13: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1818:11: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1819:11: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1830:8: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1851:42: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:2049:54: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:2115:58: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:2172:54: error: Mixed case identifier found
The following nxstyle errors are intentionally left
because they are parts of the copyright notices.
fs/nfs/rpc_clnt.c:46:80: error: Long line found
fs/nfs/rpc_clnt.c:63:78: error: Long line found
The use of uint64_t primitive type in NFS structures forces the compiler to align data on an 8-byte boundary.
As a result of this, unwanted gaps being created, which causes NFS to fail. (e.g., nfs_read/initialize the request)
Using nfsuint64 instead of uint64_t fixes this issue.
The build gets broken when both the NFS and DEBUG_FS_ERROR configurations enabled. This tiny change fixes the compilation error.
Run file through nxstyle and correct issues.
NOTE: This line:
/* This logic just supports "//" sequences in the path name */
generates the false alarm error:
fs/nfs/nfs_util.c:84:39: error: C++ style comment
Resolution of Issue 619 will require multiple steps, this part of the first step in that resolution: Every call to nxsem_wait_uninterruptible() must handle the return value from nxsem_wait_uninterruptible properly. This commit is only for those files under fs/driver, fs/aio, fs/nfs, crypto/, and boards/.
Please note: The modified file under fs/nfs generates several " Mixed case identifier found" errors. Please ignore these. These cannot be fixed without changes to numerous other files. They also follow a non-standard convention that is used many files: Using lower case structure names in custom SIZEOF_ definitions.
* fs/nfs: Remove all nfs_checkmount call. The check just waste cpu cycle since nobody will set nm_mounted to false, and remove the unused fields(nm_mounted and n_flags) and related flags too
* fs/nfs: Fix the definition not confirm to RFC 1813 and other minor issue(unused, typo, duplication, alignment...)
* fs/nfs: Always represent error with negative number and remove the unused arguments from function
* fs/nfs: Set socket receive timeout with nfs_args->timeo and fix warning:
nfs/nfs.h:59:28: warning: large integer implicitly truncated to unsigned type [-Woverflow]
#define NFS_TIMEO (1 * NFS_HZ) /* Default timeout = 1 second */
^
nfs/nfs_vfsops.c:1857:23: note: in expansion of macro 'NFS_TIMEO'
nprmt.timeo = NFS_TIMEO;
^
^~~~~~~~~
* fs/nfs: Update the file attribute correctly in nfs_filetruncate and simplify the attrbitue conversion between NFSv3 and NuttX
* fs/nfs: Remove the unfinished and buggy EXCLUSIVE creation mode
* fs/nfs: Call nfs_fsinfo in nfs_bind instead of nfs_statfs since we should update the buffer size before transfer happen, and handle the attribute existence variance correctly.
* fs/nfs: Shouldn't insert node into list again in nfs_dup and fix other typo issue
* fs/nfs: Should skip . and .. in nfs_readdir
* fs/nfs: Remove the unnecessary dynamic allocation and the duplicated root handle storage
* Simplify EINTR/ECANCEL error handling
1. Add semaphore uninterruptible wait function
2 .Replace semaphore wait loop with a single uninterruptible wait
3. Replace all sem_xxx to nxsem_xxx
* Unify the void cast usage
1. Remove void cast for function because many place ignore the returned value witout cast
2. Replace void cast for variable with UNUSED macro
fs/nxffs: Add partial implementation of the truncate method: It extend files, but cannot yet shrink them.
fs/smartfs: Add partial implementation of the truncate method: It extend files, but cannot yet shrink them.
fs/fat: Add partial implementation of the truncate method: It extend files, but no yet shrink them.
fs/nfs: Add support for the truncate method to the NFS file system.
fs: Add truncate() support for userfs
fs/unionfs: Add truncate() support to the unionfs
fs/tmpfs: Add ftruncate() support to tmpfs
syscall/: Add system call support for ftruncate()
net/route: Adding ftruncate() support eliminates an issue in file-based routing table management.
fs: Add basic framework to support truncate() and ftruncate(). The infrastructure is complete. Now, however, the actual implementation of ftruncate() will have to be done for each file system.