Hello

At zfs-discuss I asked if there is any tool to get a list of  
modified/removed/created files between two snapshots using  
information(shared blocks, etc.) on ZFS filesystem. The answer was no.  
I also asked if I could use incremental ZFS send stream to parse  
information from it, but someone said it is not possible, since there  
are no files, just DMU objects.

So now I try to code this feature by myself. I have read ZFS Source  
Tour and there was mention about ZFS traversal. By looking source  
code, I noticed it is used in ZFS send, so from there I tried to look  
how it works, but I still have many troubles understanding it. So here  
is the question: Do you know any good place to look for information  
about how to use ZFS traversal? Or can you give any basic practices to  
me? I already found out, that after getting some handles to snapshots  
I need to give traversing flags and a callback function, but I have no  
idea how the callback function is then called.

I use ZFS on FreeBSD, and I noticed the code is little bit different  
than the code at ZFS Source Tour, so that makes some problems too.

Also, do you know if this is even possible with ZFS traversal? As I  
mentioned, my main goal is to get list of names (and paths) of all  
modifications, removings and new files between two snapshots (that are  
already created) and it needs to be 100% correct. Also, it needs to be  
done very fast even in case of millions of files and dirs, so I think  
the only way to do this is by using data of block modifications  
straight from ZFS.

Regards
Henrik Heino

Reply via email to