Greyhole 0.8 & Samba module
I just built and uploaded version 0.8 of Greyhole on Google Code.
This version doesn’t change much of what is normally visible to the end users (except the regular bug fixes). Instead, 0.8 focused on improving an area of Greyhole that has always been messy: the communication channel between Samba and the Greyhole daemon.
In the past, Greyhole used a log file to log all file operations that happened on Greyhole-enabled Samba shares. At one point, it used its own log file, then switched to using syslog (/var/log/messages usually).
In version 0.8, Greyhole now use spool files to log those operations.
This is similar to how email servers (like sendmail and postfix) work.
Basically, Samba will create small data files in /var/spool/greyhole/, with filenames being timestamps of when the event happened.
When the Greyhole daemon needs something to do, it will look in that directory, and process any files it finds.
All of this serves multiple purposes. One is to simplify Greyhole code.
Parsing a log file wasn’t that pleasant: we had to remember where we stopped parsing the log the last time we looked at it, and we had to handle log rotation to not miss any operations.
All of this is now a thing of the past. We now simply list a directory, and process the files we find there, before deleting them. Quite simple really!
Another goal which we’re aiming for with 0.8 is to have the Samba module that Greyhole use become part of Samba. That would mean that everyone with Samba installed would have at least one of the many blocks required to run Greyhole. That would also mean a lot more visibility for Greyhole than what we have. I’m working with Samba developers to make that a reality, and I expect to get this committed in the Samba mainline repository in the upcoming weeks.