inline...<br><br><div class="gmail_quote">On Fri, Aug 14, 2009 at 1:57 PM, Russell Cattelan <span dir="ltr"><<a href="mailto:cattelan@thebarn.com">cattelan@thebarn.com</a>></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>
> hi all, 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<br>
> of buffers which have ongoing transactions. I wanted to know if it<br>
> uses it for caching these pages.<br>
><br>
> As far as i can see in xfs_buf_relse calls ::<br>
><br>
> 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)) { if<br>
> (bp->b_relse) { ----->set only in case of error??<br>
> atomic_inc(&bp->b_hold); spin_unlock(&hash->bh_lock);<br>
> (*(bp->b_relse)) (bp); } else if (bp->b_flags & XBF_FS_MANAGED) {<br>
</div>> ----> 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">> spin_unlock(&hash->bh_lock); } else { ASSERT(!(bp->b_flags &<br>
> (XBF_DELWRI|_XBF_DELWRI_Q))); *list_del_init(&bp->b_hash_list);*<br>
> spin_unlock(&hash->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>
><br>
> ---------------<br>
><br>
> 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 "free"<br>
buffers doesn'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>
><br>
> I dont think that should be the case...<br>
><br>
> -- regards kanishk<br>
><br>
</div>> ----------------------------------------------------------------------<br>
><br>
><br>
> _______________________________________________ xfs mailing list<br>
> <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>