diff options
author | Christoph Hellwig <hch@lst.de> | 2017-02-06 13:46:01 -0500 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-02-06 20:47:46 -0500 |
commit | dcf9585a7511147c7ffd580be8580dd39bc52fb6 (patch) | |
tree | fffd802ec71578d55e2f8c25081a5a2259870956 | |
parent | f13eb2055ae46ded52961f27753c245dc5b8967d (diff) |
xfs: return the converted extent in __xfs_reflink_convert_cow
We'll need it for the direct I/O code. Also rename the function to
xfs_reflink_convert_cow_extent to describe it a bit better.
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>
-rw-r--r-- | fs/xfs/xfs_reflink.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index 8c8c4f4676da..219bc96bfc71 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c | |||
@@ -332,20 +332,19 @@ xfs_reflink_convert_cow_extent( | |||
332 | xfs_filblks_t count_fsb, | 332 | xfs_filblks_t count_fsb, |
333 | struct xfs_defer_ops *dfops) | 333 | struct xfs_defer_ops *dfops) |
334 | { | 334 | { |
335 | struct xfs_bmbt_irec irec = *imap; | ||
336 | xfs_fsblock_t first_block; | 335 | xfs_fsblock_t first_block; |
337 | int nimaps = 1; | 336 | int nimaps = 1; |
338 | 337 | ||
339 | if (imap->br_state == XFS_EXT_NORM) | 338 | if (imap->br_state == XFS_EXT_NORM) |
340 | return 0; | 339 | return 0; |
341 | 340 | ||
342 | xfs_trim_extent(&irec, offset_fsb, count_fsb); | 341 | xfs_trim_extent(imap, offset_fsb, count_fsb); |
343 | trace_xfs_reflink_convert_cow(ip, &irec); | 342 | trace_xfs_reflink_convert_cow(ip, imap); |
344 | if (irec.br_blockcount == 0) | 343 | if (imap->br_blockcount == 0) |
345 | return 0; | 344 | return 0; |
346 | return xfs_bmapi_write(NULL, ip, irec.br_startoff, irec.br_blockcount, | 345 | return xfs_bmapi_write(NULL, ip, imap->br_startoff, imap->br_blockcount, |
347 | XFS_BMAPI_COWFORK | XFS_BMAPI_CONVERT, &first_block, | 346 | XFS_BMAPI_COWFORK | XFS_BMAPI_CONVERT, &first_block, |
348 | 0, &irec, &nimaps, dfops); | 347 | 0, imap, &nimaps, dfops); |
349 | } | 348 | } |
350 | 349 | ||
351 | /* Convert all of the unwritten CoW extents in a file's range to real ones. */ | 350 | /* Convert all of the unwritten CoW extents in a file's range to real ones. */ |