stackable filesystems . Wrapfs filesystem .


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 :

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,
  /* post-call code can go here */
  return err;

source :

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s