jerpelea opened a new pull request, #20276: URL: https://github.com/apache/nuttx/pull/20276
## Summary Implements POSIX-style unlink semantics for FAT: when an open file is unlinked, its directory entry is removed but its FAT cluster chain is kept until the last open reference is closed (fixes https://github.com/apache/nuttx/issues/20037). Adds a FAT-local canonical/shared open-file object (struct fat_shared_s). Shared state contains reference count, pending-delete state, file size, starting cluster, and directory-entry location. Multiple open handles and dup() share this canonical state. Directory-entry location is used for identity rather than relying only on the starting cluster. Correctly handles empty files, multiple opens, dup(), rename, directory/cluster reuse, and operations after unlink. Pending deleted files do not write metadata back to deleted or reused directory entries. fstat(), truncate, sync, and subsequent writes continue using shared in-memory state. The implementation is intentionally scoped to fs/fat and does NOT introduce a generic VFS inode mechanism. Fixes https://github.com/apache/nuttx/issues/20037. ## Impact RELEASE ## Testing CI -- 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]
