]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: validate alignment of inherited rt extent hints
authorDarrick J. Wong <djwong@kernel.org>
Wed, 28 Jul 2021 23:03:12 +0000 (19:03 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 28 Jul 2021 23:03:12 +0000 (19:03 -0400)
commit5f0624275bcc7d29a9bce7488e2626f91a099ac0
tree0e8942350bf2d9e64b6cd2a0d644c4588a454339
parent5c0da2c0f8fc4683c3f31d8c1587803bc5ab9138
xfs_repair: validate alignment of inherited rt extent hints

If we encounter a directory that has been configured to pass on an
extent size hint to a new realtime file and the hint isn't an integer
multiple of the rt extent size, we should turn off the hint because that
is a misconfiguration.  Old kernels didn't check for this when copying
attributes into new files and would crash in the rt allocator.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
[sandeen: clarify that it is an extent size *hint*]
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/dinode.c