Merge pull request #2212 from lifupan/fix_virtiofsd

qemu: stop the virtiofsd specifically
This commit is contained in:
Eric Ernst
2021-07-12 13:56:04 -07:00
committed by GitHub

View File

@@ -665,7 +665,8 @@ func (q *qemu) setupVirtiofsd(ctx context.Context) (err error) {
func (q *qemu) stopVirtiofsd(ctx context.Context) (err error) {
if q.state.VirtiofsdPid == 0 {
return errors.New("invalid virtiofsd PID(0)")
q.Logger().Warn("The virtiofsd had stopped")
return nil
}
err = q.virtiofsd.Stop(ctx)
@@ -972,6 +973,10 @@ func (q *qemu) stopSandbox(ctx context.Context, waitOnly bool) error {
}
}
if err := q.stopVirtiofsd(ctx); err != nil {
return err
}
return nil
}