walnux/fs/vfs
jingfei c3e87dd3d1 drivers/fs: Control the behavior of FTL by passing oflags during the open process.
To save more space (equivalent to the size of one erase sector of
MTD device) and to achieve faster read and write speeds, a method
for direct writing was introduced at the FTL layer.
This can be accomplished simply by using the following oflags during
the open operation:

1. O_DIRECT. when this flag is passed in, ftl internally uses
   the direct write strategy and no read cache is used in ftl;
   otherwise, each write will be executed with the minimum
   granularity of flash erase sector size which means a
   "sector read back - erase sector - write sector" operation
   is performed by using a read cache buffer in heap.

2. O_SYNC. When this flag is passed in, we assume that the
   flash has been erased in advance and no erasure operation
   will be performed internally within ftl. O_SYNC will take
   effect only when both O_DIRECT and O_SYNC are passed in
   simultaneously.

3. For uniformity, we remapped the mount flag in mount.h and
   unified it with the open flag in fcntl.h. The repetitive
   parts of their definitions were reused, and the remaining
   part of the mount flag redefine to the unused bit of open
   flags.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2025-07-16 14:11:41 +08:00
..
CMakeLists.txt fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_chstat.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_close.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_dir.c style: fix spelling in code comments and strings 2025-05-23 10:48:41 +08:00
fs_dup.c fs/vfs: Separate file descriptors from file descriptions 2025-06-12 18:12:42 +08:00
fs_dup2.c fs/vfs: fix bug about lost dup oflags in dup2 2025-07-15 19:46:24 +08:00
fs_dup3.c fs/vfs: Separate file descriptors from file descriptions 2025-06-12 18:12:42 +08:00
fs_epoll.c fs/vfs: Separate file descriptors from file descriptions 2025-06-12 18:12:42 +08:00
fs_eventfd.c fs/vfs: Separate file descriptors from file descriptions 2025-06-12 18:12:42 +08:00
fs_fchstat.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_fcntl.c fs/fcntl: using ioctl to implement FIOGCLEX/FIOCLEX/FIONCLEX 2025-06-15 07:12:44 -03:00
fs_fstat.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_fstatfs.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_fsync.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_inotify.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_ioctl.c fs/vfs: Rename lock.h to vfs.h 2025-06-23 18:17:10 -03:00
fs_link.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_lock.c fs/vfs: Rename lock.h to vfs.h 2025-06-23 18:17:10 -03:00
fs_lseek.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_mkdir.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_open.c drivers/fs: Control the behavior of FTL by passing oflags during the open process. 2025-07-16 14:11:41 +08:00
fs_poll.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_pread.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_pseudofile.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_pwrite.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_read.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_readlink.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_rename.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_rmdir.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_select.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_sendfile.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_signalfd.c fs/vfs: Separate file descriptors from file descriptions 2025-06-12 18:12:42 +08:00
fs_stat.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_statfs.c fs: migrate to SPDX identifier 2024-11-06 01:58:54 +08:00
fs_symlink.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_syncfs.c fs/file: unify prefix about file_xxx api, like file_open, file_ioctl 2025-06-12 18:12:42 +08:00
fs_timerfd.c fs/vfs: Separate file descriptors from file descriptions 2025-06-12 18:12:42 +08:00
fs_truncate.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_uio.c fs/uio: do not overwrite the return value 2025-01-22 16:45:46 +08:00
fs_unlink.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
fs_write.c fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
Kconfig fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
Make.defs fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00
vfs.h fs: Move inotify.c from fs/notify/ to fs/vfs/ 2025-06-23 18:17:10 -03:00