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

Pranith Kumar Karampuri pkarampu at redhat.com
Wed Jun 25 08:19:30 UTC 2014


On 06/25/2014 11:52 AM, Raghavendra Bhat wrote:
> 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.
Thanks, That helps.

Pranith.
>
> Regards,
> Raghavendra Bhat
>
>>
>> Pranith
>> _______________________________________________
>> Gluster-devel mailing list
>> Gluster-devel at gluster.org
>> http://supercolony.gluster.org/mailman/listinfo/gluster-devel
>
> _______________________________________________
> 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