* [Virtio-fs] [PATCH v2 0/7] virtiofsd: Few cleanups in virtio_send_data_iov() @ 2021-05-18 21:35 ` Vivek Goyal 0 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: vgoyal 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(-) -- 2.25.4 ^ permalink raw reply [flat|nested] 22+ messages in thread
* [PATCH v2 0/7] virtiofsd: Few cleanups in virtio_send_data_iov() @ 2021-05-18 21:35 ` Vivek Goyal 0 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: ckuehl, dgilbert, vgoyal 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(-) -- 2.25.4 ^ permalink raw reply [flat|nested] 22+ messages in thread
* [Virtio-fs] [PATCH v2 1/7] virtiofsd: Check for EINTR in preadv() and retry 2021-05-18 21:35 ` Vivek Goyal @ 2021-05-18 21:35 ` Vivek Goyal -1 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: vgoyal 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. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 9efdbd8ffd..755d7fb25c 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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; -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 1/7] virtiofsd: Check for EINTR in preadv() and retry @ 2021-05-18 21:35 ` Vivek Goyal 0 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: ckuehl, dgilbert, vgoyal 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. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 9efdbd8ffd..755d7fb25c 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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; -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Virtio-fs] [PATCH v2 2/7] virtiofsd: Get rid of unreachable code in read 2021-05-18 21:35 ` Vivek Goyal @ 2021-05-18 21:35 ` Vivek Goyal -1 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: vgoyal 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. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 755d7fb25c..28e2974d1a 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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); -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 2/7] virtiofsd: Get rid of unreachable code in read @ 2021-05-18 21:35 ` Vivek Goyal 0 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: ckuehl, dgilbert, vgoyal 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. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 755d7fb25c..28e2974d1a 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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); -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Virtio-fs] [PATCH v2 3/7] virtiofsd: Use iov_discard_front() to skip bytes 2021-05-18 21:35 ` Vivek Goyal @ 2021-05-18 21:35 ` Vivek Goyal -1 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: vgoyal 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. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 28e2974d1a..09674f2e90 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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; -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 3/7] virtiofsd: Use iov_discard_front() to skip bytes @ 2021-05-18 21:35 ` Vivek Goyal 0 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: ckuehl, dgilbert, vgoyal 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. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 28e2974d1a..09674f2e90 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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; -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Virtio-fs] [PATCH v2 4/7] virtiofsd: get rid of in_sg_left variable 2021-05-18 21:35 ` Vivek Goyal @ 2021-05-18 21:35 ` Vivek Goyal -1 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: vgoyal 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. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 09674f2e90..ed5146d7a6 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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) { -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 4/7] virtiofsd: get rid of in_sg_left variable @ 2021-05-18 21:35 ` Vivek Goyal 0 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: ckuehl, dgilbert, vgoyal 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. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 09674f2e90..ed5146d7a6 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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) { -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Virtio-fs] [PATCH v2 5/7] virtiofsd: Simplify skip byte logic 2021-05-18 21:35 ` Vivek Goyal @ 2021-05-18 21:35 ` Vivek Goyal -1 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: vgoyal 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. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index ed5146d7a6..49c7dd788a 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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; -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 5/7] virtiofsd: Simplify skip byte logic @ 2021-05-18 21:35 ` Vivek Goyal 0 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: ckuehl, dgilbert, vgoyal 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. Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index ed5146d7a6..49c7dd788a 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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; -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Virtio-fs] [PATCH v2 6/7] virtiofsd: Check EOF before short read 2021-05-18 21:35 ` Vivek Goyal @ 2021-05-18 21:35 ` Vivek Goyal -1 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: vgoyal 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". Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 49c7dd788a..99f91c9d87 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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 */ -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 6/7] virtiofsd: Check EOF before short read @ 2021-05-18 21:35 ` Vivek Goyal 0 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: ckuehl, dgilbert, vgoyal 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". Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 49c7dd788a..99f91c9d87 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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 */ -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Virtio-fs] [PATCH v2 7/7] virtiofsd: Set req->reply_sent right after sending reply 2021-05-18 21:35 ` Vivek Goyal @ 2021-05-18 21:35 ` Vivek Goyal -1 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: vgoyal 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". Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 99f91c9d87..fa4aff9b0e 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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; -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [PATCH v2 7/7] virtiofsd: Set req->reply_sent right after sending reply @ 2021-05-18 21:35 ` Vivek Goyal 0 siblings, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-18 21:35 UTC (permalink / raw) To: qemu-devel, virtio-fs; +Cc: ckuehl, dgilbert, vgoyal 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". Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Signed-off-by: Vivek Goyal <vgoyal@redhat.com> --- tools/virtiofsd/fuse_virtio.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/tools/virtiofsd/fuse_virtio.c b/tools/virtiofsd/fuse_virtio.c index 99f91c9d87..fa4aff9b0e 100644 --- a/tools/virtiofsd/fuse_virtio.c +++ b/tools/virtiofsd/fuse_virtio.c @@ -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; -- 2.25.4 ^ permalink raw reply related [flat|nested] 22+ messages in thread
* [Virtio-fs] Regression: Docker in vms broken. 2021-05-18 21:35 ` Vivek Goyal (?) @ 2021-05-19 13:35 ` Harry G. Coin 2021-05-19 16:17 ` Vivek Goyal 2021-05-19 16:39 ` Dr. David Alan Gilbert -1 siblings, 2 replies; 22+ messages in thread From: Harry G. Coin @ 2021-05-19 13:35 UTC (permalink / raw) To: virtio-fs 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 ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Virtio-fs] Regression: Docker in vms broken. 2021-05-19 13:35 ` [Virtio-fs] Regression: Docker in vms broken Harry G. Coin @ 2021-05-19 16:17 ` Vivek Goyal 2021-05-19 16:39 ` Dr. David Alan Gilbert 1 sibling, 0 replies; 22+ messages in thread From: Vivek Goyal @ 2021-05-19 16:17 UTC (permalink / raw) To: Harry G. Coin; +Cc: virtio-fs On Wed, May 19, 2021 at 08:35:59AM -0500, Harry G. Coin wrote: > 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 > > 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 > > > > > > > _______________________________________________ > Virtio-fs mailing list > Virtio-fs@redhat.com > https://listman.redhat.com/mailman/listinfo/virtio-fs ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Virtio-fs] Regression: Docker in vms broken. 2021-05-19 13:35 ` [Virtio-fs] Regression: Docker in vms broken Harry G. Coin 2021-05-19 16:17 ` Vivek Goyal @ 2021-05-19 16:39 ` Dr. David Alan Gilbert 2021-05-19 21:36 ` Harry G. Coin 1 sibling, 1 reply; 22+ messages in thread From: Dr. David Alan Gilbert @ 2021-05-19 16:39 UTC (permalink / raw) To: Harry G. Coin; +Cc: virtio-fs * Harry G. Coin (hgcoin@gmail.com) 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. > 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 > > 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 > > > > > > > _______________________________________________ > Virtio-fs mailing list > Virtio-fs@redhat.com > https://listman.redhat.com/mailman/listinfo/virtio-fs -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Virtio-fs] Regression: Docker in vms broken. 2021-05-19 16:39 ` Dr. David Alan Gilbert @ 2021-05-19 21:36 ` Harry G. Coin 0 siblings, 0 replies; 22+ messages in thread From: Harry G. Coin @ 2021-05-19 21:36 UTC (permalink / raw) To: Dr. David Alan Gilbert; +Cc: virtio-fs On 5/19/21 11:39 AM, Dr. David Alan Gilbert wrote: > * Harry G. Coin (hgcoin@gmail.com) 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. > >> 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 > Dave > >> 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 >> >> >> >> >> >> >> _______________________________________________ >> Virtio-fs mailing list >> Virtio-fs@redhat.com >> https://listman.redhat.com/mailman/listinfo/virtio-fs ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [Virtio-fs] [PATCH v2 0/7] virtiofsd: Few cleanups in virtio_send_data_iov() 2021-05-18 21:35 ` Vivek Goyal @ 2021-05-25 18:49 ` Dr. David Alan Gilbert -1 siblings, 0 replies; 22+ messages in thread From: Dr. David Alan Gilbert @ 2021-05-25 18:49 UTC (permalink / raw) To: Vivek Goyal; +Cc: virtio-fs, qemu-devel * Vivek Goyal (vgoyal@redhat.com) 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 > 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(-) > > -- > 2.25.4 > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PATCH v2 0/7] virtiofsd: Few cleanups in virtio_send_data_iov() @ 2021-05-25 18:49 ` Dr. David Alan Gilbert 0 siblings, 0 replies; 22+ messages in thread From: Dr. David Alan Gilbert @ 2021-05-25 18:49 UTC (permalink / raw) To: Vivek Goyal; +Cc: virtio-fs, ckuehl, qemu-devel * Vivek Goyal (vgoyal@redhat.com) 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 > 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(-) > > -- > 2.25.4 > > -- Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK ^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2021-05-25 18:51 UTC | newest] Thread overview: 22+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-05-18 21:35 [Virtio-fs] [PATCH v2 0/7] virtiofsd: Few cleanups in virtio_send_data_iov() Vivek Goyal 2021-05-18 21:35 ` Vivek Goyal 2021-05-18 21:35 ` [Virtio-fs] [PATCH v2 1/7] virtiofsd: Check for EINTR in preadv() and retry Vivek Goyal 2021-05-18 21:35 ` Vivek Goyal 2021-05-18 21:35 ` [Virtio-fs] [PATCH v2 2/7] virtiofsd: Get rid of unreachable code in read Vivek Goyal 2021-05-18 21:35 ` Vivek Goyal 2021-05-18 21:35 ` [Virtio-fs] [PATCH v2 3/7] virtiofsd: Use iov_discard_front() to skip bytes Vivek Goyal 2021-05-18 21:35 ` Vivek Goyal 2021-05-18 21:35 ` [Virtio-fs] [PATCH v2 4/7] virtiofsd: get rid of in_sg_left variable Vivek Goyal 2021-05-18 21:35 ` Vivek Goyal 2021-05-18 21:35 ` [Virtio-fs] [PATCH v2 5/7] virtiofsd: Simplify skip byte logic Vivek Goyal 2021-05-18 21:35 ` Vivek Goyal 2021-05-18 21:35 ` [Virtio-fs] [PATCH v2 6/7] virtiofsd: Check EOF before short read Vivek Goyal 2021-05-18 21:35 ` Vivek Goyal 2021-05-18 21:35 ` [Virtio-fs] [PATCH v2 7/7] virtiofsd: Set req->reply_sent right after sending reply Vivek Goyal 2021-05-18 21:35 ` Vivek Goyal 2021-05-19 13:35 ` [Virtio-fs] Regression: Docker in vms broken Harry G. Coin 2021-05-19 16:17 ` Vivek Goyal 2021-05-19 16:39 ` Dr. David Alan Gilbert 2021-05-19 21:36 ` Harry G. Coin 2021-05-25 18:49 ` [Virtio-fs] [PATCH v2 0/7] virtiofsd: Few cleanups in virtio_send_data_iov() Dr. David Alan Gilbert 2021-05-25 18:49 ` Dr. David Alan Gilbert
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.