[RHEL7,COMMIT] fs/fuse kio: add warning about jumbo chunks

Submitted by Konstantin Khorenko on April 15, 2019, 1:36 p.m.


Message ID 201904151336.x3FDaIBQ010627@finist-ce7.sw.ru
State New
Series "fix jumbo chunk warning"
Headers show

Commit Message

Konstantin Khorenko April 15, 2019, 1:36 p.m.
The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.94.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.94.13
commit 18533eab294270ce29f8ec361ca060b3938e980e
Author: Pavel Butsykin <pbutsykin@virtuozzo.com>
Date:   Mon Apr 15 16:36:18 2019 +0300

    fs/fuse kio: add warning about jumbo chunks
    KIO doesn't support jumbo chunks yet, so all requests to jumbo chunks are
    silently redirected to user-space. It will be useful to see a message about
    this until support has been added to KIO.
    Signed-off-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
    Acked-by: Alexey Kuznetsov <kuznet@virtuozzo.com>
    Patchset description:
    fix jumbo chunk warning
    Initially the warning was added incorrectly due to unsynchronization of
    pcs_mds_sys_info structure with the userspace client. Let's sync the structure
    and fix that.
    Pavel Butsykin (2):
      fs/fuse kio: sync pcs_mds_sys_info struct
      fs/fuse kio: add warning about jumbo chunks
 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 6 ++++++
 1 file changed, 6 insertions(+)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index 01f267ee1906..1e60e285d199 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -332,6 +332,12 @@  static int kpcs_do_file_open(struct fuse_conn *fc, struct file *file, struct ino
 		return 0;
+	if (info.sys.chunk_size_hi) {
+		TRACE("Unsupported chunk_size_hi:%x\n", info.sys.chunk_size_hi);
+		pr_warn_once("kio: fpath doesn't support jumbo chunks\n");
+		return 0;
+	}
 	di = kzalloc(sizeof(*di), GFP_KERNEL);
 	if (!di)
 		return -ENOMEM;