mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
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>
This commit is contained in:
parent
fb1a6de14a
commit
1e2a77a851
4 changed files with 19 additions and 22 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue