Comments (4)
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.
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.
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.
Closing. This isn't a bug in FSCQ, just a difference between our specification and what other filesystems do.
from fscq.
Related Issues (15)
- Multiuser/permissions support HOT 1
- sync() fails to persist a new directory entry HOT 2
- Potential crash consistency bug - fsync fails to persist directory entry HOT 9
- Potential logic bug: renaming an emptied directory fails HOT 4
- ftruncate to grow a file does not allocate blocks HOT 1
- Advice on refreshing the ocaml extraction target? HOT 4
- truncate extension sometimes extends with file names instead of zeros HOT 4
- Removing a non-empty directory results in EIO HOT 3
- Subdirectories do not increment parent directory's link count
- chmod has no effect and does not return an error HOT 2
- Renaming a directory to a non-empty directory results in EIO HOT 1
- Symlink support
- Hard link support HOT 1
- Time support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fscq.