Code Monkey home page Code Monkey logo

Comments (4)

xlucas avatar xlucas commented on May 28, 2024

Hello, and thanks for reporting in.

If you call the rename() syscall in a standard linux-comptabile fs you are most of the time actually creating a new "meta-link" by simply adding a new direntry and removing the old one but the usage on the underlying device doesn't change.

The rename() syscall implementation in svfs is indeed a copy + delete operation, and this is the problem : users may end up with very large and unexpected usage growths. This may not appear as a real issue for hubic users but PCS billing is triggered from container usage (per GB).

I think a good way to get through this would be to add two mount options :

  • file_rename=[true|false]
  • dir_rename=[true|false]

Both disabled by default and we would let an advised user decide if he allows these operations to take place or not.

from svfs.

bchaintreuil avatar bchaintreuil commented on May 28, 2024

@xlucas So if I have understand, it's actually implemented for renaming file/folder, it's possible to implement this for moving ?

from svfs.

xlucas avatar xlucas commented on May 28, 2024

No. When you run mv source destination you actually use the rename() syscall and this is not implemented in svfs if the source is a directory.

As detailed in my previous answer, we could, maybe, implement this and bring new options, however there's a caveat on usage growth.

Another issue is that while this operation only consist of updating filesystem metadata in common linux filesystems, this is a plain copy + delete operation for object stores like Swift because there's no such thing as a move operation. In other words, implementation would require moving all objects within the source directory as well, recursively calling rename() while the client may not expect this to happen.

from svfs.

bchaintreuil avatar bchaintreuil commented on May 28, 2024

I think I've understand, and what you propose give us the choice to enable or not a such functionality, so it's maybe the best thing

Thanks for your answer :) !

from svfs.

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.