aboutsummaryrefslogtreecommitdiff
path: root/hw/9pfs/9p-synth.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-02-02 16:26:41 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-02-02 16:26:41 +0000
commitf74425e267f81f0f94adf47ecbd66224e0461936 (patch)
treeb73f3aed99966e35fac6a38126bc79882c69b396 /hw/9pfs/9p-synth.h
parentfabbd691fd7db2e71c6702089c9656e7047eac24 (diff)
parent9ea776ee7d4061c043d0fbf89aa85f86ec0cf8a2 (diff)
downloadqemu-f74425e267f81f0f94adf47ecbd66224e0461936.zip
qemu-f74425e267f81f0f94adf47ecbd66224e0461936.tar.gz
qemu-f74425e267f81f0f94adf47ecbd66224e0461936.tar.bz2
Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging
This series is mostly about 9p request cancellation. It fixes a long standing bug (read "specification violation") where the server would send an invalid response when the client has cancelled an in-flight request. This was causing annoying spurious EINTR returns in linux. The fix comes with some related testing in QTEST. Other patches are code cleanup and improvements. # gpg: Signature made Fri 02 Feb 2018 10:16:03 GMT # gpg: using RSA key 71D4D5E5822F73D6 # gpg: Good signature from "Greg Kurz <groug@kaod.org>" # gpg: aka "Gregory Kurz <gregory.kurz@free.fr>" # gpg: aka "[jpeg image of size 3330]" # Primary key fingerprint: B482 8BAF 9431 40CE F2A3 4910 71D4 D5E5 822F 73D6 * remotes/gkurz/tags/for-upstream: tests/virtio-9p: explicitly handle potential integer overflows tests: virtio-9p: add FLUSH operation test libqos/virtio: return length written into used descriptor tests: virtio-9p: add WRITE operation test tests: virtio-9p: add LOPEN operation test tests: virtio-9p: use the synth backend tests: virtio-9p: wait for completion in the test code tests: virtio-9p: move request tag to the test functions 9pfs: Correctly handle cancelled requests 9pfs: drop v9fs_register_transport() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/9pfs/9p-synth.h')
-rw-r--r--hw/9pfs/9p-synth.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/hw/9pfs/9p-synth.h b/hw/9pfs/9p-synth.h
index 49c2fc7..af7a993 100644
--- a/hw/9pfs/9p-synth.h
+++ b/hw/9pfs/9p-synth.h
@@ -49,4 +49,17 @@ int qemu_v9fs_synth_add_file(V9fsSynthNode *parent, int mode,
const char *name, v9fs_synth_read read,
v9fs_synth_write write, void *arg);
+/* qtest stuff */
+
+#define QTEST_V9FS_SYNTH_WALK_FILE "WALK%d"
+#define QTEST_V9FS_SYNTH_LOPEN_FILE "LOPEN"
+#define QTEST_V9FS_SYNTH_WRITE_FILE "WRITE"
+
+/* Any write to the "FLUSH" file is handled one byte at a time by the
+ * backend. If the byte is zero, the backend returns success (ie, 1),
+ * otherwise it forces the server to try again forever. Thus allowing
+ * the client to cancel the request.
+ */
+#define QTEST_V9FS_SYNTH_FLUSH_FILE "FLUSH"
+
#endif