hi all,<br>I was trying to understand the xfs_buf_t management in XFS.<br>I was looking at the xfs_bufhash_t which is used to keep the info of buffers which have ongoing transactions.<br>I wanted to know if it uses it for caching these pages.<br>
<br>As far as i can see in xfs_buf_relse  calls ::<br><br clear="all">list_del_init(&amp;bp-&gt;b_hash_list);<br><br>if the count drops down to 0 for the buffer...<br><br>if (atomic_dec_and_lock(&amp;bp-&gt;b_hold, &amp;hash-&gt;bh_lock)) {<br>
                if (bp-&gt;b_relse) { -----&gt;set only in case of error??<br>                        atomic_inc(&amp;bp-&gt;b_hold);<br>                        spin_unlock(&amp;hash-&gt;bh_lock);<br>                        (*(bp-&gt;b_relse)) (bp);<br>
                } else if (bp-&gt;b_flags &amp; XBF_FS_MANAGED) { ----&gt; mostly unset......<br>                        spin_unlock(&amp;hash-&gt;bh_lock);<br>                } else {<br>                        ASSERT(!(bp-&gt;b_flags &amp; (XBF_DELWRI|_XBF_DELWRI_Q)));<br>
                        <b>list_del_init(&amp;bp-&gt;b_hash_list);</b><br>                        spin_unlock(&amp;hash-&gt;bh_lock);<br>                        xfs_buf_free(bp);<br>                }<br>        }<br><br>---------------<br>
<br>CMIIW:<br>So it doesnt keeps buffers if they are not in use....  ??<br><br>I dont think that should be the case... <br><br>-- <br>regards<br>kanishk<br>