Files
eepp/docs
Martín Lucas Golini aeca4cd4ce feat(vfs): keep unresponsive network mounts from blocking the I/O pool + refactor: rename VFS::FileInfo to VFSFileInfo
When its server stops answering, a hard NFS mount (or SMB, SSHFS...) blocks every call on it, and
the blocked thread can't be interrupted. One dead mount used to take over the I/O pool, and
with it every local folder and the eefm UI waiting on them.

LocalIOScheduler (VirtualFileSystem::localIO()):
- Calls on local disks run on the I/O pool. Calls under a network mount run on that mount's own
  lane of two threads. Mounts come from the mount table (/proc/self/mountinfo, getfsstat,
  getvfsstat, UNC and mapped drives on Windows), which never blocks.
- A call that takes longer than Config::networkMountTimeout (15 s by default) fails with
  TimedOut ("server:/export is not responding"), and so does every call queued behind it. Until
  the stuck call returns, further calls on that mount fail at once; when it returns, its result
  is discarded and the mount works again. Timeouts are delivered on their own thread, so they
  never wait for a free pool worker.
- A path through a symbolic link into a mount runs on that mount's lane. While any network
  mount is mounted, the links are read on the I/O pool, stopping where the path enters a mount.
  Renames, opens and watches route the same way. On Windows, links are not followed yet.
- A timed-out read never writes into the caller's buffer afterwards: it reads into its own
  buffer, which is copied only while the caller still waits. A network write works from a copy.
  Closing a directory whose read is stuck doesn't wait; the read closes it when it ends.
- The scheduler holds the pool weakly. Once the pool is released, every call, network ones
  included, fails with Cancelled. Destroying the scheduler, a lane or the watchdog on one of
  their own threads detaches that thread instead of joining it.
- submit(), submitResolved( path, followLast ), submitOnSameRoute() and submitCommitted()
  let applications run their own blocking work on a path with the same protection.

LocalProvider:
- Runs its calls through the scheduler. Listing a local folder never asks a mount's server: a
  network mount inside it is listed as a folder without metadata, and a link into a mount
  without its target's type. A rename across mounts fails with Unsupported, so a move copies
  and removes instead. localpath.hpp is replaced by FileSystem helpers.
- LocalWatchBackend watches directories on network mounts by polling through the VFS
  (PollingWatchBackend), whose calls time out, instead of with efsw.

eefm:
- Header checks when opening files, trash operations and the trash's .trashinfo cleanup run
  through localIO(). Each opened file is routed by its own path.
- A timed-out or lost location shows "(F5 to retry)".

Rename: VFS::FileInfo is now VFSFileInfo, as with VFSTask and VFSError. It no longer clashes
with System::FileInfo, so sources can use `using namespace EE::System;`.

Fix: DataDrop is EE_API. eefm's arkdrop.cpp failed to link DataDrop::find() on MSVC.

Docs: vfs.md documents network mounts and localIO().
Tests: LocalIOScheduler unit tests cover routing, timeouts, fail-fast, links into a mount,
caller memory, teardown from lane threads and a released pool.
2026-10-17 00:37:14 -03:00
..