Skip to content

why is copying required twice during buildah commit? #6463

@lddlww

Description

@lddlww

reference follow codes:
1: write to /var/tmp/buildahxxx

buildah/image.go

Line 1110 in e0e108c

size, err := io.Copy(writer, rc)

2: copy blob, write to /var/tmp/container_storagexxx

_, err = io.Copy(diffID.Hash(), decompressed)

if first one exe io.Copy why second code used Copy too,does it instead of os.Rename?

above what would lead poor performance , or am i missing something?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions