diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2017-12-06 19:13:35 -0500 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-12-08 20:51:05 -0500 |
commit | b7e0b6ff54dd92febbb1914ab93cd6a21622e169 (patch) | |
tree | ab08c84d8d224ca9f20731bdae9cb21d40e47a3b | |
parent | f59cf5c29919d17b61913c3360a7bd29b72975c1 (diff) |
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>
-rw-r--r-- | fs/xfs/xfs_iomap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c index 33eb4fb2e3fd..7ab52a8bc0a9 100644 --- a/fs/xfs/xfs_iomap.c +++ b/fs/xfs/xfs_iomap.c | |||
@@ -1213,7 +1213,7 @@ xfs_xattr_iomap_begin( | |||
1213 | 1213 | ||
1214 | ASSERT(ip->i_d.di_aformat != XFS_DINODE_FMT_LOCAL); | 1214 | ASSERT(ip->i_d.di_aformat != XFS_DINODE_FMT_LOCAL); |
1215 | error = xfs_bmapi_read(ip, offset_fsb, end_fsb - offset_fsb, &imap, | 1215 | error = xfs_bmapi_read(ip, offset_fsb, end_fsb - offset_fsb, &imap, |
1216 | &nimaps, XFS_BMAPI_ENTIRE | XFS_BMAPI_ATTRFORK); | 1216 | &nimaps, XFS_BMAPI_ATTRFORK); |
1217 | out_unlock: | 1217 | out_unlock: |
1218 | xfs_iunlock(ip, lockmode); | 1218 | xfs_iunlock(ip, lockmode); |
1219 | 1219 | ||