mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
runsc/sandbox: Make OverlayFileUsage follow convention for urpc methods.
PiperOrigin-RevId: 503269077
This commit is contained in:
committed by
gVisor bot
parent
5a6a36d222
commit
fa72d6e37d
@@ -1240,14 +1240,12 @@ func (s *Sandbox) ChangeLogging(args control.LoggingArgs) error {
|
||||
|
||||
// OverlayFileUsage returns the current usage (bytes) of the overlay filestore.
|
||||
func (s *Sandbox) OverlayFileUsage() (uint64, error) {
|
||||
conn, err := s.sandboxConnect()
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
defer conn.Close()
|
||||
|
||||
log.Debugf("Getting overlay file usage for sandbox %q", s.ID)
|
||||
var usage uint64
|
||||
return usage, conn.Call(boot.CongMgrOverlayFileUsage, nil, &usage)
|
||||
if err := s.call(boot.CongMgrOverlayFileUsage, nil, &usage); err != nil {
|
||||
return 0, fmt.Errorf("getting overlay file usage for sandbox %q: %w", s.ID, err)
|
||||
}
|
||||
return usage, nil
|
||||
}
|
||||
|
||||
// DestroyContainer destroys the given container. If it is the root container,
|
||||
|
||||
Reference in New Issue
Block a user