Patch 1: Remove diskfs/persistfs source code from kernel
- Delete include/diskfs.h, include/persistfs.h
- Delete src/kernel/diskfs.c, src/kernel/persistfs.c
- Remove diskfs/persistfs auto-mount from init.c
- Remove diskfs/persistfs kconsole commands
- Remove diskfs.img creation from Makefile
- Remove diskfs/persistfs entries from rootfs/etc/fstab
- Update BUILD_GUIDE.md, README.md, docs/* to reflect removal
Patch 2: Clean fstab and Makefile
- Simplify rootfs/etc/fstab (remove diskfs/persistfs entries)
- Update fstab comments to reflect current mount layout
- Clean up Makefile (remove diskfs-related targets)
- Update documentation (BUILD_GUIDE.md, POSIX_ROADMAP.md)
Patch 3: Update fulltest, smoke_test, test_battery, statvfs for tmpfs ENOSYS
- fulltest.c: skip/rename/ftruncate tests now expect ENOSYS on tmpfs
(tmpfs doesn't support these operations)
- statvfs.c: handle tmpfs fstype (report ~64MB blocks, zero free)
- smoke_test.exp: update patterns for tmpfs ENOSYS handling
- test_battery.exp: update patterns for tmpfs ENOSYS handling
- docs/TESTING_PLAN.md, SYSCALL_TEST_COVERAGE.md: update counts
Patch 4: Raw ATA block device test
- Add D7b test in fulltest that reads /dev/hda MBR sector (512 bytes)
- Non-fatal when /dev/hda absent (diskless boot)
- Add test patterns to smoke_test.exp and test_battery.exp
Patch 5: Generic block device layer
- New include/blockdev.h: block_device_t with ops->read/write,
blockdev_register/find/by_id API, inline blockdev_read/write
- New src/kernel/blockdev.c: registry + ATA block device ops adapter
- Refactor fat.c: replace ata_pio_read28/write28 with blockdev_read/write
- Refactor ext2.c: same pattern via g_ext2.bdev
- init.c: call blockdev_register_ata() before mounting disk filesystems
Patch 6: Enforce mount flags (MS_RDONLY, MS_NOEXEC, MS_NODEV, MS_NOSUID)
- Add MS_* constants to fs.h (match userspace sys/mount.h values)
- Add vfs_mount_flags(), vfs_node_mount_flags(), vfs_find_mount_root()
- Add mount_root field to struct file (set on open, used for flag checks)
- syscall_open_impl: reject O_WRONLY/O_RDWR on MS_RDONLY (-EROFS),
reject device open on MS_NODEV (-EACCES)
- syscall_write_impl: reject writes on MS_RDONLY mounts (-EROFS)
- syscall_execve_impl: reject exec on MS_NOEXEC mounts (-EPERM)
- Use MS_REMOUNT constant instead of hardcoded 0x20
Patch 7: Mount refcount and umount busy checks
- Add refcount field to vfs_mount struct
- vfs_umount_nolock rejects umount if refcount > 0 (-EBUSY)
- Add vfs_mount_ref/unref helpers, called on file open/close
- Fix uninitialized mount_root in console file setup (arch_platform.c)
Patch 8: Improve fstab options parsing and /proc/mounts
- init.c fstab parser now parses options field (ro,nosuid,nodev,noexec)
and converts to MS_* mount flags
- vfs_mounts_read uses named MS_* constants instead of hardcoded bits
Tests: smoke 116/116, battery 142/142, host 111/111 — zero regressions