Giter Club home page Giter Club logo

Comments (4)

tchajed avatar tchajed commented on June 23, 2024

This is within the FSCQ fdatasync specification as described in the OSDI 2018 paper. There are (at least) two trees in the tree sequence: one where the file exists and has length 0, and one where the 4000 bytes have been written. The fdatasync ensures that if the system crashes to the second tree, the data will match buf rather than be zeroes (of course in this situation those are the same since buf is all zeros). However, without an fsync the system simply crashes to the old tree.

This doesn't match one reading of the fdatasync(2) man page in Linux (which says metadata is flushed if "needed in order to allow a subsequent data retrieval to be correctly handled" - you could interpret "correctly handled" as meaning all previously written data to the file should be readable), but that isn't the specification FSCQ formalizes.

from fscq.

meng-xu avatar meng-xu commented on June 23, 2024

Thank you @tchajed for the quick answer. A follow-up question: since killall -9 fscq crashes to the old tree, how to make the system crash to the second tree? Or this is not possible?

from fscq.

tchajed avatar tchajed commented on June 23, 2024

You'll need an fsync call (for example, use fsync instead of fdatasync to both sync the direct writes to that file and flush the log).

from fscq.

tchajed avatar tchajed commented on June 23, 2024

Closing. This isn't a bug in FSCQ, just a difference between our specification and what other filesystems do.

from fscq.

Related Issues (15)

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.