[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 106/108] virtiofsd/passthrough_ll: Pass errno to fuse_reply_err()
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 106/108] virtiofsd/passthrough_ll: Pass errno to fuse_reply_err() |
Date: |
Thu, 23 Jan 2020 16:46:28 +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
Signed-off-by: Dr. David Alan Gilbert <address@hidden>
---
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 fc15d61510..e6f2399efc 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
- [PULL 096/108] virtiofsd: Reset O_DIRECT flag during file open, (continued)
- [PULL 096/108] virtiofsd: Reset O_DIRECT flag during file open, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 095/108] virtiofsd: convert more fprintf and perror to use fuse log infra, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 094/108] virtiofsd: do not always set FUSE_FLOCK_LOCKS, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 093/108] virtiofsd: introduce inode refcount to prevent use-after-free, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 098/108] virtiofsd: passthrough_ll: Use cache_readdir for directory open, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 099/108] virtiofsd: add definition of fuse_buf_writev(), Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 100/108] virtiofsd: use fuse_buf_writev to replace fuse_buf_write for better performance, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 105/108] virtiofsd: Convert lo_destroy to take the lo->mutex lock itself, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 102/108] virtiofsd: prevent FUSE_INIT/FUSE_DESTROY races, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 101/108] virtiofsd: process requests in a thread pool, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 106/108] virtiofsd/passthrough_ll: Pass errno to fuse_reply_err(),
Dr. David Alan Gilbert (git) <=
- [PULL 104/108] virtiofsd: add --thread-pool-size=NUM option, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 108/108] virtiofsd: add some options to the help message, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 103/108] virtiofsd: fix lo_destroy() resource leaks, Dr. David Alan Gilbert (git), 2020/01/23
- [PULL 107/108] virtiofsd: stop all queue threads on exit in virtio_loop(), Dr. David Alan Gilbert (git), 2020/01/23
- Re: [PULL 000/108] virtiofs queue, Dr. David Alan Gilbert, 2020/01/23
- Re: [PULL 000/108] virtiofs queue, no-reply, 2020/01/23