[v2,2/2] fs/fuse kio: add warning about jumbo chunks

Submitted by Pavel Butsykin on April 15, 2019, 9:37 a.m.

Details

Message ID 20190415093725.16014-3-pbutsykin@virtuozzo.com
State New
Series "fix jumbo chunk warning"
Headers show

Commit Message

Pavel Butsykin April 15, 2019, 9:37 a.m.
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>
---
 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 460155bc9d10..a719a8cc4c60 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -323,6 +323,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;