Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
clh: memory: remove pmem size argument
Browse files Browse the repository at this point in the history
Pmem size now is calculated by the hypervisor. This is not required
anymore. Remove it to simplify the code.

Signed-off-by: Jose Carlos Venegas Munoz <[email protected]>
  • Loading branch information
jcvenegas committed Apr 28, 2020
1 parent d4a9282 commit 7b5e8f6
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions virtcontainers/clh.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,8 @@ func (clh *cloudHypervisor) createSandbox(ctx context.Context, id string, networ
return errors.New("image path is empty")
}

st, err := os.Stat(imagePath)
if err != nil {
return fmt.Errorf("Failed to get information for image file '%v': %v", imagePath, err)
}

pmem := chclient.PmemConfig{
File: imagePath,
Size: st.Size(),
DiscardWrites: true,
}
clh.vmconfig.Pmem = append(clh.vmconfig.Pmem, pmem)
Expand Down

0 comments on commit 7b5e8f6

Please sign in to comment.