diff options
author | Eric Blake <eblake@redhat.com> | 2016-07-15 12:32:03 -0600 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2016-07-20 14:11:54 +0100 |
commit | 1e2a77a851b3369799272c8e77c07995a1a2e579 (patch) | |
tree | bee7bd5e7861a104c6b787997a333be0d660eef2 /nbd | |
parent | fb1a6de14ab353baa4bc3dfb777e662a26045ca9 (diff) |
nbd: Drop unused offset parameter
Now that NBD relies on the block layer to fragment things, we no
longer need to track an offset argument for which fragment of
a request we are actually servicing.
While at it, use true and false instead of 0 and 1 for a bool
parameter.
Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1468607524-19021-6-git-send-email-eblake@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'nbd')
-rw-r--r-- | nbd/common.c | 5 | ||||
-rw-r--r-- | nbd/nbd-internal.h | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/nbd/common.c b/nbd/common.c index 8ddb2dd2f0..b583a4f4cf 100644 --- a/nbd/common.c +++ b/nbd/common.c @@ -23,7 +23,6 @@ ssize_t nbd_wr_syncv(QIOChannel *ioc, struct iovec *iov, size_t niov, - size_t offset, size_t length, bool do_read) { @@ -33,9 +32,7 @@ ssize_t nbd_wr_syncv(QIOChannel *ioc, struct iovec *local_iov_head = local_iov; unsigned int nlocal_iov = niov; - nlocal_iov = iov_copy(local_iov, nlocal_iov, - iov, niov, - offset, length); + nlocal_iov = iov_copy(local_iov, nlocal_iov, iov, niov, 0, length); while (nlocal_iov > 0) { ssize_t len; diff --git a/nbd/nbd-internal.h b/nbd/nbd-internal.h index 26a9f4d9fd..93a6ca8549 100644 --- a/nbd/nbd-internal.h +++ b/nbd/nbd-internal.h @@ -101,14 +101,14 @@ static inline ssize_t read_sync(QIOChannel *ioc, void *buffer, size_t size) * our request/reply. Synchronization is done with recv_coroutine, so * that this is coroutine-safe. */ - return nbd_wr_syncv(ioc, &iov, 1, 0, size, true); + return nbd_wr_syncv(ioc, &iov, 1, size, true); } static inline ssize_t write_sync(QIOChannel *ioc, void *buffer, size_t size) { struct iovec iov = { .iov_base = buffer, .iov_len = size }; - return nbd_wr_syncv(ioc, &iov, 1, 0, size, false); + return nbd_wr_syncv(ioc, &iov, 1, size, false); } struct NBDTLSHandshakeData { |