[Qemu-devel] [PATCH v2 0/4] 9pfs: handle transport errors

Greg Kurz posted 4 patches 6 years, 12 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/149328633283.30266.4224847428546759127.stgit@bahia
Test checkpatch failed
Test docker passed
Test s390x passed
There is a newer version of this series
fsdev/9p-iov-marshal.c     |    4 ++-
hw/9pfs/9p.c               |   52 ++++++++++++++++++++++++++++++++------------
hw/9pfs/9p.h               |    1 +
hw/9pfs/virtio-9p-device.c |   51 +++++++++++++++++++++++++++++--------------
4 files changed, 75 insertions(+), 33 deletions(-)
[Qemu-devel] [PATCH v2 0/4] 9pfs: handle transport errors
Posted by Greg Kurz 6 years, 12 months ago
The 9p protocol relies on a reliable transport, but the current code
treats transport errors (ie, failure to marshal or unmarshal) as if
they were coming from the backend. This doesn't make sense: if the
transport failed, we should notify the guest that the transport is
broken and needs to be reset, using transport specific means.

This series modifies the existing virtio-9p transport so that it can
notify the guest about transport failures. The core 9p code is modified
as well so that it stops handling requests when the transport fails.

Changes since v1:
- dropped the "virtio: Error object based virtio_error()" patch
- see patches for detailed changes

--
Greg

---

Greg Kurz (4):
      fsdev: don't allow unknown format in marshal/unmarshal
      9pfs: drop pdu_push_and_notify()
      virtio-9p: factor out virtio_9p_error_err()
      9pfs: handle broken transport


 fsdev/9p-iov-marshal.c     |    4 ++-
 hw/9pfs/9p.c               |   52 ++++++++++++++++++++++++++++++++------------
 hw/9pfs/9p.h               |    1 +
 hw/9pfs/virtio-9p-device.c |   51 +++++++++++++++++++++++++++++--------------
 4 files changed, 75 insertions(+), 33 deletions(-)


Re: [Qemu-devel] [PATCH v2 0/4] 9pfs: handle transport errors
Posted by no-reply@patchew.org 6 years, 12 months ago
Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [Qemu-devel] [PATCH v2 0/4] 9pfs: handle transport errors
Message-id: 149328633283.30266.4224847428546759127.stgit@bahia
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
5248ba7 9pfs: handle broken transport
5a209be virtio-9p: factor out virtio_9p_error_err()
7949eeb 9pfs: drop pdu_push_and_notify()
10a5f41 fsdev: don't allow unknown format in marshal/unmarshal

=== OUTPUT BEGIN ===
Checking PATCH 1/4: fsdev: don't allow unknown format in marshal/unmarshal...
Checking PATCH 2/4: 9pfs: drop pdu_push_and_notify()...
Checking PATCH 3/4: virtio-9p: factor out virtio_9p_error_err()...
ERROR: line over 90 characters
#69: FILE: hw/9pfs/virtio-9p-device.c:69:
+            virtio_9p_error(v, pdu->idx, "The guest sent a VirtFS request without space for the reply");

ERROR: line over 90 characters
#81: FILE: hw/9pfs/virtio-9p-device.c:77:
+            virtio_9p_error(v, pdu->idx, "The guest sent a malformed VirtFS request: header size is %zd, should be 7", len);

total: 2 errors, 0 warnings, 72 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 4/4: 9pfs: handle broken transport...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org