]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: prohibit fstrim in norecovery mode
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 23 Mar 2019 01:10:22 +0000 (18:10 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 25 Mar 2019 15:03:29 +0000 (08:03 -0700)
commitf23ddffb4b19cabd2099b338e13bdca46f046bdf
tree8c6cc62bf32cca22fcf480f87760038d80399c73
parent003f68f40dbadbfedc27dcb0bbb54827df9c8e65
xfs: prohibit fstrim in norecovery mode

The xfs fstrim implementation uses the free space btrees to find free
space that can be discarded.  If we haven't recovered the log, the bnobt
will be stale and we absolutely *cannot* use stale metadata to zap the
underlying storage.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
fs/xfs/xfs_discard.c