migration: introduce lock for to_dst_file