Matthew Dillon <[EMAIL PROTECTED]> wrote: > > :Hi, > : > :finally I implemented a method to get a hammer tid from > :around a given time. > : > :This patchlet adds timestamps to the output of hammer mirror-dump: > :http://leaf.dragonflybsd.org/~hofmann/mirror-dump.patch > :And this bash script makes use of it to find a tid from around a given > :time stamp: > :http://leaf.dragonflybsd.org/~hofmann/findtid.sh > : > :You can call it like this: > : > :findtid.sh <filesystem> <secs since epoch> > : > :Here is an example: > :... > :Cheers, > :Johannes > : > :PS: Please correct me if I'm missing something! > > Hey, pretty good! I was a bit surprised someone did it in a > shell script, and I think it might eat a lot of memory, but > it is a good demonstration. Thanks for writing it!
Note that this doesn't quite implement what you suggested in http://leaf.dragonflybsd.org/mailarchive/kernel/2008-09/msg00039.html as this can take a lot of time. It rather does a binary search. Memory consumption should be no issue. If you think the method is ok, I could make a patch for hammer(8) that does the same thing in C. Cheers, Johannes