]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: bmap btree owner swap support
authorDave Chinner <dchinner@redhat.com>
Wed, 13 Nov 2013 06:40:31 +0000 (06:40 +0000)
committerRich Johnston <rjohnston@sgi.com>
Wed, 13 Nov 2013 17:04:09 +0000 (11:04 -0600)
commit9c6ebc42e2f1cf4b114c5cecbf373b8922959e69
tree75ddd874d0b9bed318132f12baa137c5ea55786f
parent10851b189f50f357eab3ce787533e505babd00d2
libxfs: bmap btree owner swap support

For CRC enabled filesystems, we can't just swap inode forks from one
inode to another when defragmenting a file - the blocks in the inode
fork bmap btree contain pointers back to the owner inode. Hence if
we are to swap the inode forks we have to atomically modify every
block in the btree during the transaction.

This patch brings across the kernel code for doing the owner
swap of an entire fork - something that we are likely to end up
needing in xfs_repair when reparenting stray inodes to lost+found -
without all the associated swap extents transaction and recovery
cruft as those parts are not needed in userspace.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
include/xfs_bmap_btree.h
include/xfs_btree.h
include/xfs_inode_buf.h
include/xfs_log_format.h
libxfs/xfs_bmap_btree.c
libxfs/xfs_btree.c