aboutsummaryrefslogtreecommitdiff
path: root/tools/virtiofsd
diff options
context:
space:
mode:
authorXiao Yang <yangx.jy@cn.fujitsu.com>2020-01-02 11:53:12 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2020-01-23 16:41:37 +0000
commita931b6861e59c78d861017e9c6a9c161ff49a163 (patch)
treeaa03ce6ce8a485d5a248f0bbf8e44955e5915cdf /tools/virtiofsd
parentfe4c15798a48143dd6b1f58d2d3cad12206ce211 (diff)
downloadqemu-a931b6861e59c78d861017e9c6a9c161ff49a163.zip
qemu-a931b6861e59c78d861017e9c6a9c161ff49a163.tar.gz
qemu-a931b6861e59c78d861017e9c6a9c161ff49a163.tar.bz2
virtiofsd/passthrough_ll: Pass errno to fuse_reply_err()
lo_copy_file_range() passes -errno to fuse_reply_err() and then fuse_reply_err() changes it to errno again, so that subsequent fuse_send_reply_iov_nofree() catches the wrong errno.(i.e. reports "fuse: bad error value: ..."). Make fuse_send_reply_iov_nofree() accept the correct -errno by passing errno directly in lo_copy_file_range(). Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> Reviewed-by: Eryu Guan <eguan@linux.alibaba.com> dgilbert: Sent upstream and now Merged as aa1185e153f774f1df65 Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools/virtiofsd')
-rw-r--r--tools/virtiofsd/passthrough_ll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index fc15d61..e6f2399 100644
--- a/tools/virtiofsd/passthrough_ll.c
+++ b/tools/virtiofsd/passthrough_ll.c
@@ -2441,7 +2441,7 @@ static void lo_copy_file_range(fuse_req_t req, fuse_ino_t ino_in, off_t off_in,
res = copy_file_range(in_fd, &off_in, out_fd, &off_out, len, flags);
if (res < 0) {
- fuse_reply_err(req, -errno);
+ fuse_reply_err(req, errno);
} else {
fuse_reply_write(req, res);
}