summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2024-02-09 00:55:29 +0300
committerMike Snitzer <snitzer@kernel.org>2024-03-04 23:07:55 +0300
commit17b1a73feaf31bea77010e226c8e434cba1f95ea (patch)
tree7dc5f2f4c7d5de180701dac533b8dad1b66fb460 /drivers
parent61234f0bdabb5f3b9e26e582e6457a1a3b01cb79 (diff)
downloadlinux-17b1a73feaf31bea77010e226c8e434cba1f95ea.tar.xz
dm vdo: move indexer files into sub-directory
The goal is to assist high-level understanding of which code is conceptually specific to VDO's indexer. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Matthew Sakai <msakai@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/md/dm-vdo/Makefile34
-rw-r--r--drivers/md/dm-vdo/data-vio.h3
-rw-r--r--drivers/md/dm-vdo/dedupe.c3
-rw-r--r--drivers/md/dm-vdo/indexer/chapter-index.c (renamed from drivers/md/dm-vdo/chapter-index.c)5
-rw-r--r--drivers/md/dm-vdo/indexer/chapter-index.h (renamed from drivers/md/dm-vdo/chapter-index.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/config.c (renamed from drivers/md/dm-vdo/config.c)0
-rw-r--r--drivers/md/dm-vdo/indexer/config.h (renamed from drivers/md/dm-vdo/config.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/delta-index.c (renamed from drivers/md/dm-vdo/delta-index.c)5
-rw-r--r--drivers/md/dm-vdo/indexer/delta-index.h (renamed from drivers/md/dm-vdo/delta-index.h)5
-rw-r--r--drivers/md/dm-vdo/indexer/funnel-requestqueue.c (renamed from drivers/md/dm-vdo/funnel-requestqueue.c)0
-rw-r--r--drivers/md/dm-vdo/indexer/funnel-requestqueue.h (renamed from drivers/md/dm-vdo/funnel-requestqueue.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/geometry.c (renamed from drivers/md/dm-vdo/geometry.c)5
-rw-r--r--drivers/md/dm-vdo/indexer/geometry.h (renamed from drivers/md/dm-vdo/geometry.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/hash-utils.h (renamed from drivers/md/dm-vdo/hash-utils.h)3
-rw-r--r--drivers/md/dm-vdo/indexer/index-layout.c (renamed from drivers/md/dm-vdo/index-layout.c)5
-rw-r--r--drivers/md/dm-vdo/indexer/index-layout.h (renamed from drivers/md/dm-vdo/index-layout.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/index-page-map.c (renamed from drivers/md/dm-vdo/index-page-map.c)5
-rw-r--r--drivers/md/dm-vdo/indexer/index-page-map.h (renamed from drivers/md/dm-vdo/index-page-map.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/index-session.c (renamed from drivers/md/dm-vdo/index-session.c)7
-rw-r--r--drivers/md/dm-vdo/indexer/index-session.h (renamed from drivers/md/dm-vdo/index-session.h)3
-rw-r--r--drivers/md/dm-vdo/indexer/index.c (renamed from drivers/md/dm-vdo/index.c)5
-rw-r--r--drivers/md/dm-vdo/indexer/index.h (renamed from drivers/md/dm-vdo/index.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/indexer.h (renamed from drivers/md/dm-vdo/indexer.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/io-factory.c (renamed from drivers/md/dm-vdo/io-factory.c)0
-rw-r--r--drivers/md/dm-vdo/indexer/io-factory.h (renamed from drivers/md/dm-vdo/io-factory.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/open-chapter.c (renamed from drivers/md/dm-vdo/open-chapter.c)5
-rw-r--r--drivers/md/dm-vdo/indexer/open-chapter.h (renamed from drivers/md/dm-vdo/open-chapter.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/radix-sort.c (renamed from drivers/md/dm-vdo/radix-sort.c)0
-rw-r--r--drivers/md/dm-vdo/indexer/radix-sort.h (renamed from drivers/md/dm-vdo/radix-sort.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/sparse-cache.c (renamed from drivers/md/dm-vdo/sparse-cache.c)7
-rw-r--r--drivers/md/dm-vdo/indexer/sparse-cache.h (renamed from drivers/md/dm-vdo/sparse-cache.h)0
-rw-r--r--drivers/md/dm-vdo/indexer/volume-index.c (renamed from drivers/md/dm-vdo/volume-index.c)9
-rw-r--r--drivers/md/dm-vdo/indexer/volume-index.h (renamed from drivers/md/dm-vdo/volume-index.h)3
-rw-r--r--drivers/md/dm-vdo/indexer/volume.c (renamed from drivers/md/dm-vdo/volume.c)13
-rw-r--r--drivers/md/dm-vdo/indexer/volume.h (renamed from drivers/md/dm-vdo/volume.h)5
-rw-r--r--drivers/md/dm-vdo/uds-sysfs.c3
36 files changed, 77 insertions, 56 deletions
diff --git a/drivers/md/dm-vdo/Makefile b/drivers/md/dm-vdo/Makefile
index 32266ab04cc1..502a7a0acbdb 100644
--- a/drivers/md/dm-vdo/Makefile
+++ b/drivers/md/dm-vdo/Makefile
@@ -1,50 +1,39 @@
# SPDX-License-Identifier: GPL-2.0-only
+ccflags-y := -I$(srctree)/$(src) -I$(srctree)/$(src)/indexer
+
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 \
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 \
@@ -54,6 +43,19 @@ dm-vdo-objs := \
uds-sysfs.o \
vdo.o \
vio.o \
- volume-index.o \
- volume.o \
- wait-queue.o
+ wait-queue.o \
+ indexer/chapter-index.o \
+ indexer/config.o \
+ indexer/delta-index.o \
+ indexer/funnel-requestqueue.o \
+ indexer/geometry.o \
+ indexer/index.o \
+ indexer/index-layout.o \
+ indexer/index-page-map.o \
+ indexer/index-session.o \
+ indexer/io-factory.o \
+ indexer/open-chapter.o \
+ indexer/radix-sort.o \
+ indexer/sparse-cache.o \
+ indexer/volume.o \
+ indexer/volume-index.o
diff --git a/drivers/md/dm-vdo/data-vio.h b/drivers/md/dm-vdo/data-vio.h
index e7729623a6bb..44fd0d8ccb76 100644
--- a/drivers/md/dm-vdo/data-vio.h
+++ b/drivers/md/dm-vdo/data-vio.h
@@ -10,9 +10,10 @@
#include <linux/bio.h>
#include <linux/list.h>
-#include "indexer.h"
#include "permassert.h"
+#include "indexer.h"
+
#include "block-map.h"
#include "completion.h"
#include "constants.h"
diff --git a/drivers/md/dm-vdo/dedupe.c b/drivers/md/dm-vdo/dedupe.c
index 942a50ef8b0d..9468d7fad443 100644
--- a/drivers/md/dm-vdo/dedupe.c
+++ b/drivers/md/dm-vdo/dedupe.c
@@ -126,13 +126,14 @@
#include <linux/spinlock.h>
#include <linux/timer.h>
-#include "indexer.h"
#include "logger.h"
#include "memory-alloc.h"
#include "numeric.h"
#include "permassert.h"
#include "string-utils.h"
+#include "indexer.h"
+
#include "action-manager.h"
#include "admin-state.h"
#include "completion.h"
diff --git a/drivers/md/dm-vdo/chapter-index.c b/drivers/md/dm-vdo/indexer/chapter-index.c
index 9b9185c2c237..6487825ada90 100644
--- a/drivers/md/dm-vdo/chapter-index.c
+++ b/drivers/md/dm-vdo/indexer/chapter-index.c
@@ -6,12 +6,13 @@
#include "chapter-index.h"
#include "errors.h"
-#include "hash-utils.h"
-#include "indexer.h"
#include "logger.h"
#include "memory-alloc.h"
#include "permassert.h"
+#include "hash-utils.h"
+#include "indexer.h"
+
int uds_make_open_chapter_index(struct open_chapter_index **chapter_index,
const struct index_geometry *geometry, u64 volume_nonce)
{
diff --git a/drivers/md/dm-vdo/chapter-index.h b/drivers/md/dm-vdo/indexer/chapter-index.h
index be8bf2b675b1..be8bf2b675b1 100644
--- a/drivers/md/dm-vdo/chapter-index.h
+++ b/drivers/md/dm-vdo/indexer/chapter-index.h
diff --git a/drivers/md/dm-vdo/config.c b/drivers/md/dm-vdo/indexer/config.c
index 0bf315e7b5d1..0bf315e7b5d1 100644
--- a/drivers/md/dm-vdo/config.c
+++ b/drivers/md/dm-vdo/indexer/config.c
diff --git a/drivers/md/dm-vdo/config.h b/drivers/md/dm-vdo/indexer/config.h
index 08507dc2f7a1..08507dc2f7a1 100644
--- a/drivers/md/dm-vdo/config.h
+++ b/drivers/md/dm-vdo/indexer/config.h
diff --git a/drivers/md/dm-vdo/delta-index.c b/drivers/md/dm-vdo/indexer/delta-index.c
index 66f51b5f8fd2..4aace707545a 100644
--- a/drivers/md/dm-vdo/delta-index.c
+++ b/drivers/md/dm-vdo/indexer/delta-index.c
@@ -10,10 +10,8 @@
#include <linux/limits.h>
#include <linux/log2.h>
-#include "config.h"
#include "cpu.h"
#include "errors.h"
-#include "indexer.h"
#include "logger.h"
#include "memory-alloc.h"
#include "numeric.h"
@@ -21,6 +19,9 @@
#include "string-utils.h"
#include "time-utils.h"
+#include "config.h"
+#include "indexer.h"
+
/*
* The entries in a delta index could be stored in a single delta list, but to reduce search times
* and update costs it uses multiple delta lists. These lists are stored in a single chunk of
diff --git a/drivers/md/dm-vdo/delta-index.h b/drivers/md/dm-vdo/indexer/delta-index.h
index b3b38fb440bf..3d2ea19aef61 100644
--- a/drivers/md/dm-vdo/delta-index.h
+++ b/drivers/md/dm-vdo/indexer/delta-index.h
@@ -8,11 +8,12 @@
#include <linux/cache.h>
-#include "config.h"
-#include "io-factory.h"
#include "numeric.h"
#include "time-utils.h"
+#include "config.h"
+#include "io-factory.h"
+
/*
* A delta index is a key-value store, where each entry maps an address (the key) to a payload (the
* value). The entries are sorted by address, and only the delta between successive addresses is
diff --git a/drivers/md/dm-vdo/funnel-requestqueue.c b/drivers/md/dm-vdo/indexer/funnel-requestqueue.c
index d2b49e39550c..d2b49e39550c 100644
--- a/drivers/md/dm-vdo/funnel-requestqueue.c
+++ b/drivers/md/dm-vdo/indexer/funnel-requestqueue.c
diff --git a/drivers/md/dm-vdo/funnel-requestqueue.h b/drivers/md/dm-vdo/indexer/funnel-requestqueue.h
index 9b0f53939b4d..9b0f53939b4d 100644
--- a/drivers/md/dm-vdo/funnel-requestqueue.h
+++ b/drivers/md/dm-vdo/indexer/funnel-requestqueue.h
diff --git a/drivers/md/dm-vdo/geometry.c b/drivers/md/dm-vdo/indexer/geometry.c
index 04c07195a01c..38c18283cdde 100644
--- a/drivers/md/dm-vdo/geometry.c
+++ b/drivers/md/dm-vdo/indexer/geometry.c
@@ -8,13 +8,14 @@
#include <linux/compiler.h>
#include <linux/log2.h>
-#include "delta-index.h"
#include "errors.h"
-#include "indexer.h"
#include "logger.h"
#include "memory-alloc.h"
#include "permassert.h"
+#include "delta-index.h"
+#include "indexer.h"
+
/*
* An index volume is divided into a fixed number of fixed-size chapters, each consisting of a
* fixed number of fixed-size pages. The volume layout is defined by two constants and four
diff --git a/drivers/md/dm-vdo/geometry.h b/drivers/md/dm-vdo/indexer/geometry.h
index a2ecdb238cf2..a2ecdb238cf2 100644
--- a/drivers/md/dm-vdo/geometry.h
+++ b/drivers/md/dm-vdo/indexer/geometry.h
diff --git a/drivers/md/dm-vdo/hash-utils.h b/drivers/md/dm-vdo/indexer/hash-utils.h
index e3b865bbe9b2..6a8dd8ffea6c 100644
--- a/drivers/md/dm-vdo/hash-utils.h
+++ b/drivers/md/dm-vdo/indexer/hash-utils.h
@@ -6,9 +6,10 @@
#ifndef UDS_HASH_UTILS_H
#define UDS_HASH_UTILS_H
+#include "numeric.h"
+
#include "geometry.h"
#include "indexer.h"
-#include "numeric.h"
/* Utilities for extracting portions of a request name for various uses. */
diff --git a/drivers/md/dm-vdo/index-layout.c b/drivers/md/dm-vdo/indexer/index-layout.c
index 2da507b26fd5..af533aa270a8 100644
--- a/drivers/md/dm-vdo/index-layout.c
+++ b/drivers/md/dm-vdo/indexer/index-layout.c
@@ -7,13 +7,14 @@
#include <linux/random.h>
-#include "config.h"
#include "logger.h"
#include "memory-alloc.h"
#include "murmurhash3.h"
#include "numeric.h"
-#include "open-chapter.h"
#include "time-utils.h"
+
+#include "config.h"
+#include "open-chapter.h"
#include "volume-index.h"
/*
diff --git a/drivers/md/dm-vdo/index-layout.h b/drivers/md/dm-vdo/indexer/index-layout.h
index e9ac6f4302d6..e9ac6f4302d6 100644
--- a/drivers/md/dm-vdo/index-layout.h
+++ b/drivers/md/dm-vdo/indexer/index-layout.h
diff --git a/drivers/md/dm-vdo/index-page-map.c b/drivers/md/dm-vdo/indexer/index-page-map.c
index 1bb12066ad1a..90d97c33a9c3 100644
--- a/drivers/md/dm-vdo/index-page-map.c
+++ b/drivers/md/dm-vdo/indexer/index-page-map.c
@@ -6,8 +6,6 @@
#include "index-page-map.h"
#include "errors.h"
-#include "hash-utils.h"
-#include "indexer.h"
#include "logger.h"
#include "memory-alloc.h"
#include "numeric.h"
@@ -15,6 +13,9 @@
#include "string-utils.h"
#include "thread-utils.h"
+#include "hash-utils.h"
+#include "indexer.h"
+
/*
* The index page map is conceptually a two-dimensional array indexed by chapter number and index
* page number within the chapter. Each entry contains the number of the last delta list on that
diff --git a/drivers/md/dm-vdo/index-page-map.h b/drivers/md/dm-vdo/indexer/index-page-map.h
index b327c0bb9656..b327c0bb9656 100644
--- a/drivers/md/dm-vdo/index-page-map.h
+++ b/drivers/md/dm-vdo/indexer/index-page-map.h
diff --git a/drivers/md/dm-vdo/index-session.c b/drivers/md/dm-vdo/indexer/index-session.c
index a482ccd3981e..07b478f57c68 100644
--- a/drivers/md/dm-vdo/index-session.c
+++ b/drivers/md/dm-vdo/indexer/index-session.c
@@ -7,13 +7,14 @@
#include <linux/atomic.h>
-#include "funnel-requestqueue.h"
-#include "index.h"
-#include "index-layout.h"
#include "logger.h"
#include "memory-alloc.h"
#include "time-utils.h"
+#include "funnel-requestqueue.h"
+#include "index.h"
+#include "index-layout.h"
+
/*
* The index session contains a lock (the request_mutex) which ensures that only one thread can
* change the state of its index at a time. The state field indicates the current state of the
diff --git a/drivers/md/dm-vdo/index-session.h b/drivers/md/dm-vdo/indexer/index-session.h
index 733d10f8a56c..066648f6e062 100644
--- a/drivers/md/dm-vdo/index-session.h
+++ b/drivers/md/dm-vdo/indexer/index-session.h
@@ -9,9 +9,10 @@
#include <linux/atomic.h>
#include <linux/cache.h>
+#include "thread-utils.h"
+
#include "config.h"
#include "indexer.h"
-#include "thread-utils.h"
/*
* The index session mediates all interactions with a UDS index. Once the index session is created,
diff --git a/drivers/md/dm-vdo/index.c b/drivers/md/dm-vdo/indexer/index.c
index 9d4a8e5cbaad..35e3b45cdb71 100644
--- a/drivers/md/dm-vdo/index.c
+++ b/drivers/md/dm-vdo/indexer/index.c
@@ -6,10 +6,11 @@
#include "index.h"
-#include "funnel-requestqueue.h"
-#include "hash-utils.h"
#include "logger.h"
#include "memory-alloc.h"
+
+#include "funnel-requestqueue.h"
+#include "hash-utils.h"
#include "sparse-cache.h"
static const u64 NO_LAST_SAVE = U64_MAX;
diff --git a/drivers/md/dm-vdo/index.h b/drivers/md/dm-vdo/indexer/index.h
index edabb239548e..edabb239548e 100644
--- a/drivers/md/dm-vdo/index.h
+++ b/drivers/md/dm-vdo/indexer/index.h
diff --git a/drivers/md/dm-vdo/indexer.h b/drivers/md/dm-vdo/indexer/indexer.h
index 3744aaf625b0..3744aaf625b0 100644
--- a/drivers/md/dm-vdo/indexer.h
+++ b/drivers/md/dm-vdo/indexer/indexer.h
diff --git a/drivers/md/dm-vdo/io-factory.c b/drivers/md/dm-vdo/indexer/io-factory.c
index 02242df94e37..02242df94e37 100644
--- a/drivers/md/dm-vdo/io-factory.c
+++ b/drivers/md/dm-vdo/indexer/io-factory.c
diff --git a/drivers/md/dm-vdo/io-factory.h b/drivers/md/dm-vdo/indexer/io-factory.h
index 7fb5a0616a79..7fb5a0616a79 100644
--- a/drivers/md/dm-vdo/io-factory.h
+++ b/drivers/md/dm-vdo/indexer/io-factory.h
diff --git a/drivers/md/dm-vdo/open-chapter.c b/drivers/md/dm-vdo/indexer/open-chapter.c
index d9d6e5d45bfb..da16afaec07f 100644
--- a/drivers/md/dm-vdo/open-chapter.c
+++ b/drivers/md/dm-vdo/indexer/open-chapter.c
@@ -7,13 +7,14 @@
#include <linux/log2.h>
-#include "config.h"
-#include "hash-utils.h"
#include "logger.h"
#include "memory-alloc.h"
#include "numeric.h"
#include "permassert.h"
+#include "config.h"
+#include "hash-utils.h"
+
/*
* Each index zone has a dedicated open chapter zone structure which gets an equal share of the
* open chapter space. Records are assigned to zones based on their record name. Within each zone,
diff --git a/drivers/md/dm-vdo/open-chapter.h b/drivers/md/dm-vdo/indexer/open-chapter.h
index a4250bb19525..a4250bb19525 100644
--- a/drivers/md/dm-vdo/open-chapter.h
+++ b/drivers/md/dm-vdo/indexer/open-chapter.h
diff --git a/drivers/md/dm-vdo/radix-sort.c b/drivers/md/dm-vdo/indexer/radix-sort.c
index 1f17c708a652..1f17c708a652 100644
--- a/drivers/md/dm-vdo/radix-sort.c
+++ b/drivers/md/dm-vdo/indexer/radix-sort.c
diff --git a/drivers/md/dm-vdo/radix-sort.h b/drivers/md/dm-vdo/indexer/radix-sort.h
index 812949bc2cee..812949bc2cee 100644
--- a/drivers/md/dm-vdo/radix-sort.h
+++ b/drivers/md/dm-vdo/indexer/radix-sort.h
diff --git a/drivers/md/dm-vdo/sparse-cache.c b/drivers/md/dm-vdo/indexer/sparse-cache.c
index b43a626a42de..f2141de6ed00 100644
--- a/drivers/md/dm-vdo/sparse-cache.c
+++ b/drivers/md/dm-vdo/indexer/sparse-cache.c
@@ -9,13 +9,14 @@
#include <linux/delay.h>
#include <linux/dm-bufio.h>
-#include "chapter-index.h"
-#include "config.h"
-#include "index.h"
#include "logger.h"
#include "memory-alloc.h"
#include "permassert.h"
+#include "chapter-index.h"
+#include "config.h"
+#include "index.h"
+
/*
* Since the cache is small, it is implemented as a simple array of cache entries. Searching for a
* specific virtual chapter is implemented as a linear search. The cache replacement policy is
diff --git a/drivers/md/dm-vdo/sparse-cache.h b/drivers/md/dm-vdo/indexer/sparse-cache.h
index 45e2dcf165b5..45e2dcf165b5 100644
--- a/drivers/md/dm-vdo/sparse-cache.h
+++ b/drivers/md/dm-vdo/indexer/sparse-cache.h
diff --git a/drivers/md/dm-vdo/volume-index.c b/drivers/md/dm-vdo/indexer/volume-index.c
index 36e3c2e3d799..8cbd9280c4bd 100644
--- a/drivers/md/dm-vdo/volume-index.c
+++ b/drivers/md/dm-vdo/indexer/volume-index.c
@@ -10,17 +10,18 @@
#include <linux/compiler.h>
#include <linux/log2.h>
-#include "config.h"
#include "errors.h"
-#include "geometry.h"
-#include "hash-utils.h"
-#include "indexer.h"
#include "logger.h"
#include "memory-alloc.h"
#include "numeric.h"
#include "permassert.h"
#include "thread-utils.h"
+#include "config.h"
+#include "geometry.h"
+#include "hash-utils.h"
+#include "indexer.h"
+
/*
* The volume index is a combination of two separate subindexes, one containing sparse hook entries
* (retained for all chapters), and one containing the remaining entries (retained only for the
diff --git a/drivers/md/dm-vdo/volume-index.h b/drivers/md/dm-vdo/indexer/volume-index.h
index 66bf14fddc90..583998c547b7 100644
--- a/drivers/md/dm-vdo/volume-index.h
+++ b/drivers/md/dm-vdo/indexer/volume-index.h
@@ -8,10 +8,11 @@
#include <linux/limits.h>
+#include "thread-utils.h"
+
#include "config.h"
#include "delta-index.h"
#include "indexer.h"
-#include "thread-utils.h"
/*
* The volume index is the primary top-level index for UDS. It contains records which map a record
diff --git a/drivers/md/dm-vdo/volume.c b/drivers/md/dm-vdo/indexer/volume.c
index 60416dc8a9d7..eca83b6cab35 100644
--- a/drivers/md/dm-vdo/volume.c
+++ b/drivers/md/dm-vdo/indexer/volume.c
@@ -9,19 +9,20 @@
#include <linux/dm-bufio.h>
#include <linux/err.h>
-#include "chapter-index.h"
-#include "config.h"
#include "errors.h"
-#include "geometry.h"
-#include "hash-utils.h"
-#include "index.h"
#include "logger.h"
#include "memory-alloc.h"
#include "permassert.h"
-#include "sparse-cache.h"
#include "string-utils.h"
#include "thread-utils.h"
+#include "chapter-index.h"
+#include "config.h"
+#include "geometry.h"
+#include "hash-utils.h"
+#include "index.h"
+#include "sparse-cache.h"
+
/*
* The first block of the volume layout is reserved for the volume header, which is no longer used.
* The remainder of the volume is divided into chapters consisting of several pages of records, and
diff --git a/drivers/md/dm-vdo/volume.h b/drivers/md/dm-vdo/indexer/volume.h
index 290de5cbf9ec..8679a5e55347 100644
--- a/drivers/md/dm-vdo/volume.h
+++ b/drivers/md/dm-vdo/indexer/volume.h
@@ -11,16 +11,17 @@
#include <linux/dm-bufio.h>
#include <linux/limits.h>
+#include "permassert.h"
+#include "thread-utils.h"
+
#include "chapter-index.h"
#include "config.h"
#include "geometry.h"
#include "indexer.h"
#include "index-layout.h"
#include "index-page-map.h"
-#include "permassert.h"
#include "radix-sort.h"
#include "sparse-cache.h"
-#include "thread-utils.h"
/*
* The volume manages deduplication records on permanent storage. The term "volume" can also refer
diff --git a/drivers/md/dm-vdo/uds-sysfs.c b/drivers/md/dm-vdo/uds-sysfs.c
index 1548092e7de1..2c4fb277ba38 100644
--- a/drivers/md/dm-vdo/uds-sysfs.c
+++ b/drivers/md/dm-vdo/uds-sysfs.c
@@ -9,11 +9,12 @@
#include <linux/module.h>
#include <linux/slab.h>
-#include "indexer.h"
#include "logger.h"
#include "memory-alloc.h"
#include "string-utils.h"
+#include "indexer.h"
+
#define UDS_SYSFS_NAME "uds"
static struct {