]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: don't rely on extent indices in xfs_bmap_collapse_extents
authorChristoph Hellwig <hch@lst.de>
Fri, 17 Nov 2017 04:11:33 +0000 (22:11 -0600)
committerEric Sandeen <sandeen@redhat.com>
Fri, 17 Nov 2017 04:11:33 +0000 (22:11 -0600)
commitbac20498090b097d4f730de1c264adedc04912d9
tree8b278f86e5d92b34c7b7ad93a97147adaf9d50c9
parentf36ccac2fcfb131ebc9ceb9bde9a586ea8207417
xfs: don't rely on extent indices in xfs_bmap_collapse_extents

Source kernel commit: 40591bdbccc47661050d98200ab65e77fa2324bd

Rewrite xfs_bmap_collapse_extents so that we don't rely on extent indices
except for iterating over them.  Not being able to iterate to the next
extent is a sufficient exit condition, and we don't need to do any extent
count games given that:

a) we already flushed all delalloc extents past our start offset
before doing the operation
b) xfs_iext_count() includes delalloc extents anyway

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c