yeah, a filename->hash index would be a good start... and it probably can be merely 8 bytes of the hash prefix without much chance of collision, 16 pretty much certain to have no problem