]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtiofsd: Check EOF before short read
authorVivek Goyal <vgoyal@redhat.com>
Tue, 18 May 2021 21:35:37 +0000 (17:35 -0400)
committerDr. David Alan Gilbert <dgilbert@redhat.com>
Wed, 26 May 2021 17:39:32 +0000 (18:39 +0100)
commit1a5fff8e63a5ab55ccdec4f134b2f96453bf789f
tree03a1d8ec0e423292ae42aeb9cd18ba40e3fd48b3
parentbf7a3ee04430dfe426eacf6ee587e2a069ba67ce
virtiofsd: Check EOF before short read

In virtio_send_data_iov() we are checking first for short read and then
EOF condition. Change the order. Basically check for error and EOF first
and last remaining piece is short ready which will lead to retry
automatically at the end of while loop.

Just that it is little simpler to read to the code. There is no need
to call "continue" and also one less call of "len-=ret".

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Connor Kuehl <ckuehl@redhat.com>
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Message-Id: <20210518213538.693422-7-vgoyal@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
tools/virtiofsd/fuse_virtio.c