qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 107/109] virtiofsd/passthrough_ll: Pass errno to fuse_reply_er


From: Dr. David Alan Gilbert (git)
Subject: [PATCH v2 107/109] virtiofsd/passthrough_ll: Pass errno to fuse_reply_err()
Date: Tue, 21 Jan 2020 12:24:31 +0000

From: Xiao Yang <address@hidden>

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 <address@hidden>
Reviewed-by: Eryu Guan <address@hidden>

dgilbert: Sent upstream and now Merged as aa1185e153f774f1df65
---
 tools/virtiofsd/passthrough_ll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
index 3c450c15b4..0666a8709d 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);
     }
-- 
2.24.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]