Coder Social home page Coder Social logo

EIO when entry changes file type about cvmfs HOT 11 CLOSED

cvmfs avatar cvmfs commented on June 24, 2024
EIO when entry changes file type

from cvmfs.

Comments (11)

jblomer avatar jblomer commented on June 24, 2024

Many thanks for the report and the detailed analysis!

That's an interesting problem. In any case, it seems cvmfs needs to remember the type of the active inodes. That should be relatively easy to do. The question is what to do with this information when a type conflict arises. What we cannot do is invalidating the inode within a fuse callback because that can lead to a deadlock. So most likely, in such a case we'd need to issue a new inode for the entry. The tricky bit is how this will be handled in the cvmfs inode tables. Because at this point, we'd have two inodes for the same path, which is currently not foreseen.

Let me think a little about it.

from cvmfs.

jblomer avatar jblomer commented on June 24, 2024

Just for information, the corresponding JIRA ticket

from cvmfs.

mharvey-jt avatar mharvey-jt commented on June 24, 2024

Our mitigation for this is to set the kernel cache timeout for off-cvmfs symlinks to zero.
#2950

from cvmfs.

jblomer avatar jblomer commented on June 24, 2024

This issue is linked to the problem described in CVM-2001. In both cases, it seems we need to break the current relationship between a path and exactly one live inode. Here's a sketch on how this may work

  1. In the LOOKUP callback, there are two conditions where instead of the live inode we place the unique inode from the file catalogs in the inode tracker: when the file type changed and when we have an open file of that inode with a different content than its current version
  2. We can use the most significant bits in the inode tracker to store the file type
  3. The FORGET call need to take careful about the removal of path --> inode entries now that multiple inodes may point to the same path
  4. For open, old inodes, we still need to be able to handle GETATTR queries, so we need to store the struct stat information of open files
  5. When the file type changes, we may need to trigger an inode invalidatation (as usual, in a different thread) on the old one

This change requires a hard look an all the possible corner cases.

from cvmfs.

jblomer avatar jblomer commented on June 24, 2024

Much simpler, turns out to be essentially a one-liner (modulo class rename and integration test): We need to track positive name lookups in the dentry tracker, which has been renamed because it is now not only tracking negative lookups anymore. Tracking the positive name lookups results in eviction of the corresponding kernel-cached dentries during catalog reload.

So this issue is quite different from CVM-2001. I'll create a separate PR addressing CVM-2001.

from cvmfs.

jblomer avatar jblomer commented on June 24, 2024

Much simpler, turns out to be essentially a one-liner (modulo class rename and integration test): We need to track positive name lookups in the dentry tracker, which has been renamed because it is now not only tracking negative lookups anymore. Tracking the positive name lookups results in eviction of the corresponding kernel-cached dentries during catalog reload.

Hm, it seems that this is too strong a measure. Test case 076 fails and there may be more problems because with this approach entries appear to be deleted after a catalog reload. So for the moment, we are only at a point where we detect changed file system types. More effort is needed on this issue.

from cvmfs.

jblomer avatar jblomer commented on June 24, 2024

Related discussion found by @HereThereBeDragons

from cvmfs.

jblomer avatar jblomer commented on June 24, 2024

For the record, CVM-2001 got fixed with #3043

from cvmfs.

jblomer avatar jblomer commented on June 24, 2024

This should be fixed as a side effect of #2949, specifically of the new fuse_expire_entry

from cvmfs.

jblomer avatar jblomer commented on June 24, 2024

We should adjust integration test 698 on platforms supporting fuse_expire_entry.

from cvmfs.

HereThereBeDragons avatar HereThereBeDragons commented on June 24, 2024

Yes PR #2949 should fix this issue.

Made a new issue #3172 for the integration test

from cvmfs.

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.