[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250421013346.32530-20-john@groves.net>
Date: Sun, 20 Apr 2025 20:33:46 -0500
From: John Groves <John@...ves.net>
To: John Groves <John@...ves.net>,
Dan Williams <dan.j.williams@...el.com>,
Miklos Szeredi <miklos@...redb.hu>,
Bernd Schubert <bschubert@....com>
Cc: John Groves <jgroves@...ron.com>,
Jonathan Corbet <corbet@....net>,
Vishal Verma <vishal.l.verma@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
Matthew Wilcox <willy@...radead.org>,
Jan Kara <jack@...e.cz>,
Alexander Viro <viro@...iv.linux.org.uk>,
Christian Brauner <brauner@...nel.org>,
"Darrick J . Wong" <djwong@...nel.org>,
Luis Henriques <luis@...lia.com>,
Randy Dunlap <rdunlap@...radead.org>,
Jeff Layton <jlayton@...nel.org>,
Kent Overstreet <kent.overstreet@...ux.dev>,
Petr Vorel <pvorel@...e.cz>,
Brian Foster <bfoster@...hat.com>,
linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org,
nvdimm@...ts.linux.dev,
linux-cxl@...r.kernel.org,
linux-fsdevel@...r.kernel.org,
Amir Goldstein <amir73il@...il.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Stefan Hajnoczi <shajnocz@...hat.com>,
Joanne Koong <joannelkoong@...il.com>,
Josef Bacik <josef@...icpanda.com>,
Aravind Ramesh <arramesh@...ron.com>,
Ajay Joshi <ajayjoshi@...ron.com>,
John Groves <john@...ves.net>
Subject: [RFC PATCH 19/19] famfs_fuse: (ignore) debug cruft
This debug cruft will be dropped from the "real" patch set
Signed-off-by: John Groves <john@...ves.net>
---
fs/fuse/Makefile | 2 +-
fs/fuse/dev.c | 61 ++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 62 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/Makefile b/fs/fuse/Makefile
index 65a12975d734..ad3e06a9a809 100644
--- a/fs/fuse/Makefile
+++ b/fs/fuse/Makefile
@@ -4,7 +4,7 @@
#
# Needed for trace events
-ccflags-y = -I$(src)
+ccflags-y = -I$(src) -g -DDEBUG -fno-inline -fno-omit-frame-pointer
obj-$(CONFIG_FUSE_FS) += fuse.o
obj-$(CONFIG_CUSE) += cuse.o
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 51e31df4c546..ba947511a379 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -30,6 +30,60 @@
MODULE_ALIAS_MISCDEV(FUSE_MINOR);
MODULE_ALIAS("devname:fuse");
+static char *opname[] = {
+ [FUSE_LOOKUP] = "LOOKUP",
+ [FUSE_FORGET] = "FORGET",
+ [FUSE_GETATTR] = "GETATTR",
+ [FUSE_SETATTR] = "SETATTR",
+ [FUSE_READLINK] = "READLINK",
+ [FUSE_SYMLINK] = "SYMLINK",
+ [FUSE_MKNOD] = "MKNOD",
+ [FUSE_MKDIR] = "MKDIR",
+ [FUSE_UNLINK] = "UNLINK",
+ [FUSE_RMDIR] = "RMDIR",
+ [FUSE_RENAME] = "RENAME",
+ [FUSE_LINK] = "LINK",
+ [FUSE_OPEN] = "OPEN",
+ [FUSE_READ] = "READ",
+ [FUSE_WRITE] = "WRITE",
+ [FUSE_STATFS] = "STATFS",
+ [FUSE_STATX] = "STATX",
+ [FUSE_RELEASE] = "RELEASE",
+ [FUSE_FSYNC] = "FSYNC",
+ [FUSE_SETXATTR] = "SETXATTR",
+ [FUSE_GETXATTR] = "GETXATTR",
+ [FUSE_LISTXATTR] = "LISTXATTR",
+ [FUSE_REMOVEXATTR] = "REMOVEXATTR",
+ [FUSE_FLUSH] = "FLUSH",
+ [FUSE_INIT] = "INIT",
+ [FUSE_OPENDIR] = "OPENDIR",
+ [FUSE_READDIR] = "READDIR",
+ [FUSE_RELEASEDIR] = "RELEASEDIR",
+ [FUSE_FSYNCDIR] = "FSYNCDIR",
+ [FUSE_GETLK] = "GETLK",
+ [FUSE_SETLK] = "SETLK",
+ [FUSE_SETLKW] = "SETLKW",
+ [FUSE_ACCESS] = "ACCESS",
+ [FUSE_CREATE] = "CREATE",
+ [FUSE_INTERRUPT] = "INTERRUPT",
+ [FUSE_BMAP] = "BMAP",
+ [FUSE_IOCTL] = "IOCTL",
+ [FUSE_POLL] = "POLL",
+ [FUSE_FALLOCATE] = "FALLOCATE",
+ [FUSE_DESTROY] = "DESTROY",
+ [FUSE_NOTIFY_REPLY] = "NOTIFY_REPLY",
+ [FUSE_BATCH_FORGET] = "BATCH_FORGET",
+ [FUSE_READDIRPLUS] = "READDIRPLUS",
+ [FUSE_RENAME2] = "RENAME2",
+ [FUSE_COPY_FILE_RANGE] = "COPY_FILE_RANGE",
+ [FUSE_LSEEK] = "LSEEK",
+ [CUSE_INIT] = "CUSE_INIT",
+ [FUSE_TMPFILE] = "TMPFILE",
+ [FUSE_SYNCFS] = "SYNCFS",
+ [FUSE_GET_FMAP] = "GET_FMAP",
+ [FUSE_GET_DAXDEV] = "GET_DAXDEV",
+};
+
static struct kmem_cache *fuse_req_cachep;
static void fuse_request_init(struct fuse_mount *fm, struct fuse_req *req)
@@ -566,6 +620,13 @@ ssize_t __fuse_simple_request(struct mnt_idmap *idmap,
}
fuse_put_request(req);
+ pr_debug("%s: opcode=%s (%d) nodeid=%lld out_numargs=%d len[0]=%d len[1]=%d\n",
+ __func__, opname[args->opcode], args->opcode,
+ args->nodeid,
+ args->out_numargs,
+ args->out_args[0].size,
+ (args->out_numargs > 1) ? args->out_args[1].size : 0);
+
return ret;
}
--
2.49.0
Powered by blists - more mailing lists