opensubscriber
   Find in this group all groups
 
Unknown more information…

x : xfs@oss.sgi.com 14 August 2009 • 2:17AM -0400

xfs buffers
by kanishk rastogi

REPLY TO AUTHOR
 
REPLY TO GROUP




hi all,
I was trying to understand the xfs_buf_t management in XFS.
I was looking at the xfs_bufhash_t which is used to keep the info of buffers
which have ongoing transactions.
I wanted to know if it uses it for caching these pages.

As far as i can see in xfs_buf_relse  calls ::

list_del_init(&bp->b_hash_list);

if the count drops down to 0 for the buffer...

if (atomic_dec_and_lock(&bp->b_hold, &hash->bh_lock)) {
                if (bp->b_relse) { ----->set only in case of error??
                        atomic_inc(&bp->b_hold);
                        spin_unlock(&hash->bh_lock);
                        (*(bp->b_relse)) (bp);
                } else if (bp->b_flags & XBF_FS_MANAGED) { ----> mostly
unset......
                        spin_unlock(&hash->bh_lock);
                } else {
                        ASSERT(!(bp->b_flags & (XBF_DELWRI|_XBF_DELWRI_Q)));
                        *list_del_init(&bp->b_hash_list);*
                        spin_unlock(&hash->bh_lock);
                        xfs_buf_free(bp);
                }
        }

---------------

CMIIW:
So it doesnt keeps buffers if they are not in use....  ??

I dont think that should be the case...

--
regards
kanishk

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.