[Devel] [PATCH V2] fs/fuse: disable optimization fuse and kio_pcs in debug kernel
Pavel Butsykin
pbutsykin at virtuozzo.com
Fri Jun 8 13:01:39 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 := -O0
+CFLAGS_cuse.o := -O0
+CFLAGS_dev.o := -O0
+CFLAGS_dir.o := -O0
+CFLAGS_file.o := -O0
+CFLAGS_inode.o := -O0
+CFLAGS_control.o := -O0
+
+CFLAGS_kio_noop.o := -O0
+CFLAGS_kio_nullio.o := -O0
+CFLAGS_pcs_fuse_kdirect.o := -O0
+CFLAGS_pcs_sock_io.o := -O0
+CFLAGS_pcs_rpc.o := -O0
+CFLAGS_pcs_req.o := -O0
+CFLAGS_pcs_map.o := -O0
+CFLAGS_pcs_cluster.o := -O0
+CFLAGS_pcs_cluster_core.o := -O0
+CFLAGS_pcs_cs.o := -O0
+CFLAGS_fuse_io.o := -O0
+endif
+
obj-$(CONFIG_FUSE_FS) += fuse.o
obj-$(CONFIG_CUSE) += cuse.o
--
2.15.1
More information about the Devel
mailing list