]> git.proxmox.com Git - mirror_qemu.git/commit
backends/hostmem-file: Allow to specify full pathname for backing file
authorPavel Fedin <p.fedin@samsung.com>
Wed, 28 Oct 2015 09:54:07 +0000 (12:54 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 4 Nov 2015 14:56:05 +0000 (15:56 +0100)
commit8d31d6b65a7448582c7bd320fd1b8cfc6cca2720
tree0b31bffc15551212dff5117a62c6d4df8169446a
parent5e4dfd3d4e87e0464d599ecef06aa8fe78420a9b
backends/hostmem-file: Allow to specify full pathname for backing file

This allows to explicitly specify file name to use with the backend. This
is important when using it together with ivshmem in order to make it backed
by hugetlbfs. By default filename is autogenerated using mkstemp(), and the
file is unlink()ed after creation, effectively making it anonymous. This is
not very useful with ivshmem because it ends up in a memory which cannot be
accessed by something else.

Distinction between directory and file name is done by stat() check. If an
existing directory is given, the code keeps old behavior. Otherwise it
creates or opens a file with the given pathname.

Signed-off-by: Pavel Fedin <p.fedin@samsung.com>
Tested-by: Igor Skalkin <i.skalkin@samsung.com>
Message-Id: <004301d11166$9672fe30$c358fa90$@samsung.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
exec.c
qemu-doc.texi