Skip to contentSkip to conversation

virtiofsd: Few cleanups in virtio_send_data_iov()

PATCH In review Vivek Goyal 3 participants 13 messages May 18, 2021 – May 25, 2021

lore
Share & tools
lore
#0 lore raw

v2 cover virtiofsd: Few cleanups in virtio_send_data_iov()

Hi,

This is V2 of the patches. Changes since V1 are.

- Took care of coding style issue.
- Got rid of label "err" completely in last patch. (Dave, Connor).
- Captured Reviewed-by tags from Connor and David.

Code in virtio_send_data_iov() little twisted and complicated. This patch series just tries to simplify it a bit to make it little easier to read this piece of code.

Thanks
Vivek

Vivek Goyal (7):
virtiofsd: Check for EINTR in preadv() and retry
virtiofsd: Get rid of unreachable code in read
virtiofsd: Use iov_discard_front() to skip bytes
virtiofsd: get rid of in_sg_left variable
virtiofsd: Simplify skip byte logic
virtiofsd: Check EOF before short read
virtiofsd: Set req->reply_sent right after sending reply

 tools/virtiofsd/fuse_virtio.c | 81 +++++++++++------------------------
 1 file changed, 25 insertions(+), 56 deletions(-)
Signature · 1 line
2.25.4
#1 lore raw

PATCH v2 1/7 virtiofsd: Check for EINTR in preadv() and retry

We don't seem to check for EINTR and retry. There are other places in code where we check for EINTR. So lets add a check.

---
 tools/virtiofsd/fuse_virtio.c | 3 +++
 1 file changed, 3 insertions(+)
tools/virtiofsd/fuse_virtio.c +3 -0
index 9efdbd8ffd..755d7fb25c 100644
@@ -421,6 +421,9 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
 
         if (ret == -1) {
             ret = errno;
+            if (ret == EINTR) {
+                continue;
+            }
             fuse_log(FUSE_LOG_DEBUG, "%s: preadv failed (%m) len=%zd\n",
                      __func__, len);
             goto err;
Signature · 1 line
2.25.4
#2 lore raw

PATCH v2 2/7 virtiofsd: Get rid of unreachable code in read

In reply to Vivek Goyal

pvreadv() can return following.

- error
- 0 in case of EOF
- short read

We seem to handle all the cases already. We are retrying read in case of short read. So another check for short read seems like dead code. Get rid of it.

---
 tools/virtiofsd/fuse_virtio.c | 5 -----
 1 file changed, 5 deletions(-)
tools/virtiofsd/fuse_virtio.c +0 -5
index 755d7fb25c..28e2974d1a 100644
@@ -446,11 +446,6 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
                      in_sg_left);
             break;
         }
-        if (ret != len) {
-            fuse_log(FUSE_LOG_DEBUG, "%s: ret!=len\n", __func__);
-            ret = EIO;
-            goto err;
-        }
         in_sg_left -= ret;
         len -= ret;
     } while (in_sg_left);
Signature · 1 line
2.25.4
#3 lore raw

PATCH v2 3/7 virtiofsd: Use iov_discard_front() to skip bytes

In reply to Vivek Goyal

There are places where we need to skip few bytes from front of the iovec array. We have our own custom code for that. Looks like iov_discard_front() can do same thing. So use that helper instead.

---
 tools/virtiofsd/fuse_virtio.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)
tools/virtiofsd/fuse_virtio.c +3 -11
index 28e2974d1a..09674f2e90 100644
@@ -389,23 +389,15 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
     memcpy(in_sg_cpy, in_sg, sizeof(struct iovec) * in_num);
     /* These get updated as we skip */
     struct iovec *in_sg_ptr = in_sg_cpy;
-    int in_sg_cpy_count = in_num;
+    unsigned int in_sg_cpy_count = in_num;
 
     /* skip over parts of in_sg that contained the header iov */
     size_t skip_size = iov_len;
 
     size_t in_sg_left = 0;
     do {
-        while (skip_size != 0 && in_sg_cpy_count) {
-            if (skip_size >= in_sg_ptr[0].iov_len) {
-                skip_size -= in_sg_ptr[0].iov_len;
-                in_sg_ptr++;
-                in_sg_cpy_count--;
-            } else {
-                in_sg_ptr[0].iov_len -= skip_size;
-                in_sg_ptr[0].iov_base += skip_size;
-                break;
-            }
+        if (skip_size != 0) {
+            iov_discard_front(&in_sg_ptr, &in_sg_cpy_count, skip_size);
         }
 
         int i;
Signature · 1 line
2.25.4
#4 lore raw

PATCH v2 4/7 virtiofsd: get rid of in_sg_left variable

In reply to Vivek Goyal

in_sg_left seems to be being used primarly for debugging purpose. It is keeping track of how many bytes are left in the scatter list we are reading into.

We already have another variable "len" which keeps track how many bytes are left to be read. And in_sg_left is greater than or equal to len. We have already ensured that in the beginning of function.

    if (in_len < tosend_len) {
        fuse_log(FUSE_LOG_ERR, "%s: elem %d too small for data len %zd\n",
                 __func__, elem->index, tosend_len);
        ret = E2BIG;
        goto err;
    }

So in_sg_left seems like a redundant variable. It probably was useful for debugging when code was being developed. Get rid of it. It helps simplify this function.

---
 tools/virtiofsd/fuse_virtio.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)
tools/virtiofsd/fuse_virtio.c +6 -11
index 09674f2e90..ed5146d7a6 100644
@@ -394,20 +394,16 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
     /* skip over parts of in_sg that contained the header iov */
     size_t skip_size = iov_len;
 
-    size_t in_sg_left = 0;
     do {
         if (skip_size != 0) {
             iov_discard_front(&in_sg_ptr, &in_sg_cpy_count, skip_size);
         }
 
-        int i;
-        for (i = 0, in_sg_left = 0; i < in_sg_cpy_count; i++) {
-            in_sg_left += in_sg_ptr[i].iov_len;
-        }
         fuse_log(FUSE_LOG_DEBUG,
                  "%s: after skip skip_size=%zd in_sg_cpy_count=%d "
-                 "in_sg_left=%zd\n",
-                 __func__, skip_size, in_sg_cpy_count, in_sg_left);
+                 "len remaining=%zd\n", __func__, skip_size, in_sg_cpy_count,
+                 len);
+
         ret = preadv(buf->buf[0].fd, in_sg_ptr, in_sg_cpy_count,
                      buf->buf[0].pos);
 
@@ -434,13 +430,12 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
         }
         if (!ret) {
             /* EOF case? */
-            fuse_log(FUSE_LOG_DEBUG, "%s: !ret in_sg_left=%zd\n", __func__,
-                     in_sg_left);
+            fuse_log(FUSE_LOG_DEBUG, "%s: !ret len remaining=%zd\n", __func__,
+                     len);
             break;
         }
-        in_sg_left -= ret;
         len -= ret;
-    } while (in_sg_left);
+    } while (len);
 
     /* Need to fix out->len on EOF */
     if (len) {
Signature · 1 line
2.25.4
#5 lore raw

PATCH v2 5/7 virtiofsd: Simplify skip byte logic

In reply to Vivek Goyal

We need to skip bytes in two cases.

a. Before we start reading into in_sg, we need to skip iov_len bytes
in the beginning which typically will have fuse_out_header.

b. If preadv() does a short read, then we need to retry preadv() with
remainig bytes and skip the bytes preadv() read in short read.

For case a, there is no reason that skipping logic be inside the while loop. Move it outside. And only retain logic "b" inside while loop.

Also get rid of variable "skip_size". Looks like we can do without it.

---
 tools/virtiofsd/fuse_virtio.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
tools/virtiofsd/fuse_virtio.c +4 -10
index ed5146d7a6..49c7dd788a 100644
@@ -392,17 +392,11 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
     unsigned int in_sg_cpy_count = in_num;
 
     /* skip over parts of in_sg that contained the header iov */
-    size_t skip_size = iov_len;
+    iov_discard_front(&in_sg_ptr, &in_sg_cpy_count, iov_len);
 
     do {
-        if (skip_size != 0) {
-            iov_discard_front(&in_sg_ptr, &in_sg_cpy_count, skip_size);
-        }
-
-        fuse_log(FUSE_LOG_DEBUG,
-                 "%s: after skip skip_size=%zd in_sg_cpy_count=%d "
-                 "len remaining=%zd\n", __func__, skip_size, in_sg_cpy_count,
-                 len);
+        fuse_log(FUSE_LOG_DEBUG, "%s: in_sg_cpy_count=%d len remaining=%zd\n",
+                 __func__, in_sg_cpy_count, len);
 
         ret = preadv(buf->buf[0].fd, in_sg_ptr, in_sg_cpy_count,
                      buf->buf[0].pos);
@@ -421,7 +415,7 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
         if (ret < len && ret) {
             fuse_log(FUSE_LOG_DEBUG, "%s: ret < len\n", __func__);
             /* Skip over this much next time around */
-            skip_size = ret;
+            iov_discard_front(&in_sg_ptr, &in_sg_cpy_count, ret);
             buf->buf[0].pos += ret;
             len -= ret;
 
Signature · 1 line
2.25.4
#6 lore raw

PATCH v2 6/7 virtiofsd: Check EOF before short read

In reply to Vivek Goyal

In virtio_send_data_iov() we are checking first for short read and then EOF condition. Change the order. Basically check for error and EOF first and last remaining piece is short ready which will lead to retry automatically at the end of while loop.

Just that it is little simpler to read to the code. There is no need to call "continue" and also one less call of "len-=ret".

---
 tools/virtiofsd/fuse_virtio.c | 21 ++++++++++-----------
 1 file changed, 10 insertions(+), 11 deletions(-)
tools/virtiofsd/fuse_virtio.c +10 -11
index 49c7dd788a..99f91c9d87 100644
@@ -410,25 +410,24 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
                      __func__, len);
             goto err;
         }
-        fuse_log(FUSE_LOG_DEBUG, "%s: preadv ret=%d len=%zd\n", __func__,
-                 ret, len);
-        if (ret < len && ret) {
-            fuse_log(FUSE_LOG_DEBUG, "%s: ret < len\n", __func__);
-            /* Skip over this much next time around */
-            iov_discard_front(&in_sg_ptr, &in_sg_cpy_count, ret);
-            buf->buf[0].pos += ret;
-            len -= ret;
 
-            /* Lets do another read */
-            continue;
-        }
         if (!ret) {
             /* EOF case? */
             fuse_log(FUSE_LOG_DEBUG, "%s: !ret len remaining=%zd\n", __func__,
                      len);
             break;
         }
+        fuse_log(FUSE_LOG_DEBUG, "%s: preadv ret=%d len=%zd\n", __func__,
+                 ret, len);
+
         len -= ret;
+        /* Short read. Retry reading remaining bytes */
+        if (len) {
+            fuse_log(FUSE_LOG_DEBUG, "%s: ret < len\n", __func__);
+            /* Skip over this much next time around */
+            iov_discard_front(&in_sg_ptr, &in_sg_cpy_count, ret);
+            buf->buf[0].pos += ret;
+        }
     } while (len);
 
     /* Need to fix out->len on EOF */
Signature · 1 line
2.25.4
#7 lore raw

PATCH v2 7/7 virtiofsd: Set req->reply_sent right after sending reply

In reply to Vivek Goyal

There is no reason to set it in label "err". We should be able to set it right after sending reply. It is easier to read.

Also got rid of label "err" because now only thing it was doing was return a code. We can return from the error location itself and no need to first jump to label "err".

---
 tools/virtiofsd/fuse_virtio.c | 19 +++++--------------
 1 file changed, 5 insertions(+), 14 deletions(-)
tools/virtiofsd/fuse_virtio.c +5 -14
index 99f91c9d87..fa4aff9b0e 100644
@@ -366,14 +366,12 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
     if (in_len < sizeof(struct fuse_out_header)) {
         fuse_log(FUSE_LOG_ERR, "%s: elem %d too short for out_header\n",
                  __func__, elem->index);
-        ret = E2BIG;
-        goto err;
+        return E2BIG;
     }
     if (in_len < tosend_len) {
         fuse_log(FUSE_LOG_ERR, "%s: elem %d too small for data len %zd\n",
                  __func__, elem->index, tosend_len);
-        ret = E2BIG;
-        goto err;
+        return E2BIG;
     }
 
     /* TODO: Limit to 'len' */
@@ -408,7 +406,7 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
             }
             fuse_log(FUSE_LOG_DEBUG, "%s: preadv failed (%m) len=%zd\n",
                      __func__, len);
-            goto err;
+            return ret;
         }
 
         if (!ret) {
@@ -438,21 +436,14 @@ int virtio_send_data_iov(struct fuse_session *se, struct fuse_chan *ch,
         out_sg->len = tosend_len;
     }
 
-    ret = 0;
-
     vu_dispatch_rdlock(qi->virtio_dev);
     pthread_mutex_lock(&qi->vq_lock);
     vu_queue_push(dev, q, elem, tosend_len);
     vu_queue_notify(dev, q);
     pthread_mutex_unlock(&qi->vq_lock);
     vu_dispatch_unlock(qi->virtio_dev);
-
-err:
-    if (ret == 0) {
-        req->reply_sent = true;
-    }
-
-    return ret;
+    req->reply_sent = true;
+    return 0;
 }
 
 static __thread bool clone_fs_called;
Signature · 1 line
2.25.4
#8 lore raw

[Virtio-fs] Regression: Docker in vms broken.

Something changed in virtiofs, likely to do with overlay support?

Docker in a vm with virtiofs as root running with kernel 5.8.0-53-generic works normally.  However, later 5.8 versions and also 5.11 versions fail with:

May 18 22:00:07 nocsupport4 systemd[1]: docker.service: Scheduled
restart job, restart counter is at 2.
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.061661124-05:00" level=info msg="Starting up"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.109655841-05:00" level=info msg="detected
127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf:
/run/systemd/resolve/resolv.conf"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253580688-05:00" level=info msg="parsed
scheme: \"unix\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253663917-05:00" level=info msg="scheme
\"unix\" not registered, fallback to default scheme" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:

time="2021-05-18T22:00:10.253737208-05:00" level=info msg="ccResolverWrapper: sending update to cc:
{[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc

May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253777767-05:00" level=info msg="ClientConn
switching balancer to \"pick_first\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272602278-05:00" level=info msg="parsed
scheme: \"unix\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272713227-05:00" level=info msg="scheme
\"unix\" not registered, fallback to default scheme" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:

time="2021-05-18T22:00:10.272778900-05:00" level=info msg="ccResolverWrapper: sending update to cc:
{[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc

May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272816740-05:00" level=info msg="ClientConn
switching balancer to \"pick_first\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.367601799-05:00" level=error msg="failed to
mount overlay: invalid argument" storage-driver=overlay2
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.367792469-05:00" level=error
msg="[graphdriver] prior storage driver overlay2 failed: driver not
supported"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.370914131-05:00" level=info msg="stopping
event stream following graceful shutdown" error="context canceled"
module=libcontainerd namespace=plugins.moby
May 18 22:00:10 nocsupport4 dockerd[1104]: failed to start daemon: error
initializing graphdriver: driver not supported
May 18 22:00:10 nocsupport4 systemd[1]: docker.service: Main process
exited, code=exited, status=1/FAILURE
May 18 22:00:10 nocsupport4 systemd[1]: docker.service: Failed with

result 'exit-code'.

root@nocsupport4:~# cat /etc/fstab
myfs / virtiofs defaults 0 0

On the host:

root@noc4:/vmsystems# uname -a
Linux noc4.xxxx 5.11.0-17-generic

root      225434  0.0  0.0  80068  3544 ?        Sl   21:32   0:00
/usr/lib/qemu/virtiofsd --fd=32 -o
source=/vmsystems/nocsupport4,xattr,flock,no_posix_lock -o writeback
libvirt+  225458 85.5  0.7 4366196 236724 ?      Sl   21:32   7:34
/usr/bin/qemu-system-x86_64 -name guest=nocsupport4,debug-threads=on -S
-object
secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-6-nocsupport4/master-key.aes
-machine pc-q35-5.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off
-cpu Conroe,vme=on,vmx=on,cx16=on,pdcm=on,x2apic=on,tsc-deadline=on,hypervisor=on,arat=on,tsc-adjust=on,arch-capabilities=on,pdpe1gb=on,skip-l1dfl-vmentry=on,pschange-mc-no=on -m 3584 -overcommit mem-lock=off -smp 2,sockets=2,cores=1,threads=1
-object
memory-backend-file,id=ram-node0,mem-path=/dev/hugepages/libvirt/qemu/6-nocsupport4,share=yes,prealloc=yes,size=3758096384
-numa node,nodeid=0,cpus=0-1,memdev=ram-node0 -uuid
c7b055aa-1874-4ba9-9302-26fad866e749 -no-user-config -nodefaults
-chardev socket,id=charmonitor,fd=32,server,nowait -mon
chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew
-global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global
ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on
-kernel /vmsystems/nocsupport4/boot/vmlinuz -initrd
/vmsystems/nocsupport4/boot/initrd.img -append rootfstype=virtiofs
root=myfs  rw -device
pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2
-device
pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1
-device
pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2
-device
pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3
-device
pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4
-device
pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5
-device
pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6
-device
pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7
-device pcie-pci-bridge,id=pci.9,bus=pci.4,addr=0x0 -device
ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 -device
ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d
-device
ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1
-device
ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2
-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 -chardev socket,id=chr-vu-fs0,path=/var/lib/libvirt/qemu/domain-6-nocsupport4/fs0-fs.sock
-device
vhost-user-fs-pci,chardev=chr-vu-fs0,queue-size=1024,tag=myfs,bus=pci.1,addr=0x0
-netdev tap,fd=46,id=hostnet0,vhost=on,vhostfd=47 -device
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:30:4d:ca,bus=pci.2,addr=0x0
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -chardev
socket,id=charchannel0,fd=48,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0
-chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0
-device usb-tablet,id=input0,bus=usb.0,port=1 -spice
port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1
-device ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b -device
hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device
i6300esb,id=watchdog0,bus=pci.9,addr=0x1 -watchdog-action reset -chardev
spicevmc,id=charredir0,name=usbredir -device
usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 -chardev
spicevmc,id=charredir1,name=usbredir -device
usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device
virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 -object
rng-random,id=objrng0,filename=/dev/urandom -device
virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 -sandbox
on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny
-msg timestamp=on
root      225472 11.0  0.0 6889960 10848 ?       Sl   21:32   0:58
/usr/lib/qemu/virtiofsd --fd=32 -o
source=/vmsystems/nocsupport4,xattr,flock,no_posix_lock -o writeback

#9 lore raw

Re: [Virtio-fs] Regression: Docker in vms broken.

Quoted 1 line · Harry G. Coin

Something changed in virtiofs, likely to do with overlay support?

I am not aware of any change in virtiofs w.r.t overlay. Are there any messages on VM serail console from guest kernel?

Vivek

Quoted 152 lines

Docker in a vm with virtiofs as root running with kernel 5.8.0-53-generic works normally.  However, later 5.8 versions and also 5.11 versions fail with:

May 18 22:00:07 nocsupport4 systemd[1]: docker.service: Scheduled
restart job, restart counter is at 2.
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.061661124-05:00" level=info msg="Starting up"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.109655841-05:00" level=info msg="detected
127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf:
/run/systemd/resolve/resolv.conf"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253580688-05:00" level=info msg="parsed
scheme: \"unix\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253663917-05:00" level=info msg="scheme
\"unix\" not registered, fallback to default scheme" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:

time="2021-05-18T22:00:10.253737208-05:00" level=info msg="ccResolverWrapper: sending update to cc:
{[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc

May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253777767-05:00" level=info msg="ClientConn
switching balancer to \"pick_first\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272602278-05:00" level=info msg="parsed
scheme: \"unix\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272713227-05:00" level=info msg="scheme
\"unix\" not registered, fallback to default scheme" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:

time="2021-05-18T22:00:10.272778900-05:00" level=info msg="ccResolverWrapper: sending update to cc:
{[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc

May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272816740-05:00" level=info msg="ClientConn
switching balancer to \"pick_first\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.367601799-05:00" level=error msg="failed to
mount overlay: invalid argument" storage-driver=overlay2
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.367792469-05:00" level=error
msg="[graphdriver] prior storage driver overlay2 failed: driver not
supported"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.370914131-05:00" level=info msg="stopping
event stream following graceful shutdown" error="context canceled"
module=libcontainerd namespace=plugins.moby
May 18 22:00:10 nocsupport4 dockerd[1104]: failed to start daemon: error
initializing graphdriver: driver not supported
May 18 22:00:10 nocsupport4 systemd[1]: docker.service: Main process
exited, code=exited, status=1/FAILURE
May 18 22:00:10 nocsupport4 systemd[1]: docker.service: Failed with

result 'exit-code'.

root@nocsupport4:~# cat /etc/fstab
myfs / virtiofs defaults 0 0

On the host:

root@noc4:/vmsystems# uname -a
Linux noc4.xxxx 5.11.0-17-generic

root      225434  0.0  0.0  80068  3544 ?        Sl   21:32   0:00 /usr/lib/qemu/virtiofsd --fd=32 -o source=/vmsystems/nocsupport4,xattr,flock,no_posix_lock -o writeback
libvirt+  225458 85.5  0.7 4366196 236724 ?      Sl   21:32   7:34 /usr/bin/qemu-system-x86_64 -name guest=nocsupport4,debug-threads=on -S
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-6-nocsupport4/master-key.aes

(quoted diff) +0 -2
-machine pc-q35-5.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off
-cpu

Conroe,vme=on,vmx=on,cx16=on,pdcm=on,x2apic=on,tsc-deadline=on,hypervisor=on,arat=on,tsc-adjust=on,arch-capabilities=on,pdpe1gb=on,skip-l1dfl-vmentry=on,pschange-mc-no=on

(quoted diff) +0 -2
-m 3584 -overcommit mem-lock=off -smp 2,sockets=2,cores=1,threads=1
-object

memory-backend-file,id=ram-node0,mem-path=/dev/hugepages/libvirt/qemu/6-nocsupport4,share=yes,prealloc=yes,size=3758096384 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 -uuid
c7b055aa-1874-4ba9-9302-26fad866e749 -no-user-config -nodefaults
-chardev socket,id=charmonitor,fd=32,server,nowait -mon
chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew
-global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global
ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on
-kernel /vmsystems/nocsupport4/boot/vmlinuz -initrd
/vmsystems/nocsupport4/boot/initrd.img -append rootfstype=virtiofs
root=myfs  rw -device
pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2
-device
pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1
-device
pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2
-device
pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3
-device
pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4
-device
pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5
-device
pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6
-device
pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7
-device pcie-pci-bridge,id=pci.9,bus=pci.4,addr=0x0 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d
-device
ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1
-device
ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2
-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 -chardev socket,id=chr-vu-fs0,path=/var/lib/libvirt/qemu/domain-6-nocsupport4/fs0-fs.sock
-device
vhost-user-fs-pci,chardev=chr-vu-fs0,queue-size=1024,tag=myfs,bus=pci.1,addr=0x0
-netdev tap,fd=46,id=hostnet0,vhost=on,vhostfd=47 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:30:4d:ca,bus=pci.2,addr=0x0
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -chardev
socket,id=charchannel0,fd=48,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 -device ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device
i6300esb,id=watchdog0,bus=pci.9,addr=0x1 -watchdog-action reset -chardev spicevmc,id=charredir0,name=usbredir -device
usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 -chardev
spicevmc,id=charredir1,name=usbredir -device
usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 -object
rng-random,id=objrng0,filename=/dev/urandom -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny
-msg timestamp=on
root      225472 11.0  0.0 6889960 10848 ?       Sl   21:32   0:58
/usr/lib/qemu/virtiofsd --fd=32 -o
source=/vmsystems/nocsupport4,xattr,flock,no_posix_lock -o writeback

_______________________________________________
Virtio-fs mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/virtio-fs

#10 lore raw

Re: [Virtio-fs] Regression: Docker in vms broken.

In reply to Harry G. Coin
Quoted 1 line · * Harry G. Coin ([email protected]) wrote:

Something changed in virtiofs, likely to do with overlay support?

Hmm I don't think we have any explicit support in for overlayfs though.

Quoted 3 lines

Docker in a vm with virtiofs as root running with kernel 5.8.0-53-generic works normally.  However, later 5.8 versions and also 5.11 versions fail with:

Hmm, so what's your last working & first failing version of 5.8 ?

Dave

Quoted 147 lines
May 18 22:00:07 nocsupport4 systemd[1]: docker.service: Scheduled
restart job, restart counter is at 2.
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.061661124-05:00" level=info msg="Starting up"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.109655841-05:00" level=info msg="detected
127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf:
/run/systemd/resolve/resolv.conf"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253580688-05:00" level=info msg="parsed
scheme: \"unix\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253663917-05:00" level=info msg="scheme
\"unix\" not registered, fallback to default scheme" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:

time="2021-05-18T22:00:10.253737208-05:00" level=info msg="ccResolverWrapper: sending update to cc:
{[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc

May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253777767-05:00" level=info msg="ClientConn
switching balancer to \"pick_first\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272602278-05:00" level=info msg="parsed
scheme: \"unix\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272713227-05:00" level=info msg="scheme
\"unix\" not registered, fallback to default scheme" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:

time="2021-05-18T22:00:10.272778900-05:00" level=info msg="ccResolverWrapper: sending update to cc:
{[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc

May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272816740-05:00" level=info msg="ClientConn
switching balancer to \"pick_first\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.367601799-05:00" level=error msg="failed to
mount overlay: invalid argument" storage-driver=overlay2
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.367792469-05:00" level=error
msg="[graphdriver] prior storage driver overlay2 failed: driver not
supported"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.370914131-05:00" level=info msg="stopping
event stream following graceful shutdown" error="context canceled"
module=libcontainerd namespace=plugins.moby
May 18 22:00:10 nocsupport4 dockerd[1104]: failed to start daemon: error
initializing graphdriver: driver not supported
May 18 22:00:10 nocsupport4 systemd[1]: docker.service: Main process
exited, code=exited, status=1/FAILURE
May 18 22:00:10 nocsupport4 systemd[1]: docker.service: Failed with

result 'exit-code'.

root@nocsupport4:~# cat /etc/fstab
myfs / virtiofs defaults 0 0

On the host:

root@noc4:/vmsystems# uname -a
Linux noc4.xxxx 5.11.0-17-generic

root      225434  0.0  0.0  80068  3544 ?        Sl   21:32   0:00 /usr/lib/qemu/virtiofsd --fd=32 -o source=/vmsystems/nocsupport4,xattr,flock,no_posix_lock -o writeback
libvirt+  225458 85.5  0.7 4366196 236724 ?      Sl   21:32   7:34 /usr/bin/qemu-system-x86_64 -name guest=nocsupport4,debug-threads=on -S
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-6-nocsupport4/master-key.aes

(quoted diff) +0 -2
-machine pc-q35-5.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off
-cpu

Conroe,vme=on,vmx=on,cx16=on,pdcm=on,x2apic=on,tsc-deadline=on,hypervisor=on,arat=on,tsc-adjust=on,arch-capabilities=on,pdpe1gb=on,skip-l1dfl-vmentry=on,pschange-mc-no=on

(quoted diff) +0 -2
-m 3584 -overcommit mem-lock=off -smp 2,sockets=2,cores=1,threads=1
-object

memory-backend-file,id=ram-node0,mem-path=/dev/hugepages/libvirt/qemu/6-nocsupport4,share=yes,prealloc=yes,size=3758096384 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 -uuid
c7b055aa-1874-4ba9-9302-26fad866e749 -no-user-config -nodefaults
-chardev socket,id=charmonitor,fd=32,server,nowait -mon
chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew
-global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global
ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on
-kernel /vmsystems/nocsupport4/boot/vmlinuz -initrd
/vmsystems/nocsupport4/boot/initrd.img -append rootfstype=virtiofs
root=myfs  rw -device
pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2
-device
pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1
-device
pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2
-device
pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3
-device
pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4
-device
pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5
-device
pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6
-device
pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7
-device pcie-pci-bridge,id=pci.9,bus=pci.4,addr=0x0 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d
-device
ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1
-device
ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2
-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 -chardev socket,id=chr-vu-fs0,path=/var/lib/libvirt/qemu/domain-6-nocsupport4/fs0-fs.sock
-device
vhost-user-fs-pci,chardev=chr-vu-fs0,queue-size=1024,tag=myfs,bus=pci.1,addr=0x0
-netdev tap,fd=46,id=hostnet0,vhost=on,vhostfd=47 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:30:4d:ca,bus=pci.2,addr=0x0
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -chardev
socket,id=charchannel0,fd=48,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 -device ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device
i6300esb,id=watchdog0,bus=pci.9,addr=0x1 -watchdog-action reset -chardev spicevmc,id=charredir0,name=usbredir -device
usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 -chardev
spicevmc,id=charredir1,name=usbredir -device
usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 -object
rng-random,id=objrng0,filename=/dev/urandom -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny
-msg timestamp=on
root      225472 11.0  0.0 6889960 10848 ?       Sl   21:32   0:58
/usr/lib/qemu/virtiofsd --fd=32 -o
source=/vmsystems/nocsupport4,xattr,flock,no_posix_lock -o writeback

_______________________________________________
Virtio-fs mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/virtio-fs

Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK
#11 lore raw

Re: [Virtio-fs] Regression: Docker in vms broken.

Quoted 8 lines · Dr. David Alan Gilbert
Quoted 1 line · * Harry G. Coin ([email protected]) wrote:

Something changed in virtiofs, likely to do with overlay support?

Hmm I don't think we have any explicit support in for overlayfs though.

Quoted 3 lines

Docker in a vm with virtiofs as root running with kernel 5.8.0-53-generic works normally.  However, later 5.8 versions and also 5.11 versions fail with:

Hmm, so what's your last working & first failing version of 5.8 ?

I know that docker works in the VM (and has been for some months) with guest and host running kernel 5.8.0-53-generic.  At least 3 docker containers were running in the guest, and under conditions of heavy load (ceph monitors, managers and filesystem gateways).   This was the case on at least four similarly configured servers.  There is only ever one guest vm accessing the underlying files on the hosts, and no contention on the host for those files.  The FS on the host is btrfs, and xattr is enabled on virtiofsd.  As the BAR on the pci device in mainline QEMU hasn't made it into even bleeding-edge distros as yet, there is no dax. (And even after the pci bar makes it into qemu, I don't think dax will find heavy adoption until it's also supported in libvirtd and virt-manager.)

root@noc3:~# /usr/lib/qemu/virtiofsd --version
using FUSE kernel interface version 7.31

When the *host*  updated to  5.11.0-17-generic (later virtiofsd), the guest fails to run docker, erroring out as noted.

root@noc4:/vmsystems# /usr/lib/qemu/virtiofsd --version
using FUSE kernel interface version 7.32
Quoted 148 lines

Dave

Quoted 146 lines
May 18 22:00:07 nocsupport4 systemd[1]: docker.service: Scheduled
restart job, restart counter is at 2.
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.061661124-05:00" level=info msg="Starting up"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.109655841-05:00" level=info msg="detected
127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf:
/run/systemd/resolve/resolv.conf"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253580688-05:00" level=info msg="parsed
scheme: \"unix\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253663917-05:00" level=info msg="scheme
\"unix\" not registered, fallback to default scheme" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:

time="2021-05-18T22:00:10.253737208-05:00" level=info msg="ccResolverWrapper: sending update to cc:
{[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc

May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.253777767-05:00" level=info msg="ClientConn
switching balancer to \"pick_first\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272602278-05:00" level=info msg="parsed
scheme: \"unix\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272713227-05:00" level=info msg="scheme
\"unix\" not registered, fallback to default scheme" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:

time="2021-05-18T22:00:10.272778900-05:00" level=info msg="ccResolverWrapper: sending update to cc:
{[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}" module=grpc

May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.272816740-05:00" level=info msg="ClientConn
switching balancer to \"pick_first\"" module=grpc
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.367601799-05:00" level=error msg="failed to
mount overlay: invalid argument" storage-driver=overlay2
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.367792469-05:00" level=error
msg="[graphdriver] prior storage driver overlay2 failed: driver not
supported"
May 18 22:00:10 nocsupport4 dockerd[1104]:
time="2021-05-18T22:00:10.370914131-05:00" level=info msg="stopping
event stream following graceful shutdown" error="context canceled"
module=libcontainerd namespace=plugins.moby
May 18 22:00:10 nocsupport4 dockerd[1104]: failed to start daemon: error
initializing graphdriver: driver not supported
May 18 22:00:10 nocsupport4 systemd[1]: docker.service: Main process
exited, code=exited, status=1/FAILURE
May 18 22:00:10 nocsupport4 systemd[1]: docker.service: Failed with

result 'exit-code'.

root@nocsupport4:~# cat /etc/fstab
myfs / virtiofs defaults 0 0

On the host:

root@noc4:/vmsystems# uname -a
Linux noc4.xxxx 5.11.0-17-generic

root      225434  0.0  0.0  80068  3544 ?        Sl   21:32   0:00 /usr/lib/qemu/virtiofsd --fd=32 -o source=/vmsystems/nocsupport4,xattr,flock,no_posix_lock -o writeback
libvirt+  225458 85.5  0.7 4366196 236724 ?      Sl   21:32   7:34 /usr/bin/qemu-system-x86_64 -name guest=nocsupport4,debug-threads=on -S
-object secret,id=masterKey0,format=raw,file=/var/lib/libvirt/qemu/domain-6-nocsupport4/master-key.aes

(quoted diff) +0 -2
-machine pc-q35-5.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off
-cpu

Conroe,vme=on,vmx=on,cx16=on,pdcm=on,x2apic=on,tsc-deadline=on,hypervisor=on,arat=on,tsc-adjust=on,arch-capabilities=on,pdpe1gb=on,skip-l1dfl-vmentry=on,pschange-mc-no=on

(quoted diff) +0 -2
-m 3584 -overcommit mem-lock=off -smp 2,sockets=2,cores=1,threads=1
-object

memory-backend-file,id=ram-node0,mem-path=/dev/hugepages/libvirt/qemu/6-nocsupport4,share=yes,prealloc=yes,size=3758096384 -numa node,nodeid=0,cpus=0-1,memdev=ram-node0 -uuid
c7b055aa-1874-4ba9-9302-26fad866e749 -no-user-config -nodefaults
-chardev socket,id=charmonitor,fd=32,server,nowait -mon
chardev=charmonitor,id=monitor,mode=control -rtc base=utc,driftfix=slew
-global kvm-pit.lost_tick_policy=delay -no-hpet -no-shutdown -global
ICH9-LPC.disable_s3=1 -global ICH9-LPC.disable_s4=1 -boot strict=on
-kernel /vmsystems/nocsupport4/boot/vmlinuz -initrd
/vmsystems/nocsupport4/boot/initrd.img -append rootfstype=virtiofs
root=myfs  rw -device
pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2
-device
pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1
-device
pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2
-device
pcie-root-port,port=0x13,chassis=4,id=pci.4,bus=pcie.0,addr=0x2.0x3
-device
pcie-root-port,port=0x14,chassis=5,id=pci.5,bus=pcie.0,addr=0x2.0x4
-device
pcie-root-port,port=0x15,chassis=6,id=pci.6,bus=pcie.0,addr=0x2.0x5
-device
pcie-root-port,port=0x16,chassis=7,id=pci.7,bus=pcie.0,addr=0x2.0x6
-device
pcie-root-port,port=0x17,chassis=8,id=pci.8,bus=pcie.0,addr=0x2.0x7
-device pcie-pci-bridge,id=pci.9,bus=pci.4,addr=0x0 -device ich9-usb-ehci1,id=usb,bus=pcie.0,addr=0x1d.0x7 -device ich9-usb-uhci1,masterbus=usb.0,firstport=0,bus=pcie.0,multifunction=on,addr=0x1d
-device
ich9-usb-uhci2,masterbus=usb.0,firstport=2,bus=pcie.0,addr=0x1d.0x1
-device
ich9-usb-uhci3,masterbus=usb.0,firstport=4,bus=pcie.0,addr=0x1d.0x2
-device virtio-serial-pci,id=virtio-serial0,bus=pci.3,addr=0x0 -chardev socket,id=chr-vu-fs0,path=/var/lib/libvirt/qemu/domain-6-nocsupport4/fs0-fs.sock
-device
vhost-user-fs-pci,chardev=chr-vu-fs0,queue-size=1024,tag=myfs,bus=pci.1,addr=0x0
-netdev tap,fd=46,id=hostnet0,vhost=on,vhostfd=47 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:30:4d:ca,bus=pci.2,addr=0x0
-chardev pty,id=charserial0 -device
isa-serial,chardev=charserial0,id=serial0 -chardev
socket,id=charchannel0,fd=48,server,nowait -device virtserialport,bus=virtio-serial0.0,nr=1,chardev=charchannel0,id=channel0,name=org.qemu.guest_agent.0 -chardev spicevmc,id=charchannel1,name=vdagent -device virtserialport,bus=virtio-serial0.0,nr=2,chardev=charchannel1,id=channel1,name=com.redhat.spice.0 -device usb-tablet,id=input0,bus=usb.0,port=1 -spice port=5900,addr=127.0.0.1,disable-ticketing,seamless-migration=on -device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vram64_size_mb=0,vgamem_mb=16,max_outputs=1,bus=pcie.0,addr=0x1 -device ich9-intel-hda,id=sound0,bus=pcie.0,addr=0x1b -device hda-duplex,id=sound0-codec0,bus=sound0.0,cad=0 -device
i6300esb,id=watchdog0,bus=pci.9,addr=0x1 -watchdog-action reset -chardev spicevmc,id=charredir0,name=usbredir -device
usb-redir,chardev=charredir0,id=redir0,bus=usb.0,port=2 -chardev
spicevmc,id=charredir1,name=usbredir -device
usb-redir,chardev=charredir1,id=redir1,bus=usb.0,port=3 -device virtio-balloon-pci,id=balloon0,bus=pci.5,addr=0x0 -object
rng-random,id=objrng0,filename=/dev/urandom -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pci.6,addr=0x0 -sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,resourcecontrol=deny
-msg timestamp=on
root      225472 11.0  0.0 6889960 10848 ?       Sl   21:32   0:58
/usr/lib/qemu/virtiofsd --fd=32 -o
source=/vmsystems/nocsupport4,xattr,flock,no_posix_lock -o writeback

_______________________________________________
Virtio-fs mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/virtio-fs

#12 lore raw
In reply to Vivek Goyal
Quoted 11 lines · * Vivek Goyal ([email protected]) wrote:

Hi,

This is V2 of the patches. Changes since V1 are.

- Took care of coding style issue.
- Got rid of label "err" completely in last patch. (Dave, Connor).
- Captured Reviewed-by tags from Connor and David.

Code in virtio_send_data_iov() little twisted and complicated. This patch series just tries to simplify it a bit to make it little easier to read this piece of code.

Queued

Quoted 20 lines

Thanks
Vivek

Vivek Goyal (7):
virtiofsd: Check for EINTR in preadv() and retry
virtiofsd: Get rid of unreachable code in read
virtiofsd: Use iov_discard_front() to skip bytes
virtiofsd: get rid of in_sg_left variable
virtiofsd: Simplify skip byte logic
virtiofsd: Check EOF before short read
virtiofsd: Set req->reply_sent right after sending reply

 tools/virtiofsd/fuse_virtio.c | 81 +++++++++++------------------------
 1 file changed, 25 insertions(+), 56 deletions(-)
Signature · 1 line
2.25.4
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK