]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: don't allow bmap on rt files
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 19 Jun 2017 20:19:08 +0000 (13:19 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 20 Jun 2017 17:45:22 +0000 (10:45 -0700)
commitda46450493b467b56a445015f8737b7c7342a846
treef4ca9403fcfaadbf121670af744152e64ae06eb3
parent004c406ab2c549f69191cd0da8c68e67a1dcc4b2
xfs: don't allow bmap on rt files

bmap returns a dumb LBA address but not the block device that goes with
that LBA.  Swapfiles don't care about this and will blindly assume that
the data volume is the correct blockdev, which is totally bogus for
files on the rt subvolume.  This results in the swap code doing IOs to
arbitrary locations on the data device(!) if the passed in mapping is a
realtime file, so just turn off bmap for rt files.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_aops.c