[Devel] [PATCH RHEL7 COMMIT] fuse: support FS_IOC_FIEMAP in i386 compat mode

Konstantin Khorenko khorenko at virtuozzo.com
Fri Apr 27 11:53:15 MSK 2018


The commit is pushed to "branch-rh7-3.10.0-693.21.1.vz7.47.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.21.1.vz7.46.7
------>
commit b55b49a5ca9b1401e400b2ea65d179d79951a4d6
Author: Alexey Kuznetsov <kuznet at virtuozzo.com>
Date:   Fri Apr 27 11:53:15 2018 +0300

    fuse: support FS_IOC_FIEMAP in i386 compat mode
    
    https://jira.sw.ru/browse/PSBM-83731
    
    Signed-off-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
---
 fs/fuse/file.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 7e22154e398c..43733920fd7e 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -3294,6 +3294,10 @@ static long fuse_file_ioctl(struct file *file, unsigned int cmd,
 static long fuse_file_compat_ioctl(struct file *file, unsigned int cmd,
 				   unsigned long arg)
 {
+	/* Paradoxically, this is how FS_IOC_FIEMAP actually supported in compat mode */
+	if (cmd == FS_IOC_FIEMAP)
+		return -ENOIOCTLCMD;
+
 	return fuse_ioctl_common(file, cmd, arg, FUSE_IOCTL_COMPAT);
 }
 


More information about the Devel mailing list