dongjiuzhu1
09a9611ae9
fs/inode: using rwsem lock as inode_lock to avoid deadlock
...
Example:
When executing "df -h" on Core A to view mount information, this
process will traverse inode nodes, thereby holding the inode_lock.
Since the inode type of the mount point may be rpmsgfs, it will fetch statfs
information from another Core B.
Meanwhile, rcS on Core B needs to obtain file information from Core A,
which will be achieved by fetching stat information through rpmsgfs.
When this message arrives at Core A, a deadlock can occur between Core A's
rptun ap and nsh task.
However, both of these places involve read operations only, thus a reader-writer lock
can be utilized to prevent such a deadlock.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-02 01:56:46 +08:00
dongjiuzhu1
43d0d95f81
fs/inode: using inode reference to indicate unlink and simply code
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-09 08:42:34 +08:00
guohao15
86e00896d3
fs:notify add support for inotify
...
support API: open close read write unlink mkdir rename fchstat rmdir symlink
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-08-22 01:50:37 +08:00
Ville Juven
5f36a43609
sched/semaphore: Move named semaphores to user space
2023-11-27 04:52:54 -08:00
chao an
7aa45305b7
fs/inode: remove all unnecessary check for filep/inode
...
Since VFS layer already contains sanity checks, so remove unnecessary lower half checks
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-29 09:47:11 +08:00
hujun5
0b2b5b781c
fs: remove sched_[un]lock
...
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-08-01 23:15:37 +02:00
wangbowen6
a491d07061
sem_unlink: return ENOENT when the named semaphore does not exist.
...
Follow posix, return ENOENT when the named semaphore does not
exist to fix the ltp open posix sem_unlink 4-1.c test problem.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-01-09 22:46:30 +08:00
Xiang Xiao
3f12b4f1e3
sched: Remove the unnecessary (FAR sem_t *) cast
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-29 21:12:40 +02:00
anjiahao
d1d46335df
Replace nxsem API when used as a lock with nxmutex API
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
Xiang Xiao
40ef5bc6db
libc: Move queue.h from include to include/nuttx
...
to avoid the conflict with libuv's queue.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-26 08:04:58 +02:00
Xiang Xiao
c6beb35e9e
semaphore: Rename FS_NAMED_SEMPATH to FS_NAMED_SEMAPHORES_VFS_PATH
...
align with other similiar config which suffix with _VFS_PATH
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-05 23:58:01 +01:00
Gregory Nutt
a4d6af8343
Check return from nxsem_wait_initialize()
...
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/inode. Utility functions under fs/incode were modified so the changes do extend to other fs/ sub-directories as well.
2020-03-30 01:33:31 +01:00
Xiang Xiao
bd4e8e19d3
Run codespell -w against all files
...
and fix the wrong correction
2020-02-22 14:45:07 -06:00
Xiang Xiao
5c80b94820
Replace #include <semaphore.h> to #include <nuttx/semaphore.h>
...
Since the kernel side should call nxsem_xxx instead and remove the unused inclusion
2020-02-01 08:27:30 -06:00
Gregory Nutt
b54ffe858a
Standardization of some function headers.
2018-03-13 09:52:27 -06:00
Gregory Nutt
7cf88d7dbd
Make sure that labeling is used consistently in all function headers.
2018-02-01 10:00:02 -06:00
Gregory Nutt
45fd98da88
Add macros support that will eventually allow dynamic allocation of strings need to support soft links.
2017-02-05 14:25:45 -06:00
Gregory Nutt
8f2c7198ed
inode_find: Now takes struct inode_desc_s type as input. This was necessary before that structure includes some data storage. It was used within inode_find(), but that means that the life of the data was the life of inode_find(). That data must persist longer. It is now provided by the caller so that the life of the data persists for the entire life of the caller.
2017-02-05 09:51:42 -06:00
Gregory Nutt
0c9935f8ac
FS: Remove inode_find_nofollow. Instead provide a bool nofollow argument to inode_find.
2017-02-04 11:46:54 -06:00
Gregory Nutt
9008308b64
Remove some block comments before empty code sections
2016-04-11 18:16:04 -06:00
Gregory Nutt
0fb035f76b
Standardize some naming in code section comments
2016-02-21 18:09:04 -06:00
Gregory Nutt
cb9e27c3b0
Standardize naming used for public data and function groupings
2015-10-02 16:30:35 -06:00
Gregory Nutt
5462ede661
Fix some unbalanced sched_lock()/sched_unlock() pairs int the re-implemented VFS semaphore and message queue logic
2014-09-29 16:13:07 -06:00
Gregory Nutt
419b074b15
Completes the re-implementation of mq_unlink()
2014-09-29 15:48:52 -06:00
Gregory Nutt
ae90309b36
Move fs/fs.h to fs/inode/inode.h and some to fs/driver/driver.h
2014-09-29 07:14:38 -06:00
Gregory Nutt
d5dd9842dc
Add build support for messages queues as part of the VFS (only build logic, no C files yet)
2014-09-29 07:00:11 -06:00
Gregory Nutt
999cc5ef8b
Seems to work okay now, but needs more testing
2014-09-28 16:36:43 -06:00
Gregory Nutt
650a0d0615
Completes VFS-based named semaphore implemetation. Still a little buggy
2014-09-28 15:58:56 -06:00