]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: disable swap extents ioctl on CRC enabled filesystems
authorDave Chinner <dchinner@redhat.com>
Mon, 27 May 2013 06:38:24 +0000 (16:38 +1000)
committerBen Myers <bpm@sgi.com>
Thu, 30 May 2013 22:20:08 +0000 (17:20 -0500)
commit504f9319668b62c9c656de8c201ff0e3d464d39a
treed7862206d6bc85506490ffa80d3e6ac5836a6e09
parent87913a728c2d0fa192451c02cf09478a1e683a3b
xfs: disable swap extents ioctl on CRC enabled filesystems

Currently, swapping extents from one inode to another is a simple
act of switching data and attribute forks from one inode to another.
This, unfortunately in no longer so simple with CRC enabled
filesystems as there is owner information embedded into the BMBT
blocks that are swapped between inodes. Hence swapping the forks
between inodes results in the inodes having mapping blocks that
point to the wrong owner and hence are considered corrupt.

To fix this we need an extent tree block or record based swap
algorithm so that the BMBT block owner information can be updated
atomically in the swap transaction. This is a significant piece of
new work, so for the moment simply don't allow swap extent
operations to succeed on CRC enabled filesystems.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
(cherry picked from commit 02f75405a75eadfb072609f6bf839e027de6a29a)
fs/xfs/xfs_dfrag.c