]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: modify buffer item reference counting
authorDave Chinner <dchinner@redhat.com>
Fri, 7 May 2010 01:04:34 +0000 (11:04 +1000)
committerAlex Elder <aelder@sgi.com>
Mon, 24 May 2010 15:33:31 +0000 (10:33 -0500)
commit19bb5a6f9e9547fa0288e4b318e2a02e6e1f476e
tree150216a336bbb3a0f7066763b675fb6a0e6f3061
parent036ff929b01619aa656fcd24f729dcaa8d4bbb96
xfs: modify buffer item reference counting

The buffer log item reference counts used to take referenceŃ• for every
transaction, similar to the pin counting. This is symmetric (like the
pin/unpin) with respect to transaction completion, but with dleayed logging
becomes assymetric as the pinning becomes assymetric w.r.t. transaction
completion.

To make both cases the same, allow the buffer pinning to take a reference to
the buffer log item and always drop the reference the transaction has on it
when being unlocked. This is balanced correctly because the unpin operation
always drops a reference to the log item. Hence reference counting becomes
symmetric w.r.t. item pinning as well as w.r.t active transactions and as a
result the reference counting model remain consistent between normal and
delayed logging.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/xfs_buf_item.c