|
|
ddf19c |
From fe031dbbf5e287f64de9fcc9aec361e8ab492109 Mon Sep 17 00:00:00 2001
|
|
|
ddf19c |
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
|
|
|
ddf19c |
Date: Mon, 27 Jan 2020 19:02:24 +0100
|
|
|
ddf19c |
Subject: [PATCH 113/116] virtiofsd/passthrough_ll: Pass errno to
|
|
|
ddf19c |
fuse_reply_err()
|
|
|
ddf19c |
MIME-Version: 1.0
|
|
|
ddf19c |
Content-Type: text/plain; charset=UTF-8
|
|
|
ddf19c |
Content-Transfer-Encoding: 8bit
|
|
|
ddf19c |
|
|
|
ddf19c |
RH-Author: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
ddf19c |
Message-id: <20200127190227.40942-110-dgilbert@redhat.com>
|
|
|
ddf19c |
Patchwork-id: 93559
|
|
|
ddf19c |
O-Subject: [RHEL-AV-8.2 qemu-kvm PATCH 109/112] virtiofsd/passthrough_ll: Pass errno to fuse_reply_err()
|
|
|
ddf19c |
Bugzilla: 1694164
|
|
|
ddf19c |
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
|
|
|
ddf19c |
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
ddf19c |
RH-Acked-by: Sergio Lopez Pascual <slp@redhat.com>
|
|
|
ddf19c |
|
|
|
ddf19c |
From: Xiao Yang <yangx.jy@cn.fujitsu.com>
|
|
|
ddf19c |
|
|
|
ddf19c |
lo_copy_file_range() passes -errno to fuse_reply_err() and then fuse_reply_err()
|
|
|
ddf19c |
changes it to errno again, so that subsequent fuse_send_reply_iov_nofree() catches
|
|
|
ddf19c |
the wrong errno.(i.e. reports "fuse: bad error value: ...").
|
|
|
ddf19c |
|
|
|
ddf19c |
Make fuse_send_reply_iov_nofree() accept the correct -errno by passing errno
|
|
|
ddf19c |
directly in lo_copy_file_range().
|
|
|
ddf19c |
|
|
|
ddf19c |
Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
|
|
|
ddf19c |
Reviewed-by: Eryu Guan <eguan@linux.alibaba.com>
|
|
|
ddf19c |
|
|
|
ddf19c |
dgilbert: Sent upstream and now Merged as aa1185e153f774f1df65
|
|
|
ddf19c |
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
ddf19c |
(cherry picked from commit a931b6861e59c78d861017e9c6a9c161ff49a163)
|
|
|
ddf19c |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
ddf19c |
---
|
|
|
ddf19c |
tools/virtiofsd/passthrough_ll.c | 2 +-
|
|
|
ddf19c |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
ddf19c |
|
|
|
ddf19c |
diff --git a/tools/virtiofsd/passthrough_ll.c b/tools/virtiofsd/passthrough_ll.c
|
|
|
ddf19c |
index fc15d61..e6f2399 100644
|
|
|
ddf19c |
--- a/tools/virtiofsd/passthrough_ll.c
|
|
|
ddf19c |
+++ b/tools/virtiofsd/passthrough_ll.c
|
|
|
ddf19c |
@@ -2441,7 +2441,7 @@ static void lo_copy_file_range(fuse_req_t req, fuse_ino_t ino_in, off_t off_in,
|
|
|
ddf19c |
|
|
|
ddf19c |
res = copy_file_range(in_fd, &off_in, out_fd, &off_out, len, flags);
|
|
|
ddf19c |
if (res < 0) {
|
|
|
ddf19c |
- fuse_reply_err(req, -errno);
|
|
|
ddf19c |
+ fuse_reply_err(req, errno);
|
|
|
ddf19c |
} else {
|
|
|
ddf19c |
fuse_reply_write(req, res);
|
|
|
ddf19c |
}
|
|
|
ddf19c |
--
|
|
|
ddf19c |
1.8.3.1
|
|
|
ddf19c |
|