guohao15 opened a new pull request, #17488:
URL: https://github.com/apache/nuttx/pull/17488

   
   ## Summary
   
   This change introduces the LROFS (ROMFS-compatible Read-Write File System), 
a file system that maintains full compatibility with the ROMFS format while 
extending support for write operation-related APIs.
   
   ROMFS is a read-only file system, which cannot meet scenarios requiring 
write capabilities (e.g., dynamic configuration storage, temporary file 
writing) while retaining ROMFS's lightweight and simple design.
   
   LROFS reuses the core implementation of ROMFS for format parsing and read 
operations to ensure compatibility, and adds write-related APIs (e.g., create, 
modify, delete files/directories, rename) to enable read-write functionality.
   
   The exact functionality of LROFS:
   1 Maintains full compatibility with ROMFS format (existing ROMFS images can 
be mounted and read via LROFS).
   2 Adds write operation APIs to support file/directory creation, 
modification, deletion, and rename operations.
   3 Supports mount options forceformat (force format the storage device before 
mounting) and autoformat (automatically format if the device does not have a 
valid LROFS partition).
   
   Mount command: **mount -t lrofs -o forceformat/autoformat /dev/xxx /mnt.**
   
   ## Impact
   
   Users can mount LROFS with the standard mount command (consistent with ROMFS 
usage habits), and gain write capabilities while retaining ROMFS compatibility.
   
   No breaking changes to existing ROMFS usage; users relying on read-only 
ROMFS can continue to use it without modification.
   
   LROFS is integrated into the existing file system build framework; no 
additional build steps are required.  used by enable CONFIG_FS_LROFS
   
   Fully backward-compatible with ROMFS: ROMFS-formatted data can be read via 
LROFS without modification.
   
   ## Testing
   
   platform: qemu-armeabi-v7a-ap 
   
   1 enable  CONFIG_FS_LROFS=y
   2  mount -t lrofs -o autoformat /dev/virtblk0 /data
   
   test suit:
   fstest -m /data -n 100 -s 512 PASS
   cmocka_fs_test PASS
   cmocka_syscall_test PASS (lseek07 skip)
   vela_fs_file_pressure_test /test PASS
   vela_fs_stress_loop_create_delete_file_test /test PASS
   vela_fs_stress_read_and_write_loops_test /test 10000 PASS
   
   


-- 
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