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(&bp->b_hash_list);<br><br>if the count drops down to 0 for the buffer...<br><br>if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) {<br>
if (bp->b_relse) { ----->set only in case of error??<br> atomic_inc(&bp->b_hold);<br> spin_unlock(&hash->bh_lock);<br> (*(bp->b_relse)) (bp);<br>
} else if (bp->b_flags & XBF_FS_MANAGED) { ----> mostly unset......<br> spin_unlock(&hash->bh_lock);<br> } else {<br> ASSERT(!(bp->b_flags & (XBF_DELWRI|_XBF_DELWRI_Q)));<br>
<b>list_del_init(&bp->b_hash_list);</b><br> spin_unlock(&hash->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>