|
|
7711c0 |
From 1abf2fdfb42f49715458e6b3c01b431c9522926a Mon Sep 17 00:00:00 2001
|
|
|
7711c0 |
From: John Snow <jsnow@redhat.com>
|
|
|
7711c0 |
Date: Tue, 9 Oct 2018 22:14:31 +0200
|
|
|
7711c0 |
Subject: [PATCH 01/22] nbd/server: fix NBD_CMD_CACHE
|
|
|
7711c0 |
|
|
|
7711c0 |
RH-Author: John Snow <jsnow@redhat.com>
|
|
|
7711c0 |
Message-id: <20181009221432.18359-2-jsnow@redhat.com>
|
|
|
7711c0 |
Patchwork-id: 82508
|
|
|
7711c0 |
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 1/2] nbd/server: fix NBD_CMD_CACHE
|
|
|
7711c0 |
Bugzilla: 1636148
|
|
|
7711c0 |
RH-Acked-by: Eric Blake <eblake@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
7711c0 |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
We should not go to structured-read branch on CACHE command, fix that.
|
|
|
7711c0 |
|
|
|
7711c0 |
Bug introduced in bc37b06a5cde24 "nbd/server: introduce NBD_CMD_CACHE"
|
|
|
7711c0 |
with the whole feature and affects 3.0.0 release.
|
|
|
7711c0 |
|
|
|
7711c0 |
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
|
|
|
7711c0 |
CC: qemu-stable@nongnu.org
|
|
|
7711c0 |
Message-Id: <20181003144738.70670-1-vsementsov@virtuozzo.com>
|
|
|
7711c0 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
7711c0 |
[eblake: commit message typo fix]
|
|
|
7711c0 |
Signed-off-by: Eric Blake <eblake@redhat.com>
|
|
|
7711c0 |
(cherry picked from commit 2f454defc23e1be78f2a96bad2877ce7829f61b4)
|
|
|
7711c0 |
Signed-off-by: John Snow <jsnow@redhat.com>
|
|
|
7711c0 |
|
|
|
7711c0 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
7711c0 |
---
|
|
|
7711c0 |
nbd/server.c | 3 ++-
|
|
|
7711c0 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
7711c0 |
|
|
|
7711c0 |
diff --git a/nbd/server.c b/nbd/server.c
|
|
|
7711c0 |
index ea5fe0e..1ce3f44 100644
|
|
|
7711c0 |
--- a/nbd/server.c
|
|
|
7711c0 |
+++ b/nbd/server.c
|
|
|
7711c0 |
@@ -2135,7 +2135,8 @@ static coroutine_fn int nbd_do_cmd_read(NBDClient *client, NBDRequest *request,
|
|
|
7711c0 |
}
|
|
|
7711c0 |
|
|
|
7711c0 |
if (client->structured_reply && !(request->flags & NBD_CMD_FLAG_DF) &&
|
|
|
7711c0 |
- request->len) {
|
|
|
7711c0 |
+ request->len && request->type != NBD_CMD_CACHE)
|
|
|
7711c0 |
+ {
|
|
|
7711c0 |
return nbd_co_send_sparse_read(client, request->handle, request->from,
|
|
|
7711c0 |
data, request->len, errp);
|
|
|
7711c0 |
}
|
|
|
7711c0 |
--
|
|
|
7711c0 |
1.8.3.1
|
|
|
7711c0 |
|