Duy Nguyen [off-list ref] writes:
On the subject of truncation, there is something else I should note.
The field sd_size in struct stat_data is 32 bits, so large files will
overflow it too, regardless of platforms. I did not do anything
because I checked and double checked and was pretty sure we did not
use it for anything meaningful (as a file size). To us, it's just
another random number, like st_ino, that we check to detect if a file
has changed.
Yes, the comparison to flip DATA_CHANGED bit near the end of
match_stat_data() has a cast for that exact reason. It might
deserve a comment there.