]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: make iomap_begin functions trim iomaps consistently
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 7 Dec 2017 00:13:35 +0000 (16:13 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sat, 9 Dec 2017 01:51:05 +0000 (17:51 -0800)
commit6cb07179218f78470c770dd16c6170e0966f3d46
treeab08c84d8d224ca9f20731bdae9cb21d40e47a3b
parentfff8f0628faf3c0da4be7b3d2b68433278f59f0f
xfs: make iomap_begin functions trim iomaps consistently

Historically, the XFS iomap_begin function only returned mappings for
exactly the range queried, i.e. it doesn't do XFS_BMAPI_ENTIRE lookups.
The current vfs iomap consumers are only set up to deal with trimmed
mappings.  xfs_xattr_iomap_begin does BMAPI_ENTIRE lookups, which is
inconsistent with the current iomap usage.  Remove the flag so that both
iomap_begin functions behave the same way.

FWIW this also fixes a behavioral regression in xattr FIEMAP that was
introduced in 4.8 wherein attr fork extents are no longer trimmed like
they used to be.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_iomap.c