i do a blockchain reindex, and i got issue:
strace say, blocks files are reopened for fdatasync:
… log coming later
The only fdatasync call is in FileCommit, here is the callstack:
(gdb) bt
[#0](/bitcoin-bitcoin/0/) FileCommit (file=0x7fff9f283a10) at util.cpp:686
[#1](/bitcoin-bitcoin/1/) 0x000000000056129f in FlushBlockFile (fFinalize=<optimized out>) at validation.cpp:1543
[#2](/bitcoin-bitcoin/2/) 0x00000000005748bf in FindBlockPos (state=..., pos=..., nAddSize=49046, nHeight=nHeight@entry=131237, nTime=1308224251, fKnown=<optimized out>) at validation.cpp:2745
[#3](/bitcoin-bitcoin/3/) 0x0000000000575427 in AcceptBlock (pblock=..., state=..., chainparams=..., ppindex=ppindex@entry=0x0, fRequested=fRequested@entry=true, dbp=dbp@entry=0x7fffa6ffcdd0, fNewBlock=fNewBlock@entry=0x0) at validation.cpp:3215
[#4](/bitcoin-bitcoin/4/) 0x0000000000584c26 in LoadExternalBlockFile (chainparams=..., fileIn=fileIn@entry=0x7fff9c000b20, dbp=dbp@entry=0x7fffa6ffcdd0) at validation.cpp:4101
....
i dont know why sould FlushBlockFile called in FindBlockPos, if blocks is readonly.