summaryrefslogtreecommitdiffstats
path: root/net/llc/llc_c_st.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-11-02 11:38:41 +1100
committerBen Myers <bpm@sgi.com>2012-11-08 11:09:44 -0600
commitca250b1b3d711936d7dae9e97871f2261347f82d (patch)
tree5abb078bf8afb07b5ca0a5dc67d82fe712b4110c /net/llc/llc_c_st.c
parent1e7acbb7bc1ae7c1c62fd1310b3176a820225056 (diff)
downloadop-kernel-dev-ca250b1b3d711936d7dae9e97871f2261347f82d.zip
op-kernel-dev-ca250b1b3d711936d7dae9e97871f2261347f82d.tar.gz
xfs: invalidate allocbt blocks moved to the free list
When we free a block from the alloc btree tree, we move it to the freelist held in the AGFL and mark it busy in the busy extent tree. This typically happens when we merge btree blocks. Once the transaction is committed and checkpointed, the block can remain on the free list for an indefinite amount of time. Now, this isn't the end of the world at this point - if the free list is shortened, the buffer is invalidated in the transaction that moves it back to free space. If the buffer is allocated as metadata from the free list, then all the modifications getted logged, and we have no issues, either. And if it gets allocated as userdata direct from the freelist, it gets invalidated and so will never get written. However, during the time it sits on the free list, pressure on the log can cause the AIL to be pushed and the buffer that covers the block gets pushed for write. IOWs, we end up writing a freed metadata block to disk. Again, this isn't the end of the world because we know from the above we are only writing to free space. The problem, however, is for validation callbacks. If the block was on old btree root block, then the level of the block is going to be higher than the current tree root, and so will fail validation. There may be other inconsistencies in the block as well, and currently we don't care because the block is in free space. Shutting down the filesystem because a freed block doesn't pass write validation, OTOH, is rather unfriendly. So, make sure we always invalidate buffers as they move from the free space trees to the free list so that we guarantee they never get written to disk while on the free list. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Phil White <pwhite@sgi.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'net/llc/llc_c_st.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud