Classroom.
Wrapfs is a full-fledged stackable null-layer (or loopback) filesystem that simply passes all operations and objects (unmodified) between the VFS and the lower filesystem. Wrapfs itself, however, is not easy to write for one main reason; it has to treat the lower filesystem as if it were the VFS, while appearing to the real Linux VFS as a lower-level filesystem. This dual role requires careful handling of locks, reference counts, allocated memory and so on. Luckily, someone already wrote and maintains Wrapfs. Therefore, Wrapfs serves as an excellent template for you to modify and add new functionality. source : http://www.linuxjournal.com/article/6485
Get The Hang
int wrapfs_unlink(struct inode *dir,
struct dentry *dentry)
{
int err = 0;
struct inode *lower_dir;
struct dentry *lower_dentry;
lower_dir = get_lower_inode(dir);
lower_dentry = get_lower_dentry(dentry);
/* pre-call code can go here */
err = lower_dir->i_op->unlink(lower_dir,
lower_dentry);
/* post-call code can go here */
return err;
}
source : http://www.linuxjournal.com/article/6485