]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: dont treat rt extents beyond EOF as eofblocks to be cleared
authorDarrick J. Wong <djwong@kernel.org>
Sat, 25 Jun 2022 17:47:45 +0000 (10:47 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Wed, 29 Jun 2022 15:47:56 +0000 (08:47 -0700)
commit72537a5bafa7aa168a9c694fda698498dff94bf9
tree1b3181f89db35a20dfa8e7fe6c4613e5e5688fad
parent8ccf9a1c635c07f9afe4abe2dee3c429380e2a94
xfs: dont treat rt extents beyond EOF as eofblocks to be cleared

On a system with a realtime volume and a 28k realtime extent,
generic/491 fails because the test opens a file on a frozen filesystem
and closing it causes xfs_release -> xfs_can_free_eofblocks to
mistakenly think that the the blocks of the realtime extent beyond EOF
are posteof blocks to be freed.  Realtime extents cannot be partially
unmapped, so this is pointless.  Worse yet, this triggers posteof
cleanup, which stalls on a transaction allocation, which is why the test
fails.

Teach the predicate to account for realtime extents properly.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_bmap_util.c