inline...<br><br><div class="gmail_quote">On Fri, Aug 14, 2009 at 1:57 PM, Russell Cattelan <span dir="ltr">&lt;<a href="mailto:cattelan@thebarn.com">cattelan@thebarn.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA1<br>
<div class="im"><br>
kanishk rastogi wrote:<br>
&gt; hi all, I was trying to understand the xfs_buf_t management in XFS.<br>
&gt;  I was looking at the xfs_bufhash_t which is used to keep the info<br>
&gt; of buffers which have ongoing transactions. I wanted to know if it<br>
&gt; uses it for caching these pages.<br>
&gt;<br>
&gt; As far as i can see in xfs_buf_relse  calls ::<br>
&gt;<br>
&gt; list_del_init(&amp;bp-&gt;b_hash_list);<br>
&gt;<br>
&gt; if the count drops down to 0 for the buffer...<br>
&gt;<br>
&gt; if (atomic_dec_and_lock(&amp;bp-&gt;b_hold, &amp;hash-&gt;bh_lock)) { if<br>
&gt; (bp-&gt;b_relse) { -----&gt;set only in case of error??<br>
&gt; atomic_inc(&amp;bp-&gt;b_hold); spin_unlock(&amp;hash-&gt;bh_lock);<br>
&gt; (*(bp-&gt;b_relse)) (bp); } else if (bp-&gt;b_flags &amp; XBF_FS_MANAGED) {<br>
</div>&gt; ----&gt; mostly unset......\<br>
Indeed. that flag is used on exactly one buffer, the superblock.ode of the<br>
Basically the superblock is pinned in memory and only flushed by the<br>
filesystem.<br>
<div class="im">&gt; spin_unlock(&amp;hash-&gt;bh_lock); } else { ASSERT(!(bp-&gt;b_flags &amp;<br>
&gt; (XBF_DELWRI|_XBF_DELWRI_Q))); *list_del_init(&amp;bp-&gt;b_hash_list);*<br>
&gt; spin_unlock(&amp;hash-&gt;bh_lock); xfs_buf_free(bp); } }</div></blockquote><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
&gt;<br>
&gt; ---------------<br>
&gt;<br>
&gt; CMIIW: So it doesnt keeps buffers if they are not in use....  ??<br>
</div>buffers are released back to the buf_t  zone when they are done.<br>
<br>
zone allocation / free is very fast so managing lists of &quot;free&quot;<br>
buffers doesn&#39;t make a lot of sense.<br>
<div class="im"></div></blockquote><div><br>sorry my fault i was asking about the pages these buffers point to? .... <br>I see them being pickd from the device inode of the monted device...<br><br>thankx<br>kanishk <br></div>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
&gt;<br>
&gt; I dont think that should be the case...<br>
&gt;<br>
&gt; -- regards kanishk<br>
&gt;<br>
</div>&gt; ----------------------------------------------------------------------<br>
&gt;<br>
&gt;<br>
&gt; _______________________________________________ xfs mailing list<br>
&gt; <a href="mailto:xfs@oss.sgi.com">xfs@oss.sgi.com</a> <a href="http://oss.sgi.com/mailman/listinfo/xfs" target="_blank">http://oss.sgi.com/mailman/listinfo/xfs</a><br>
<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.7 (Darwin)<br>
Comment: Using GnuPG with Mozilla - <a href="http://enigmail.mozdev.org" target="_blank">http://enigmail.mozdev.org</a><br>
<br>
iD8DBQFKhaWBNRmM+OaGhBgRAtqgAJ9CZfj0QXz8Yy7P4jYemgEPsvR9pQCfcSWM<br>
a9OI8A4ckMdOuiXQ60o4PLE=<br>
=OJAD<br>
-----END PGP SIGNATURE-----<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>regards<br>kanishk<br>