Thread (1 message) 1 message, 1 author, 2011-06-30
  • (off-list ancestor, not in this archive)
  • hlist_add_head · piyush moghe <hidden> · 2011-06-30

hlist_add_head

From: piyush moghe <hidden>
Date: 2011-06-30 09:18:01

On Thu, Jun 30, 2011 at 2:47 PM, piyush moghe [off-list ref] 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 [off-list ref] wrote:
quoted
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 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help