s3: Replace shadow_copy2 with a new implementation