Skip to content

Instantly share code, notes, and snippets.

@rsp
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rsp/e934210c838770f3d051 to your computer and use it in GitHub Desktop.
Save rsp/e934210c838770f3d051 to your computer and use it in GitHub Desktop.
SHA filesystem idea

I want a filesystem that doesn't use c/m/atime. It would use SHA-1 (or other) hash to identify data.

Possible ways to do it:

  • hash the entire file (probably not practical unless it could use partial/incremental computations)
  • hash every block and then hash the list of hashes
  • ...

Programs like Make instead of relying on the mtime would have to keep track of which hashes the sources had for any given target and if the hashes on disk are different then rebuild but at that point no hashes would need to be computed because they would be stored in the file system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment