Subject: Re: [PATCH 4/4] guix: Avoid ‘fdatasync’ call for caches and regular files.

From: Ludovic Courtès <[email-masked]>
Date: Thu, 10 Apr 2025 13:08:02 +0200

Christopher Baines <[email-masked]> skribis:

>> @@ -344,7 +344,8 @@ (define (cache-authenticated-commit key commit-id)
>>            (chmod port #o600)
>>            (display ";; List of previously-authenticated commits.\n\n"
>>                     port)
>> -          (pretty-print lst port))))))
>> +          (pretty-print lst port)))
>> +      #:sync? #f)))
>
> This introduces (or maybe increases) the risk that this file will be
> empty, does this happen often enough to justify the change?

My thinking is that it’s just a cache, so it shouldn’t need special
treatment as if it were a precious file (which is what the ‘fdatasync’
call was initially added for); it’s OK if we lose this file.

But it’s rarely modified so from that perspective keeping the
‘fdatasync’ call cannot hurt.

Ludo’.