Is there any filesystem that keeps an hash tree of file contents and directories? (sorry for beeing somewhat offtopic)

I don’t really understand the inner working of syncthing but I’m waiting more than half an hour until scanning is done so I guess it is doing some kind of hashing right?
I don’t thing just checking timestamps would take this long.
Is this correct?
So, I got curious if there was any file system that would keep some king of hash tree of file contents and directories (something like git) that would permit fast diffing.

I did some googling but I couldn’t find anything.

Is there such a system? And if not could someone explain why? It’s would really speed up syncing


ZFS does that. You can take two snapshots of a filesystem and get an instant diff between the two, for example.

Thanks. I’ll check it out. Could syncthing be able to speed up scanning if using ZFS?

Btrfs does that too, but hash trees or whatever implementation is, is not part of the standard filesystem interface for posix hence has no meaning to us.

Yeah, it has no effect on Syncthing operation. Even if we could access the hashes, which we can’t, they are not calculated in the same way as we do so they are not useful to us.

Initial scan (new folder), or subsequent scan / scan on startup? The first one does hashing, the second only if mtime or size changes.

No, no, just startup scan. Not that bad :wink: Thanks for the insights