When adding support for externally launched virtiofsd,
I was too liberal and did not require a target.
But the target is required, because it's passed to the
QEMU device, not to virtiofsd.
https://bugzilla.redhat.com/show_bug.cgi?id=
1969232
Fixes: 12967c3e1333a6e106110f449ccb1e96279b9527
Fixes: 56dcdec1ac8104f94371c210585bab91eb36395d
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
<filesystem type='mount'>
<driver type='virtiofs' queue='1024'/>
<source socket='/tmp/sock'/>
+ <target dir='tag'/>
</filesystem>
...
</devices>
<filesystem type='mount'/>
<driver type='virtiofs' queue='1024'/>
<source socket='/var/virtiofsd.sock'/>
+ <target dir='tag'/>
</filesystem>
static int
virDomainFSDefValidate(const virDomainFSDef *fs)
{
- if (fs->dst == NULL && !fs->sock) {
+ if (fs->dst == NULL) {
const char *source = fs->src->path;
+ if (!source)
+ source = fs->sock;
virReportError(VIR_ERR_NO_TARGET,
source ? "%s" : NULL, source);
<filesystem type='mount'>
<driver type='virtiofs' queue='1024'/>
<source socket='/tmp/sock'/>
+ <target dir='tag'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</filesystem>
<input type='mouse' bus='ps2'/>