<p><b>@pmatilai</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/rpm-software-management/rpm/pull/187#discussion_r109606804">lib/fsm.c</a>:</p>
<pre style='color:#555'>> @@ -231,6 +232,9 @@ static int expandRegular(rpmfi fi, const char *dest, rpmpsm psm, int nodigest, i
 exit:
     if (wfd) {
        int myerrno = errno;
+        if (rpmExpandNumeric("%{force_fsync_on_close}")) {
</pre>
<p>You don't really want to invoke the macro parser once per every single file within a transaction, more like once per transaction. But passing transaction config down to this level gets cumbersome, so for this I'd suggest using a static variable which is initialized once (grep for "oneshot" in build/ directory for an example)</p>
<p>The macro name should start with an underscore, as it's really rpm internal thing.</p>
<p>Also I wonder if we'd better name this macro for what it tries to achieve rather than the implementation detail of how exactly it does it - think of something along the lines of spreading or leveling the IO load, but as a native speaker you'll probably find some more fitting term for it. That'd leave the implementation open in case you come up with something even more effective. And who knows, somebody else in some datacenter might be interested too, but they'll never find an option called "fsync on close" :)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/rpm-software-management/rpm/pull/187#pullrequestreview-30718097">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ANb80_4IK6QJUS-K6jXBmOIc9Df9i6Vhks5rsgM7gaJpZM4MyLOi">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ANb80_eHoQ06H4JvGrx3Fg8W85R1j033ks5rsgM7gaJpZM4MyLOi.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/rpm-software-management/rpm/pull/187#pullrequestreview-30718097"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/rpm-software-management/rpm","title":"rpm-software-management/rpm","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/rpm-software-management/rpm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@pmatilai commented on #187"}],"action":{"name":"View Pull Request","url":"https://github.com/rpm-software-management/rpm/pull/187#pullrequestreview-30718097"}}}</script>