Git Product home page Git Product logo

Comments (1)

gboudreau avatar gboudreau commented on July 18, 2024

Greyhole works on each file operation (executed on Samba) in sequence, using a queue system (operations get queued in /var/spool/greyhole first, then are moved into the tasks table in MySQL). So if you create fileA, then fileB, then rename fileA to fileB, it will work through those operations in the same order. It will never work on multiple file operations in parallel, because the order is very important.
fsck is different because it doesn't know about operations, it only knows about which files exist now. So if it finds a file that isn't where it should be, it will handle it as best as possible.

For fsck runs, the order in which folders & files are checked is undefined. I think it uses PHP's glob() function to walk through folders & files, which I think returns results sorted alphabetically.

For file copies specifically, there is a config named parallel_copying, which is true by default, which will use some cat | tee sorcery to create multiple files in parallel. This is used for normal processing by the daemon, and during fsck (as needed).
You can see parallel copying being used in the logs, which will appear as INFO write: Copying X.XXX KB file to: /mnt/hdd5/gh/ShareName/Folder/SomeFile, /mnt/hdd3/gh/ShareName/Folder/SomeFile, which lists all file copies being created simultaneously. (Of note: parallel copying logs the temporary filenames used to transfer; once the transfer completes, it will rename those temporary files using the real filename.)

from greyhole.

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.