xfs: don't allow realtime swap files

Linux swapfiles use bmap which has no ability to tell the swap code
that the blocks its reporting aren't actually on the data device.
Therefore, swapon on a realtime file could corrupt random blocks on
the data device, so we must ensure that swapon cannot happen.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
Darrick J. Wong
2017-06-19 13:24:02 -07:00
committed by Eryu Guan
parent 10ad750169
commit 6813e5213d
3 changed files with 80 additions and 0 deletions
+1
View File
@@ -416,3 +416,4 @@
416 dangerous_fuzzers dangerous_scrub dangerous_repair
417 dangerous_fuzzers dangerous_scrub dangerous_online_repair
418 dangerous_fuzzers dangerous_scrub dangerous_repair
419 auto quick