Hacker News new | ask | show | jobs
by sagarm 77 days ago
That hash would be expensive to maintain, and the end result would still be racy since the file could be modified after the hash was read .
1 comments

In the current POSIX paradigm yes, it would be expensive. But if the hash was defined as the hash of fixed blocks, it wouldn't be expensive. The raciness depends, a lot, on the semantics we would define. (In the context of a build system, it's no different than that the file could get a new mtime after we read the mtime.)