Skip to content

Fall back to inotify when fanotify rejects mounts with EXDEV - #65325

Merged
Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:fanotify-exdev
Nov 6, 2026
Merged

Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:fanotify-exdev

Conversation

@jakebailey

Copy link
Copy Markdown
Member

Fixes #65290

Fanotify FID groups can reject watches spanning incompatible mounts with
EXDEV, including virtiofs mounts. Treating this as fatal prevents watch
mode from receiving any file changes despite inotify being usable.

Fixes 65290.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the change enabling inotify fallback when fanotify returns EXDEV.

No open issues 🎉

What changed in this PR

Addresses #65290 by allowing Linux file watching to fall back to inotify when fanotify rejects a mount with EXDEV, rather than leaving watch mode unable to detect changes.

Changes:

  • Classifies EXDEV as an unsupported-filesystem error.
  • Expands tests to cover raw and wrapped errors, checking both fallback classification and preservation of the original error.
File Description
tsc/​internal/​fswatch/​fanotify_linux.go Tags EXDEV with ErrFilesystemUnsupported to enable fallback.
tsc/​internal/​fswatch/​fanotify_linux_test.go Adds EXDEV coverage and tests raw and wrapped error inputs.

Review effort: Balanced

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Nov 6, 2026
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Nov 6, 2026
Merged via the queue into microsoft:main with commit f797316 Nov 6, 2026
34 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the fanotify-exdev branch November 6, 2026 22:57
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Nov 6, 2026
@jakebailey

Copy link
Copy Markdown
Member Author

TypeScript Bot (@typescript-bot) cherry-pick this to release-7.0

@typescript-automation

typescript-automation Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
cherry-pick this to release-7.0 ✅ Started ✅ Results

@typescript-automation

Copy link
Copy Markdown
Contributor

Hey, Jake Bailey (@jakebailey)! I've created #65369 for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

tsc --watch in virtual machine fails with fanotify_mark on '...' failed: invalid cross-device link trying to watch parent directories

3 participants