Skip to content

Commit

Permalink
9p: Add hypervisor configuration for 9p msize
Browse files Browse the repository at this point in the history
This allows msize option for 9p to be configured and tuned.

Fixes kata-containers#206

Signed-off-by: Archana Shinde <[email protected]>
  • Loading branch information
amshinde committed Apr 13, 2018
1 parent ad5669f commit 03f4ec8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions virtcontainers/hypervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ type HypervisorConfig struct {
// DisableNestingChecks is used to override customizations performed
// when running on top of another VMM.
DisableNestingChecks bool

// Msize9p is used as the msize for 9p shares
Msize9p uint32
}

func (conf *HypervisorConfig) valid() (bool, error) {
Expand Down
4 changes: 4 additions & 0 deletions virtcontainers/kata_agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,10 @@ func (k *kataAgent) startSandbox(sandbox Sandbox) error {
}
}

if sandbox.config.HypervisorConfig.Msize9p != 0 {
sharedDir9pOptions = append(sharedDir9pOptions, fmt.Sprintf("msize=%d", sandbox.config.HypervisorConfig.Msize9p))
}

// We mount the shared directory in a predefined location
// in the guest.
// This is where at least some of the host config files
Expand Down

0 comments on commit 03f4ec8

Please sign in to comment.