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 4 does. Patches 1-3 are something I'd like to see in 4.9, patch 4 might not fully qualify, but just getting it in might make everyones life easier. -- 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