]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs: don't rely on extent indices in xfs_bmap_insert_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)
commitbd80a804b33104ece503a72efb8959f6c18ff15a
tree083d2b45cbfedf9f8de4fe0840d8c7ea40e5879d
parentbac20498090b097d4f730de1c264adedc04912d9
xfs: don't rely on extent indices in xfs_bmap_insert_extents

Source kernel commit: 5936dc543cfd27de74cd34fdc928b5115cec53d1

Rewrite xfs_bmap_insert_extents so that we don't rely on extent indices
except for iterating over them.  Not being able to iterate to the previous
extent or finding the extent that stop_fsb is in are sufficient exit
conditions, 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