Don't allow written blocks from this transaction to be reallocated
commit97864fa126c1e7675595882943d0397c45ef4b67
authorChris Mason <chris.mason@oracle.com>
Fri, 4 Apr 2008 19:40:00 +0000 (4 15:40 -0400)
committerDavid Woodhouse <dwmw2@hera.kernel.org>
Fri, 4 Apr 2008 19:40:00 +0000 (4 15:40 -0400)
tree5f12a8324fccc667b8dd9906b38a85b1befe8001
parent4f9e7f0bae85b4bb51ff442f961dacb663c0cf15
Don't allow written blocks from this transaction to be reallocated

When a block is freed, it can be immediately reused if it is from
the current transaction.  But, an extra check is required to make sure
the block had not been written yet.  If it were reused after being written,
the transid in the block header might match the transid of the
next time the block was allocated.

The parent node records the transaction ID of the block it is pointing to,
and this is used as part of validating the block on reads.  So, there
can only be one version of a block per transaction.
extent-tree.c