<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - FcCacheOffsetsValid() couldn't detect broken cache file"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103237#c10">Comment # 10</a>
on <a class="bz_bug_link
bz_status_ASSIGNED "
title="ASSIGNED - FcCacheOffsetsValid() couldn't detect broken cache file"
href="https://bugs.freedesktop.org/show_bug.cgi?id=103237">bug 103237</a>
from <span class="vcard"><a class="email" href="mailto:youngb.shin@samsung.com" title="Youngbok Shin <youngb.shin@samsung.com>"> <span class="fn">Youngbok Shin</span></a>
</span></b>
<pre><span class="quote">> Hmm, does it guarantee the file size?</span >
Do you mean fsync() guarantees synchronization without considering its file
size?
Then, as I know, yes. It writes a whole buffer to the file descriptor at once.
I'll be bad for performance.
I think even if we can see non-zero values at head of invalid cache file, we
still need to consider the file corruption by power outage. If a file system
couldn't create a whole file or write anything on a file by power outage, we
wouldn't call it "corruption".
Here is a Q&A about these scenarios.
<a href="https://serverfault.com/questions/403891/journaled-filesystems-and-power-failure">https://serverfault.com/questions/403891/journaled-filesystems-and-power-failure</a>
If we can't allow bad performance by calling fsync() for writing the big cache
files (to prevent very very rare file corruption issues), I think we need to
add more validation code. Just like your temporary patch for the issue.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>