]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: introduce the xfs_iext_cursor abstraction
authorChristoph Hellwig <hch@lst.de>
Fri, 3 Nov 2017 17:34:43 +0000 (10:34 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 6 Nov 2017 19:53:40 +0000 (11:53 -0800)
commit223f465ac780b65727ee79b4eed184a5c73d3c70
treead756c7caa0bb7252aaf444b077c518e0a5d9f0f
parent52a56e20e45ae411759d006059bb9b818e0d80d8
xfs: introduce the xfs_iext_cursor abstraction

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>
13 files changed:
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_bmap.h
fs/xfs/libxfs/xfs_inode_fork.c
fs/xfs/libxfs/xfs_inode_fork.h
fs/xfs/libxfs/xfs_types.h
fs/xfs/scrub/bmap.c
fs/xfs/scrub/dir.c
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_dir2_readdir.c
fs/xfs/xfs_dquot.c
fs/xfs/xfs_iomap.c
fs/xfs/xfs_reflink.c
fs/xfs/xfs_trace.h