]> www.infradead.org Git - users/dwmw2/qemu.git/commit
nbd/server: Optimize final chunk of sparse read
authorEric Blake <eblake@redhat.com>
Tue, 7 Nov 2017 03:09:12 +0000 (21:09 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 8 Jan 2018 15:12:23 +0000 (09:12 -0600)
commite2de3256c373fe32c7a7d9ef2f2093c643bb6656
tree524aa4ff19872df73605600015ab6a597da2864b
parent418638d3e448e0ed79d55cc43a26f7a65c22007f
nbd/server: Optimize final chunk of sparse read

If we are careful to handle 0-length read requests correctly,
we can optimize our sparse read to send the NBD_REPLY_FLAG_DONE
bit on our last OFFSET_DATA or OFFSET_HOLE chunk rather than
needing a separate chunk.

Signed-off-by: Eric Blake <eblake@redhat.com>
Message-Id: <20171107030912.23930-3-eblake@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
nbd/server.c