When creating a reflink we need to take the iolock much earlier, as various early checks done in xfs_file_share_range currently are racy without it. Patches 1-3 sort that out in a minimal invasive way, but I think we should just merge xfs_file_share_range and xfs_reflink_remap_range, which is what patch 5 does. Patches 1-3 are something I'd like to see in 4.9, patch 4 and 4might not fully qualify, but just getting it in might make everyones life easier. Changes since V1: - Added Reviewed-by: tag for patches 1-3 - New patch to remove xfs_file_wait_for_io - Keep the xfs_reflink_remap_range name instead of xfs_file_share_range - Remove a double semicolon -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html