All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Sakai <msakai@redhat.com>
To: dm-devel@lists.linux.dev
Cc: Mike Snitzer <snitzer@kernel.org>, Matthew Sakai <msakai@redhat.com>
Subject: [PATCH] dm vdo: use a proper Makefile for dm-vdo
Date: Fri, 26 Jan 2024 21:18:33 -0500	[thread overview]
Message-ID: <a29b6ce2f2a0d7548227b6e11f818293d39e8a11.1706321430.git.msakai@redhat.com> (raw)

From: Mike Snitzer <snitzer@kernel.org>

Requires moving dm-vdo-target.c into drivers/md/dm-vdo/

This change adds a proper drivers/md/dm-vdo/Makefile and eliminates
the abnormal use of patsubst in drivers/md/Makefile -- which was the
cause of at least one build failure that was reported by the upstream
build bot.

Also, split out VDO's drivers/md/dm-vdo/Kconfig and include it from
drivers/md/Kconfig

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
---
 MAINTAINERS                             |  1 -
 drivers/md/Kconfig                      | 18 +-------
 drivers/md/Makefile                     |  3 +-
 drivers/md/dm-vdo/Kconfig               | 17 +++++++
 drivers/md/dm-vdo/Makefile              | 61 +++++++++++++++++++++++++
 drivers/md/{ => dm-vdo}/dm-vdo-target.c | 52 ++++++++++-----------
 6 files changed, 107 insertions(+), 45 deletions(-)
 create mode 100644 drivers/md/dm-vdo/Kconfig
 create mode 100644 drivers/md/dm-vdo/Makefile
 rename drivers/md/{ => dm-vdo}/dm-vdo-target.c (99%)

diff --git a/MAINTAINERS b/MAINTAINERS
index 5357fbe1cc90..91254b134456 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6007,7 +6007,6 @@ M:	dm-devel@lists.linux.dev
 L:	dm-devel@lists.linux.dev
 S:	Maintained
 F:	Documentation/admin-guide/device-mapper/vdo*.rst
-F:	drivers/md/dm-vdo-target.c
 F:	drivers/md/dm-vdo/
 
 DEVLINK
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig
index 9c4039106384..e11659186fd0 100644
--- a/drivers/md/Kconfig
+++ b/drivers/md/Kconfig
@@ -532,22 +532,6 @@ config DM_FLAKEY
 	help
 	 A target that intermittently fails I/O for debugging purposes.
 
-config DM_VDO
-	tristate "VDO: deduplication and compression target"
-	depends on 64BIT
-	depends on BLK_DEV_DM
-	select DM_BUFIO
-	select LZ4_COMPRESS
-	select LZ4_DECOMPRESS
-	help
-	  This device mapper target presents a block device with
-	  deduplication, compression and thin-provisioning.
-
-	  To compile this code as a module, choose M here: the module will
-	  be called dm-vdo.
-
-	  If unsure, say N.
-
 config DM_VERITY
 	tristate "Verity target support"
 	depends on BLK_DEV_DM
@@ -683,4 +667,6 @@ config DM_AUDIT
 	  Enables audit logging of several security relevant events in the
 	  particular device-mapper targets, especially the integrity target.
 
+source "drivers/md/dm-vdo/Kconfig"
+
 endif # MD
diff --git a/drivers/md/Makefile b/drivers/md/Makefile
index 47444b393abb..64b8f4deed4a 100644
--- a/drivers/md/Makefile
+++ b/drivers/md/Makefile
@@ -25,7 +25,6 @@ dm-ebs-y	+= dm-ebs-target.o
 dm-era-y	+= dm-era-target.o
 dm-clone-y	+= dm-clone-target.o dm-clone-metadata.o
 dm-verity-y	+= dm-verity-target.o
-dm-vdo-y	+= dm-vdo-target.o $(patsubst drivers/md/dm-vdo/%.c,dm-vdo/%.o,$(wildcard $(src)/dm-vdo/*.c))
 dm-zoned-y	+= dm-zoned-target.o dm-zoned-metadata.o dm-zoned-reclaim.o
 
 md-mod-y	+= md.o md-bitmap.o
@@ -75,7 +74,7 @@ obj-$(CONFIG_DM_ZERO)		+= dm-zero.o
 obj-$(CONFIG_DM_RAID)		+= dm-raid.o
 obj-$(CONFIG_DM_THIN_PROVISIONING) += dm-thin-pool.o
 obj-$(CONFIG_DM_VERITY)		+= dm-verity.o
-obj-$(CONFIG_DM_VDO)            += dm-vdo.o
+obj-$(CONFIG_DM_VDO)            += dm-vdo/
 obj-$(CONFIG_DM_CACHE)		+= dm-cache.o
 obj-$(CONFIG_DM_CACHE_SMQ)	+= dm-cache-smq.o
 obj-$(CONFIG_DM_EBS)		+= dm-ebs.o
diff --git a/drivers/md/dm-vdo/Kconfig b/drivers/md/dm-vdo/Kconfig
new file mode 100644
index 000000000000..111ecd2c2a24
--- /dev/null
+++ b/drivers/md/dm-vdo/Kconfig
@@ -0,0 +1,17 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+config DM_VDO
+	tristate "VDO: deduplication and compression target"
+	depends on 64BIT
+	depends on BLK_DEV_DM
+	select DM_BUFIO
+	select LZ4_COMPRESS
+	select LZ4_DECOMPRESS
+	help
+	  This device mapper target presents a block device with
+	  deduplication, compression and thin-provisioning.
+
+	  To compile this code as a module, choose M here: the module will
+	  be called dm-vdo.
+
+	  If unsure, say N.
diff --git a/drivers/md/dm-vdo/Makefile b/drivers/md/dm-vdo/Makefile
new file mode 100644
index 000000000000..8f8d161a6dbe
--- /dev/null
+++ b/drivers/md/dm-vdo/Makefile
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+obj-$(CONFIG_DM_VDO) += dm-vdo.o
+
+dm-vdo-objs := \
+	action-manager.o \
+	admin-state.o \
+	block-map.o \
+	chapter-index.o \
+	completion.o \
+	config.o \
+	constants.o \
+	data-vio.o \
+	dedupe.o \
+	delta-index.o \
+	dm-vdo-target.o \
+	dump.o \
+	encodings.o \
+	errors.o \
+	flush.o \
+	funnel-queue.o \
+	funnel-requestqueue.o \
+	funnel-workqueue.o \
+	geometry.o \
+	index-layout.o \
+	index.o \
+	index-page-map.o \
+	index-session.o \
+	int-map.o \
+	io-factory.o \
+	io-submitter.o \
+	logger.o \
+	logical-zone.o \
+	memory-alloc.o \
+	message-stats.o \
+	murmurhash3.o \
+	open-chapter.o \
+	packer.o \
+	permassert.o \
+	physical-zone.o \
+	pool-sysfs.o \
+	pool-sysfs-stats.o \
+	priority-table.o \
+	radix-sort.o \
+	recovery-journal.o \
+	repair.o \
+	slab-depot.o \
+	sparse-cache.o \
+	status-codes.o \
+	string-utils.o \
+	sysfs.o \
+	thread-cond-var.o \
+	thread-device.o \
+	thread-registry.o \
+	uds-sysfs.o \
+	uds-threads.o \
+	vdo.o \
+	vio.o \
+	volume-index.o \
+	volume.o \
+	wait-queue.o
diff --git a/drivers/md/dm-vdo-target.c b/drivers/md/dm-vdo/dm-vdo-target.c
similarity index 99%
rename from drivers/md/dm-vdo-target.c
rename to drivers/md/dm-vdo/dm-vdo-target.c
index 4fbc148681e5..fcba50d8d088 100644
--- a/drivers/md/dm-vdo-target.c
+++ b/drivers/md/dm-vdo/dm-vdo-target.c
@@ -13,32 +13,32 @@
 #include <linux/mutex.h>
 #include <linux/spinlock.h>
 
-#include "dm-vdo/admin-state.h"
-#include "dm-vdo/block-map.h"
-#include "dm-vdo/completion.h"
-#include "dm-vdo/constants.h"
-#include "dm-vdo/data-vio.h"
-#include "dm-vdo/dedupe.h"
-#include "dm-vdo/dump.h"
-#include "dm-vdo/encodings.h"
-#include "dm-vdo/errors.h"
-#include "dm-vdo/flush.h"
-#include "dm-vdo/io-submitter.h"
-#include "dm-vdo/logger.h"
-#include "dm-vdo/memory-alloc.h"
-#include "dm-vdo/message-stats.h"
-#include "dm-vdo/pool-sysfs.h"
-#include "dm-vdo/recovery-journal.h"
-#include "dm-vdo/repair.h"
-#include "dm-vdo/slab-depot.h"
-#include "dm-vdo/status-codes.h"
-#include "dm-vdo/string-utils.h"
-#include "dm-vdo/thread-device.h"
-#include "dm-vdo/thread-registry.h"
-#include "dm-vdo/types.h"
-#include "dm-vdo/uds-sysfs.h"
-#include "dm-vdo/vdo.h"
-#include "dm-vdo/vio.h"
+#include "admin-state.h"
+#include "block-map.h"
+#include "completion.h"
+#include "constants.h"
+#include "data-vio.h"
+#include "dedupe.h"
+#include "dump.h"
+#include "encodings.h"
+#include "errors.h"
+#include "flush.h"
+#include "io-submitter.h"
+#include "logger.h"
+#include "memory-alloc.h"
+#include "message-stats.h"
+#include "pool-sysfs.h"
+#include "recovery-journal.h"
+#include "repair.h"
+#include "slab-depot.h"
+#include "status-codes.h"
+#include "string-utils.h"
+#include "thread-device.h"
+#include "thread-registry.h"
+#include "types.h"
+#include "uds-sysfs.h"
+#include "vdo.h"
+#include "vio.h"
 
 #define	CURRENT_VERSION "8.3.0.65"
 
-- 
2.42.0


                 reply	other threads:[~2024-01-27  2:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a29b6ce2f2a0d7548227b6e11f818293d39e8a11.1706321430.git.msakai@redhat.com \
    --to=msakai@redhat.com \
    --cc=dm-devel@lists.linux.dev \
    --cc=snitzer@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.