Skip to contentSkip to conversation

split the reflink remap from the block allocation path

PATCH New Christoph Hellwig 1 participant 2 messages Apr 3, 2017 XFS filesystem

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw

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.

---
 fs/xfs/libxfs/xfs_bmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/libxfs/xfs_bmap.c +1 -1
index 9bd104f32908..2a426d127e05 100644
@@ -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