Feature/sotrage system overhaul #73

Open
Aaron wants to merge 21 commits from feature/sotrage-system-overhaul into develop
pull from: feature/sotrage-system-overhaul
Member
No description provided.
Aaron added 16 commits 2026-10-31 20:47:12 +00:00
- Add TStorageLifecycleWatch with watch_lifecycle/unwatch_lifecycle API (up to 32 watchers)
- Add notify_lifecycle to broadcast mount/unmount/format events to registered callbacks
- Replace raw puint32 config in format_volume with typed PFSFormatParams
- Add volume_is_busy, volume_is_formatting, volume_set_mounted helpers
- Add lifecycleFlags field to TStorage_Volume for tracking busy/formatting state
- Expand app.diskutil with improved commands and volume state reporting
- Minor improvements to core.util, arch.x86.util, proc.mgr, VFS, and flatfs
- Remove obsolete driver.storage.fs.fat32.old.pas
- Remove FAT_WRITE_PREALLOC_BYTES (redundant at typical cluster sizes)
- Simplify fatPreallocClusterCount to always return MAX_CLUSTERS
- FAT32CloseFile: truncate pre-allocated tail clusters back to ByteSize
  on close, freeing FAT chain entries beyond the file's real size
- Add TFATWriteRef + WriteRefs[32] in TFATVolumeCtx and Registered flag
  on TFATOpenFile to track concurrent write handles per dir entry
- fatRegisterWriteHandle / fatUnregisterWriteHandle: CLI-guarded slot scan
  keyed by (DirLoc.SectorLBA, DirLoc.EntryIdx)
- Register on first FAT chain extension in FAT32EnsureCapacityForWrite
- Truncation in FAT32CloseFile skipped unless this is the last writer
  (prevents RunMap corruption in concurrent-open scenarios)
- Add forward decl for fatFreeClusterChain to fix ordering issue
- app.iotest: update default path to /disk/vol2/IOTEST.BIN
fat
continuous-integration/drone/push Build is passing
7e99bc2db1
Register ext2 at boot, integrate mode-aware VFS opens and volume cleanup, and queue asynchronous transfers through a persistent worker.

Validation: Pascal compiler check and git diff --check passed. Full build blocked by Docker engine HTTP 500; runtime and Linux interoperability remain unverified.
Aaron added 1 commit 2026-10-31 20:50:35 +00:00
Aaron added 2 commits 2026-11-01 20:22:49 +00:00
Aaron requested review from t3hn3rd 2026-11-06 21:06:53 +00:00
Aaron added this to the 2.0.0 milestone 2026-11-06 21:06:59 +00:00
Aaron added the Refactor
Component
Core
labels 2026-11-06 21:12:45 +00:00
Aaron added 2 commits 2026-11-07 10:19:13 +00:00
fix file header
continuous-integration/drone Build is failing
e8e4061564
@@ -791,2 +821,4 @@
DevID := PDeviceIdentifier(kalloc(sizeof(TDeviceIdentifier)));
if DevID = nil then begin
kfree(void(cfgBuf)); kfree(void(dev)); pop_trace; exit;
Author
Member

why one line...

why one line...
admin left a comment
Owner

Please see the requested changes. Otherwise looking good.

Please see the requested changes. Otherwise looking good.
@@ -45,0 +50,4 @@
MEMCPY_X86_SMALL_COPY_THRESHOLD = 16;
{$endif}
procedure scalar_memcpy(source : uint32; dest : uint32; size : uint32);
Owner

I believe a scalar memcpy already exists elsewhere? Worth verifying this & using that if it does.

I believe a scalar memcpy already exists elsewhere? Worth verifying this & using that if it does.
@@ -145,6 +152,8 @@ implementation
uses
driver.storage.fs.mgr,
driver.storage.fs.fat32,
Owner

Why does the VFS need to know about specific FS drivers? In my mind there's no good reason for this. This breaks modularity.

Why does the VFS need to know about specific FS drivers? In my mind there's no good reason for this. This breaks modularity.
@@ -154,15 +174,45 @@ begin
{ Resources }
ctx^.Resources := void(DL_New(SizeOf(TResourceBinding)));
if ctx^.Resources = nil then begin
Owner

This should probably be genericised into an Assert or similar. Lots of duplicate code for exception checking.

This should probably be genericised into an Assert or similar. Lots of duplicate code for exception checking.
@@ -20,3 +20,3 @@
{ Base quantum multiplier: quantum = Priority * BASE_QUANTUM ticks }
BASE_QUANTUM = 5;
BASE_QUANTUM = 1;
Owner

BASE_QUANTUM should no deviate from from 5, unless there's a very good reason.

BASE_QUANTUM should no deviate from from 5, unless there's a very good reason.
Aaron was assigned by admin 2026-11-07 22:23:17 +00:00
Some checks are pending
continuous-integration/drone Build is failing
continuous-integration/drone/pr
Required
continuous-integration/drone/push
Required
This pull request has changes conflicting with the target branch.
  • .gitignore
  • src/boot/boot.mgr.pas
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feature/sotrage-system-overhaul:feature/sotrage-system-overhaul
git checkout feature/sotrage-system-overhaul
Sign in to join this conversation.