summaryrefslogtreecommitdiff
path: root/nbd/server.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2017-10-12 12:53:09 +0300
committerEric Blake <eblake@redhat.com>2017-10-12 16:27:34 -0500
commit7b3158f951388428b2256fce13eb727a6afbd533 (patch)
tree57cab94014710a8fdd57bac646e567f2805285da /nbd/server.c
parented397b2fe7c37a8319e7ef89542447c86ebd67f8 (diff)
downloadqemu-7b3158f951388428b2256fce13eb727a6afbd533.tar.gz
nbd: rename some simple-request related objects to be _simple_
To be consistent when their _structured_ analogs will be introduced. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20171012095319.136610-4-vsementsov@virtuozzo.com> [eblake: also tweak trace message contents] Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'nbd/server.c')
-rw-r--r--nbd/server.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/nbd/server.c b/nbd/server.c
index b74cc6ab7e..ea2f0fa476 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -911,11 +911,11 @@ static int nbd_send_reply(QIOChannel *ioc, NBDReply *reply, Error **errp)
trace_nbd_send_reply(reply->error, reply->handle);
/* Reply
- [ 0 .. 3] magic (NBD_REPLY_MAGIC)
+ [ 0 .. 3] magic (NBD_SIMPLE_REPLY_MAGIC)
[ 4 .. 7] error (0 == no error)
[ 7 .. 15] handle
*/
- stl_be_p(buf, NBD_REPLY_MAGIC);
+ stl_be_p(buf, NBD_SIMPLE_REPLY_MAGIC);
stl_be_p(buf + 4, reply->error);
stq_be_p(buf + 8, reply->handle);
@@ -1208,15 +1208,15 @@ void nbd_export_close_all(void)
}
}
-static int nbd_co_send_reply(NBDRequestData *req, NBDReply *reply, int len,
- Error **errp)
+static int nbd_co_send_simple_reply(NBDRequestData *req, NBDReply *reply,
+ int len, Error **errp)
{
NBDClient *client = req->client;
int ret;
g_assert(qemu_in_coroutine());
- trace_nbd_co_send_reply(reply->handle, reply->error, len);
+ trace_nbd_co_send_simple_reply(reply->handle, reply->error, len);
qemu_co_mutex_lock(&client->send_lock);
client->send_coroutine = qemu_coroutine_self();
@@ -1465,7 +1465,7 @@ reply:
local_err = NULL;
}
- if (nbd_co_send_reply(req, &reply, reply_data_len, &local_err) < 0) {
+ if (nbd_co_send_simple_reply(req, &reply, reply_data_len, &local_err) < 0) {
error_prepend(&local_err, "Failed to send reply: ");
goto disconnect;
}