[Devel] [PATCH RHEL7 COMMIT] fs/fuse: initialize req->io_inode in fuse_send_unmap()
Konstantin Khorenko
khorenko at virtuozzo.com
Tue Oct 9 12:19:01 MSK 2018
The commit is pushed to "branch-rh7-3.10.0-862.14.4.vz7.72.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.14.4.vz7.72.4
------>
commit 4c75d63f0d2fab950e11b1971ae769ae1a6a5293
Author: Pavel Butsykin <pbutsykin at virtuozzo.com>
Date: Tue Oct 9 12:18:58 2018 +0300
fs/fuse: initialize req->io_inode in fuse_send_unmap()
The presence of inode in request is a prerequisite for its processing in
kio mode.
Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>
=====================
Patchset description:
Fuse: Fix IOCB_CMD_UNMAP_ITER handling to prevent cache inconsistency
https://pmc.acronis.com/browse/VSTOR-15447
Ploop can asynchronously unmap regions by sending IOCB_CMD_UNMAP_ITER, but this
command isn't quite correctly interpreted in Fuse. Moreover, in Fast-path mode,
fallocate(FALLOC_FL_PUNCH_HOLE|FALLOC_FL_ZERO_RANGE) falls to fuse user daemon
and it can lead to data corruption.
Let's fix it.
Pavel Butsykin (4):
fs/fuse: fix mutually exclusive flags in fuse_send_unmap()
fs/fuse: initialize req->io_inode in fuse_send_unmap()
fs/fuse kio_pcs: split kpcs_req_send()
fs/fuse kio_pcs: prevention of falling kio reqs to usermode
---
fs/fuse/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 0d061732dfa5..59927669b2a4 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1349,6 +1349,7 @@ static size_t fuse_send_unmap(struct fuse_req *req, struct fuse_io_priv *io,
req->in.numargs = 1;
req->in.args[0].size = sizeof(struct fuse_fallocate_in);
req->in.args[0].value = inarg;
+ req->io_inode = file_inode(file);
fuse_account_request(fc, count);
More information about the Devel
mailing list