]>
Projects (at) Tadryanom (dot) Me - AdrOS.git/commit
vfs: mount/umount/df overhaul — fstype/source metadata, /proc/mounts, mount flags, recursive mkdir-p, busy-check
Kernel changes:
- Extended vfs_mount struct with fstype[32], source[64], flags fields
- Increased mount table capacity from 16 to 32 entries
- Added vfs_mount_full/vfs_mount_nolock_full for metadata-aware mounts
- Added vfs_mounts_read() exposing mount table for /proc/mounts
- Added vfs_mkdirp() for recursive mkdir -p (auto-create mountpoints)
- Added busy-check in vfs_umount_nolock: reject if child mounts exist
- Fixed MS_REMOUNT: allow NULL root (update flags only on existing mount)
- Updated kernel boot-time mounts to pass fstype/source metadata
- Updated SYSCALL_MOUNT: parse flags, MS_REMOUNT support, vfs_mkdirp
- Updated SYSCALL_UMOUNT2: read flags arg (MNT_FORCE/MNT_DETACH)
- Updated pivot_root to use vfs_mount_nolock_full
- Added /proc/mounts procfs entry with proc_mounts_read handler
Userland changes:
- Rewrote statvfs: parses /proc/mounts with longest-prefix match,
fstype-aware block count estimation (tmpfs/procfs/devfs/overlayfs)
- mount: added -o flag parsing (ro, rw, remount)
- umount: added -f (MNT_FORCE) and -l (MNT_DETACH) via umount2
- init: added is_mounted() check to avoid duplicate virtual FS mounts
Test results: 120/120 smoke, 152/152 battery, 111/111 host PASS