]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - libxfs/xfs_inode_fork.c
xfs: introduce the xfs_iext_cursor abstraction
authorChristoph Hellwig <hch@lst.de>
Fri, 17 Nov 2017 04:11:34 +0000 (22:11 -0600)
committerEric Sandeen <sandeen@redhat.com>
Fri, 17 Nov 2017 04:11:34 +0000 (22:11 -0600)
commit9788e059ce7c64ae5d7618e6e088625af2e335e2
tree4ee7b789d90b3472cf38549f95aeec9a7531bc86
parent62ed733883db194245e78f6eaf4a1d59835a75a4
xfs: introduce the xfs_iext_cursor abstraction

Source kernel commit: b2b1712a640824e7c131bfdd2585d57bf8ccb39a

Add a new xfs_iext_cursor structure to hide the direct extent map
index manipulations. In addition to the existing lookup/get/insert/
remove and update routines new primitives to get the first and last
extent cursor, as well as moving up and down by one extent are
provided.  Also new are convenience to increment/decrement the
cursor and retreive the new extent, as well as to peek into the
previous/next extent without updating the cursor and last but not
least a macro to iterate over all extents in a fork.

[darrick: rename for_each_iext to for_each_xfs_iext]

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
[sandeen: use cursor in xfs_repair code as well]
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_bmap.c
libxfs/xfs_bmap.h
libxfs/xfs_inode_fork.c
libxfs/xfs_inode_fork.h
libxfs/xfs_types.h
repair/phase6.c