aboutsummaryrefslogtreecommitdiff
path: root/src/flatfile.cpp
AgeCommit message (Collapse)Author
2020-08-25Fix possible data race when committing block filesEvan Klitzke
It was recently pointed out to me that calling fsync() or fdatasync() on a new file is not sufficient to ensure it's persisted to disk, a the existence of the file itself is stored in the directory inode. This means that ensuring that a new file is actually committed also requires an fsync() on the parent directory. This change ensures that we call fsync() on the blocks directory after committing new block files.
2019-02-22Style cleanup.Jim Posen
2019-02-22scripted-diff: Rename CBlockDiskPos to FlatFilePos.Jim Posen
-BEGIN VERIFY SCRIPT- sed -i 's/CDiskBlockPos/FlatFilePos/g' $(git ls-files 'src/*.h' 'src/*.cpp') -END VERIFY SCRIPT-
2019-02-22Move CDiskBlockPos from chain to flatfile.Jim Posen
2019-02-22validation: Refactor file flush logic into FlatFileSeq.Jim Posen
2019-02-22validation: Refactor block file pre-allocation into FlatFileSeq.Jim Posen
2019-02-22validation: Refactor OpenDiskFile into method on FlatFileSeq.Jim Posen
2019-02-22validation: Extract basic block file logic into FlatFileSeq class.Jim Posen