[Top] [All Lists]

Re: [PATCH 04/11] xfs: modify buffer item reference counting V2

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 04/11] xfs: modify buffer item reference counting V2
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 6 May 2010 17:00:26 -0400
Cc: xfs@xxxxxxxxxxx
In-reply-to: <1273110351-2333-5-git-send-email-david@xxxxxxxxxxxxx>
References: <1273110351-2333-1-git-send-email-david@xxxxxxxxxxxxx> <1273110351-2333-5-git-send-email-david@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
On Thu, May 06, 2010 at 11:45:44AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 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@xxxxxxxxxx>

Looks good and makes the buffer refconting model a lot more sensible.

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

<Prev in Thread] Current Thread [Next in Thread>