- The writer's periodic fsync now holds a separate io_mtx_, taken also
(before mtx_) by the main-thread paths that close journal fds, instead
of mtx_. Every keystroke takes mtx_ to enqueue its record, so a slow
fsync (writeback pressure, NFS) froze typing.
- A journal's base identity (stat + content CRC) is computed before
taking mtx_ and applied under it; the CRC is skipped above 64 MiB
(size and mtime still identify the file). It re-read the whole file
under the lock on every open and save.
- A buffer that was never journaled (a virtual buffer saved under a
real name) is attached by NotifyFilenameChanged.
- ThreadSanitizer: open_ctx (writer thread) no longer writes ctx.path,
and locked_out is recorded by the caller under mtx_; both raced with
main-thread reads.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015rcVQiiWyTzoNrsvLSaAfB