aboutsummaryrefslogtreecommitdiff
path: root/net/checksum.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2021-05-18 17:35:36 -0400
committerDr. David Alan Gilbert <dgilbert@redhat.com>2021-05-26 18:39:32 +0100
commitbf7a3ee04430dfe426eacf6ee587e2a069ba67ce (patch)
treebc1125995730bf3524518502235c199b9e15b22b /net/checksum.c
parent0106f6f234d6361bb99cabfa48a953c929a3ca90 (diff)
virtiofsd: Simplify skip byte logic
We need to skip bytes in two cases. a. Before we start reading into in_sg, we need to skip iov_len bytes in the beginning which typically will have fuse_out_header. b. If preadv() does a short read, then we need to retry preadv() with remainig bytes and skip the bytes preadv() read in short read. For case a, there is no reason that skipping logic be inside the while loop. Move it outside. And only retain logic "b" inside while loop. Also get rid of variable "skip_size". Looks like we can do without it. 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-6-vgoyal@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'net/checksum.c')
0 files changed, 0 insertions, 0 deletions