mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-07 19:14:10 +00:00
clh: Allow add virtiofs args and cache options from config
[ port from runtime commit e5a3211c74e20e9878fd0f5d1c80a3c4354eabd1 ] Today some options for virtiofsd could improve compatibility for example xattrs for dnf or cache=auto for file consistency for changes in the host. Allow users can enabled as requiered. Signed-off-by: Jose Carlos Venegas Munoz <jose.carlos.venegas.munoz@intel.com> Signed-off-by: Peng Tao <bergwolf@hyper.sh>
This commit is contained in:
parent
653df674d3
commit
94fdec4e4b
@ -176,8 +176,13 @@ DEFSHAREDFS_QEMU_VIRTIOFS := virtio-fs
|
|||||||
DEFVIRTIOFSDAEMON := $(VIRTIOFSDBINDIR)/virtiofsd
|
DEFVIRTIOFSDAEMON := $(VIRTIOFSDBINDIR)/virtiofsd
|
||||||
# Default DAX mapping cache size in MiB
|
# Default DAX mapping cache size in MiB
|
||||||
DEFVIRTIOFSCACHESIZE := 1024
|
DEFVIRTIOFSCACHESIZE := 1024
|
||||||
DEFVIRTIOFSCACHE := always
|
DEFVIRTIOFSCACHE ?= always
|
||||||
DEFVIRTIOFSEXTRAARGS := []
|
# Format example:
|
||||||
|
# [\"-o\", \"arg1=xxx,arg2\", \"-o\", \"hello world\", \"--arg3=yyy\"]
|
||||||
|
#
|
||||||
|
# see `virtiofsd -h` for possible options.
|
||||||
|
# Make sure you quote args.
|
||||||
|
DEFVIRTIOFSEXTRAARGS ?= []
|
||||||
DEFENABLEIOTHREADS := false
|
DEFENABLEIOTHREADS := false
|
||||||
DEFENABLEMEMPREALLOC := false
|
DEFENABLEMEMPREALLOC := false
|
||||||
DEFENABLEHUGEPAGES := false
|
DEFENABLEHUGEPAGES := false
|
||||||
|
@ -65,8 +65,28 @@ virtio_fs_daemon = "@DEFVIRTIOFSDAEMON@"
|
|||||||
# Default size of DAX cache in MiB
|
# Default size of DAX cache in MiB
|
||||||
virtio_fs_cache_size = @DEFVIRTIOFSCACHESIZE@
|
virtio_fs_cache_size = @DEFVIRTIOFSCACHESIZE@
|
||||||
|
|
||||||
# cloud-hypervisor prefers virtiofs caching (dax) for performance reasons
|
# Extra args for virtiofsd daemon
|
||||||
virtio_fs_cache = "always"
|
#
|
||||||
|
# Format example:
|
||||||
|
# ["-o", "arg1=xxx,arg2", "-o", "hello world", "--arg3=yyy"]
|
||||||
|
#
|
||||||
|
# see `virtiofsd -h` for possible options.
|
||||||
|
virtio_fs_extra_args = @DEFVIRTIOFSEXTRAARGS@
|
||||||
|
|
||||||
|
# Cache mode:
|
||||||
|
#
|
||||||
|
# - none
|
||||||
|
# Metadata, data, and pathname lookup are not cached in guest. They are
|
||||||
|
# always fetched from host and any changes are immediately pushed to host.
|
||||||
|
#
|
||||||
|
# - auto
|
||||||
|
# Metadata and pathname lookup cache expires after a configured amount of
|
||||||
|
# time (default is 1 second). Data is cached while the file is open (close
|
||||||
|
# to open consistency).
|
||||||
|
#
|
||||||
|
# - always
|
||||||
|
# Metadata, data, and pathname lookup are cached in guest and never expire.
|
||||||
|
virtio_fs_cache = "@DEFVIRTIOFSCACHE@"
|
||||||
|
|
||||||
# Block storage driver to be used for the hypervisor in case the container
|
# Block storage driver to be used for the hypervisor in case the container
|
||||||
# rootfs is backed by a block device. This is virtio-scsi, virtio-blk
|
# rootfs is backed by a block device. This is virtio-scsi, virtio-blk
|
||||||
|
@ -879,6 +879,7 @@ func newClhHypervisorConfig(h hypervisor) (vc.HypervisorConfig, error) {
|
|||||||
PCIeRootPort: h.PCIeRootPort,
|
PCIeRootPort: h.PCIeRootPort,
|
||||||
DisableVhostNet: true,
|
DisableVhostNet: true,
|
||||||
UseVSock: true,
|
UseVSock: true,
|
||||||
|
VirtioFSExtraArgs: h.VirtioFSExtraArgs,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user