[Gluster-devel] regarding inode-unref on root inode

Raghavendra Bhat rabhat at redhat.com
Wed Jun 25 06:22:22 UTC 2014


On Tuesday 24 June 2014 08:17 PM, Pranith Kumar Karampuri wrote:
> Does anyone know why inode_unref is no-op for root inode?
>
> I see the following code in inode.c
>
>  static inode_t *
>  __inode_unref (inode_t *inode)
>  {
>          if (!inode)
>                  return NULL;
>
>          if (__is_root_gfid(inode->gfid))
>                  return inode;
>  ...
> }

I think its done with the intention that, root inode should *never* ever 
get removed from the active inodes list. (not even accidentally). So 
unref on root-inode is a no-op. Dont know whether there are any other 
reasons.

Regards,
Raghavendra Bhat

>
> Pranith
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> http://supercolony.gluster.org/mailman/listinfo/gluster-devel



More information about the Gluster-devel mailing list