hlist_add_head

piyush moghe pmkernel at gmail.com
Thu Jun 30 05:18:01 EDT 2011


On Thu, Jun 30, 2011 at 2:47 PM, piyush moghe <pmkernel at gmail.com> wrote:

> AFAIK hlist_add_head is a function to add a node at first position in
> collision chain at particular head ( hash bucket )
>
> For ex. whenever a new inode is allocated the hash value of that inode is
> calculated which acts as an index in inode_hashtable
> which subsequently provides and hash bucket ( head ) for that inode. Now
> this inode attached at the first position in collision chain for the
> calculated hash bucket pushing the current first inode to second position.
>
> For further clarification have a look at inode_add_to_lists() and
> __inode_add_to_lists() functions.
>
> Regards,
> Piyush
>
>
> On Tue, Jun 28, 2011 at 8:05 PM, luca ellero <lroluk at gmail.com> wrote:
>
>> Hi everybody,
>> can someone please explain what is the role of hlist_add_head (used in
>> in hash lists). Or maybe provide some links with good examples of its
>> use. I had a look at fs/dcache.c but frankly I can't understand it very
>> well.
>> Thanks in advance
>> Luca
>>
>> _______________________________________________
>> Kernelnewbies mailing list
>> Kernelnewbies at kernelnewbies.org
>> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110630/14a130f7/attachment.html 


More information about the Kernelnewbies mailing list