split the reflink remap from the block allocation path
We've run into various problems due to the fact that the reflink remap code reuses the xfs_bmapi_write codepath for setting up the extent list entries and abuses the firstblock field for that purpose.
This series fixes this by creating an entirely separate xfs_bmapi_remap path that is much simpler than xfs_bmapi_write and does not need to overload the firstblock field.
PATCH 1/6 xfs: fix integer truncation in xfs_bmap_remap_alloc
bno should be a xfs_fsblock_t, which is 64-bit wides instead of a xfs_aglock_t, which truncates the value to 32 bits.
Signed-off-by Christoph Hellwig <[email protected]>
--- fs/xfs/libxfs/xfs_bmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_bmap.c +1 -1
@@ -3863,7 +3863,7 @@ xfs_bmap_remap_alloc( {struct xfs_trans *tp = ap->tp;struct xfs_mount *mp = tp->t_mountp; -xfs_agblock_t bno; +xfs_fsblock_t bno;struct xfs_alloc_arg args;int error;
Signature · 1 line
2.11.0