Swatantra-66 commented on code in PR #20820:
URL: https://github.com/apache/nuttx/pull/20820#discussion_r4350779025


##########
fs/Kconfig:
##########
@@ -17,6 +17,25 @@ config DISABLE_MOUNTPOINT
        bool "Disable support for mount points"
        default n
 
+config FS_DIRENT_LITE
+       bool "Lightweight directory operations"
+       default n
+       depends on BUILD_FLAT
+       ---help---
+               Enable a lightweight directory implementation where opendir(),
+               readdir(), and closedir() bypass file descriptor allocation,
+               the synthetic directory inode, and vectored I/O. This 
significantly
+               reduces code footprint (by ~2 KB) on memory-constrained systems.

Review Comment:
    @xiaoxiang781216  Yes, Since nx_xxxdir is very close to dir_xxx, 
introducing a Kconfig option like CONFIG_FS_VECTORED_IO (default 
!DEFAULT_SMALL) to option out vector I/O across VFS is a much cleaner systemic 
solution. When disabled, file_read() and file_write() directly call the inode's 
read/write callbacks, dropping fs_uio.c and file_readv/file_writev (~1.8 KB 
savings) while keeping standard POSIX directory operations intact.
   Would you like me to pivot this PR to introduce CONFIG_FS_VECTORED_IO 
instead of CONFIG_FS_DIRENT_LITE



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to