Implementation of Buffer Headers in Linux kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a few queries regarding the buffer headers in
linux.

1. As per my understanding, block number in this
stucture corresponds to the block no of the data on a
logical device rather than on a physical device (hard
disk).

2. Why do we need pointer to a pointer for hash list ?
As per Maurice Bach book on OS, the hash list and free
list both are implemented as a circular, doubly link
list.

In the below, we have used a pointer for free list,
then why pointer to pointer has been used for hash
list.

struct buffer_head {
	/* First cache line: */
	struct buffer_head *b_next;	/* Hash queue list */
	struct buffer_head *b_next_free;/* lru/free list
linkage */
	struct buffer_head *b_prev_free;/* doubly linked list
of buffers */
	struct buffer_head **b_pprev;	/* doubly linked list
of hash-queue */
        // Rest part of sructure has been stripped
off.    
};


Can anyone clarify my these queries.

Thanks & Regard
Dinesh

________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux