]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
dm vdo: use a proper Makefile for dm-vdo
authorMike Snitzer <snitzer@kernel.org>
Sat, 27 Jan 2024 02:18:33 +0000 (21:18 -0500)
committerMike Snitzer <snitzer@kernel.org>
Tue, 20 Feb 2024 18:43:17 +0000 (13:43 -0500)
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
drivers/md/Kconfig
drivers/md/Makefile
drivers/md/dm-vdo/Kconfig [new file with mode: 0644]
drivers/md/dm-vdo/Makefile [new file with mode: 0644]
drivers/md/dm-vdo/dm-vdo-target.c [moved from drivers/md/dm-vdo-target.c with 99% similarity]

index 74b82cc8db4872bf517942adc3d4878c5a80c308..45513eb1bc4260c452da9fb91e587a7a07614396 100644 (file)
@@ -6124,7 +6124,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
index cef25cf4800cc2999c42511c06d2eea6f06ae32e..68ce56fc61d0a4ba7fcc62a6b394c0a7d71d169d 100644 (file)
@@ -498,22 +498,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
@@ -650,4 +634,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
index 2ac0e63311042bb6678354c26fb948d9f562e0c3..476a214e4bdc26911b9a8b28c1e59e9ab9b1a1de 100644 (file)
@@ -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
@@ -69,7 +68,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 (file)
index 0000000..111ecd2
--- /dev/null
@@ -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 (file)
index 0000000..8f8d161
--- /dev/null
@@ -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
similarity index 99%
rename from drivers/md/dm-vdo-target.c
rename to drivers/md/dm-vdo/dm-vdo-target.c
index 4fbc148681e51746b9dbdbb6766ec2e43598a1c4..fcba50d8d0881b5b204201296acafc69cf0dc58e 100644 (file)
 #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"