Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

rclone rc vfs/forget doesn't invalidate the kernel cache, causing truncated reads #9617

Copy link
Copy link

Description

@thomasjm
Issue body actions

Before you start

  • I have searched the forum and the existing issues for this problem.
  • I have tested with the latest beta or stable release and can still reproduce the problem.
  • This is a reproducible bug, not a usage question (questions belong on the forum).

Associated forum post URL

No response

What is the problem you are having with rclone?

rclone rc vfs/forget is meant to make an rclone mount pick up a file that changed on the remote,
but it only refreshes rclone's own cache — not the kernel's. So a read can come back truncated to the
file's old size for up to --attr-timeout.

How to reproduce

  1. rclone mount a remote with --attr-timeout 60s.
  2. Read a file through the mount — the kernel caches its size for 60s.
  3. Change that file on the remote so it grows (another client, or a WebDAV backend whose store is edited).
  4. Call rclone rc vfs/forget file=....
  5. Read the file again any time in the next 60s: it's truncated to the old
    size
    . vfs/forget made no difference; only the timeout expiring eventually
    heals it. This is because the kernel answers getattr from its own cache.

Repro script: https://gist.github.com/thomasjm/a76fabd691911437874e155d12bd1cdd

rclone version

rclone v1.75.0-DEV

  • os/version: nixos 25.11 (64 bit)
  • os/kernel: 6.12.76 (x86_64)
  • os/type: linux
  • os/arch: amd64
  • go/version: go1.25.7
  • go/linking: dynamic
  • go/tags: none

Operating system

Linux

Which cloud storage system are you using?

Local WebDAV serve

Output of rclone config redacted

N/A

The command you were trying to run

N/A

A log from the command with the -vv flag

N/A

Anything else?

I have a proposed fix here, which I'd be happy to open as a PR:

https://github.com/thomasjm/rclone/tree/vfs-forget-invalidate-kernel-cache

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.