]> git.baikalelectronics.ru Git - kernel.git/commit
gfs2: gfs2_walk_metadata fix
authorAndreas Gruenbacher <agruenba@redhat.com>
Mon, 5 Aug 2019 11:22:03 +0000 (12:22 +0100)
committerAndreas Gruenbacher <agruenba@redhat.com>
Fri, 9 Aug 2019 15:56:12 +0000 (16:56 +0100)
commitf33b3db45b9a06fecaf8183ba7ab2f238e79f2c1
tree115efcd00abc631f4d2688f7b4ddb90e7e25e798
parent1b1e3f6d5a6ff25a6613c83a142ba0d73a10c16d
gfs2: gfs2_walk_metadata fix

It turns out that the current version of gfs2_metadata_walker suffers
from multiple problems that can cause gfs2_hole_size to report an
incorrect size.  This will confuse fiemap as well as lseek with the
SEEK_DATA flag.

Fix that by changing gfs2_hole_walker to compute the metapath to the
first data block after the hole (if any), and compute the hole size
based on that.

Fixes xfstest generic/490.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: Bob Peterson <rpeterso@redhat.com>
Cc: stable@vger.kernel.org # v4.18+
fs/gfs2/bmap.c