It’s really possible – but maybe one should wait for Samba 3.0?
The „examples“ directory in the Samba sources contains a „VFS“ directory. Have a look at that README file – they’ve got a ready-made audit module, logging all Samba accesses using syslog…
And here someone built a Virtual File System based on MySQL tables: DatabaseFS!