Code Monkey home page Code Monkey logo

Comments (4)

hanwen avatar hanwen commented on June 18, 2024

the kernel issues forgets automatically, but only does so under memory pressure (or situations like deleting a file), so you can't use it to manage constrained resources. There is also no guarantee that all inodes will be forgotten on unmount. So, I'd try to find another way to do what you want

from go-fuse.

andrewchambers avatar andrewchambers commented on June 18, 2024

To elaborate, I have a situation where each inode has some state on a remote server that I want to release when the kernel is done with it. I suppose I can also do this via go finalizers, though that will be even less timely.

from go-fuse.

andrewchambers avatar andrewchambers commented on June 18, 2024

Small note: I did a bit more digging and it seems like the kernel also issues a forget when a dentry is invalidated - which includes after a dentry is checked for basically any operation, so I feel like it can happen frequently.

https://github.com/torvalds/linux/blob/c8a684e2e110376c58f0bfa30fb3855d1e319670/fs/fuse/dir.c#L252

Would you be open to a PR that adds a callback on the node when it is forgotten?

from go-fuse.

andrewchambers avatar andrewchambers commented on June 18, 2024

I think I will try to do what I want with the raw interface instead.

from go-fuse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.