[Devel] [PATCH] fs/fuse: disable optimization fuse and kio_pcs in debug kernel

Pavel Butsykin pbutsykin at virtuozzo.com
Fri Jun 8 12:34:55 MSK 2018


Signed-off-by: Pavel Butsykin <pbutsykin at virtuozzo.com>
---
 configs/kernel-3.10.0-x86_64-debug.config |  2 ++
 fs/fuse/Kconfig                           |  6 ++++++
 fs/fuse/Makefile                          | 22 ++++++++++++++++++++++
 3 files changed, 30 insertions(+)

diff --git a/configs/kernel-3.10.0-x86_64-debug.config b/configs/kernel-3.10.0-x86_64-debug.config
index b31047705216..6c9c28203443 100644
--- a/configs/kernel-3.10.0-x86_64-debug.config
+++ b/configs/kernel-3.10.0-x86_64-debug.config
@@ -6100,6 +6100,8 @@ CONFIG_FUSE_KIO_NOOP=m
 CONFIG_FUSE_KIO_NULLIO=m
 CONFIG_FUSE_KIO_PCS=m
 
+CONFIG_FUSE_KIO_DEBUG=y
+
 #
 # User resources
 #
diff --git a/fs/fuse/Kconfig b/fs/fuse/Kconfig
index 433a39957c9d..7b61c6fe2d8d 100644
--- a/fs/fuse/Kconfig
+++ b/fs/fuse/Kconfig
@@ -45,3 +45,9 @@ config FUSE_KIO_PCS
 	depends on FUSE_FS
 	help
 	  This FUSE extension allows to forward io requests directly to PCS
+
+config FUSE_KIO_DEBUG
+	bool "Disable optimization for fuse kdirect PCS"
+	depends on DEBUG_KERNEL && FUSE_FS
+	help
+ 	  Say Y if you want to disable optimization for fuse and fuse_kio_pcs modules.
diff --git a/fs/fuse/Makefile b/fs/fuse/Makefile
index cdefac9c4fbe..6d02013ed27a 100644
--- a/fs/fuse/Makefile
+++ b/fs/fuse/Makefile
@@ -2,6 +2,28 @@
 # Makefile for the FUSE filesystem.
 #
 
+ifdef CONFIG_FUSE_KIO_DEBUG
+CFLAGS_fuse.o := -DDEBUG -O0
+CFLAGS_cuse.o := -DDEBUG -O0
+CFLAGS_dev.o := -DDEBUG -O0
+CFLAGS_dir.o := -DDEBUG -O0
+CFLAGS_file.o := -DDEBUG -O0
+CFLAGS_inode.o := -DDEBUG -O0
+CFLAGS_control.o := -DDEBUG -O0
+
+CFLAGS_kio_noop.o := -DDEBUG -O0
+CFLAGS_kio_nullio.o := -DDEBUG -O0
+CFLAGS_pcs_fuse_kdirect.o := -DDEBUG -O0
+CFLAGS_pcs_sock_io.o := -DDEBUG -O0
+CFLAGS_pcs_rpc.o := -DDEBUG -O0
+CFLAGS_pcs_req.o := -DDEBUG -O0
+CFLAGS_pcs_map.o := -DDEBUG -O0
+CFLAGS_pcs_cluster.o := -DDEBUG -O0
+CFLAGS_pcs_cluster_core.o := -DDEBUG -O0
+CFLAGS_pcs_cs.o := -DDEBUG -O0
+CFLAGS_fuse_io.o := -DDEBUG -O0
+endif
+
 obj-$(CONFIG_FUSE_FS) += fuse.o
 obj-$(CONFIG_CUSE) += cuse.o
 
-- 
2.15.1



More information about the Devel mailing list