mountInotify: relay file deletions from the host · Issue #5530 · lima-vm/lima · GitHub
Skip to content

mountInotify: relay file deletions from the host #5530

Open

Description

@sylvinus

Description

With mountInotify: true, the guest gets events when files are created or modified on the host, but not when they are removed (this is listed in the mount docs as a known limitation). Tools watching the tree in the guest (dev servers, test watchers, git status caches) keep seeing deleted files.

So I have a proposal that integrates with #5529 for reverse-sshfs mounts with the builtin SFTP driver: when the host agent sees a deletion, it tells the guest agent to remove the path in the guest, which emits IN_DELETE there. Before that, it asks the SFTP server to treat the next removal of that path as a no-op, so a file created again on the host in the meantime is not deleted.

Other mount types (virtiofs, 9p) are unchanged: nothing is relayed, since the guest's removal would reach the host.

I have a working implementation and will open PRs.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions