Commit 17b1a73f authored by Mike Snitzer's avatar Mike Snitzer

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: default avatarMike Snitzer <snitzer@kernel.org>
Signed-off-by: default avatarMatthew Sakai <msakai@redhat.com>
parent 61234f0b
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
ccflags-y := -I$(srctree)/$(src) -I$(srctree)/$(src)/indexer
obj-$(CONFIG_DM_VDO) += dm-vdo.o obj-$(CONFIG_DM_VDO) += dm-vdo.o
dm-vdo-objs := \ dm-vdo-objs := \
action-manager.o \ action-manager.o \
admin-state.o \ admin-state.o \
block-map.o \ block-map.o \
chapter-index.o \
completion.o \ completion.o \
config.o \
data-vio.o \ data-vio.o \
dedupe.o \ dedupe.o \
delta-index.o \
dm-vdo-target.o \ dm-vdo-target.o \
dump.o \ dump.o \
encodings.o \ encodings.o \
errors.o \ errors.o \
flush.o \ flush.o \
funnel-queue.o \ funnel-queue.o \
funnel-requestqueue.o \
funnel-workqueue.o \ funnel-workqueue.o \
geometry.o \
index-layout.o \
index.o \
index-page-map.o \
index-session.o \
int-map.o \ int-map.o \
io-factory.o \
io-submitter.o \ io-submitter.o \
logger.o \ logger.o \
logical-zone.o \ logical-zone.o \
memory-alloc.o \ memory-alloc.o \
message-stats.o \ message-stats.o \
murmurhash3.o \ murmurhash3.o \
open-chapter.o \
packer.o \ packer.o \
permassert.o \ permassert.o \
physical-zone.o \ physical-zone.o \
pool-sysfs.o \ pool-sysfs.o \
pool-sysfs-stats.o \ pool-sysfs-stats.o \
priority-table.o \ priority-table.o \
radix-sort.o \
recovery-journal.o \ recovery-journal.o \
repair.o \ repair.o \
slab-depot.o \ slab-depot.o \
sparse-cache.o \
status-codes.o \ status-codes.o \
string-utils.o \ string-utils.o \
sysfs.o \ sysfs.o \
...@@ -54,6 +43,19 @@ dm-vdo-objs := \ ...@@ -54,6 +43,19 @@ dm-vdo-objs := \
uds-sysfs.o \ uds-sysfs.o \
vdo.o \ vdo.o \
vio.o \ vio.o \
volume-index.o \ wait-queue.o \
volume.o \ indexer/chapter-index.o \
wait-queue.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
...@@ -10,9 +10,10 @@ ...@@ -10,9 +10,10 @@
#include <linux/bio.h> #include <linux/bio.h>
#include <linux/list.h> #include <linux/list.h>
#include "indexer.h"
#include "permassert.h" #include "permassert.h"
#include "indexer.h"
#include "block-map.h" #include "block-map.h"
#include "completion.h" #include "completion.h"
#include "constants.h" #include "constants.h"
......
...@@ -126,13 +126,14 @@ ...@@ -126,13 +126,14 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/timer.h> #include <linux/timer.h>
#include "indexer.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "numeric.h" #include "numeric.h"
#include "permassert.h" #include "permassert.h"
#include "string-utils.h" #include "string-utils.h"
#include "indexer.h"
#include "action-manager.h" #include "action-manager.h"
#include "admin-state.h" #include "admin-state.h"
#include "completion.h" #include "completion.h"
......
...@@ -6,12 +6,13 @@ ...@@ -6,12 +6,13 @@
#include "chapter-index.h" #include "chapter-index.h"
#include "errors.h" #include "errors.h"
#include "hash-utils.h"
#include "indexer.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "permassert.h" #include "permassert.h"
#include "hash-utils.h"
#include "indexer.h"
int uds_make_open_chapter_index(struct open_chapter_index **chapter_index, int uds_make_open_chapter_index(struct open_chapter_index **chapter_index,
const struct index_geometry *geometry, u64 volume_nonce) const struct index_geometry *geometry, u64 volume_nonce)
{ {
......
...@@ -10,10 +10,8 @@ ...@@ -10,10 +10,8 @@
#include <linux/limits.h> #include <linux/limits.h>
#include <linux/log2.h> #include <linux/log2.h>
#include "config.h"
#include "cpu.h" #include "cpu.h"
#include "errors.h" #include "errors.h"
#include "indexer.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "numeric.h" #include "numeric.h"
...@@ -21,6 +19,9 @@ ...@@ -21,6 +19,9 @@
#include "string-utils.h" #include "string-utils.h"
#include "time-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 * 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 * and update costs it uses multiple delta lists. These lists are stored in a single chunk of
......
...@@ -8,11 +8,12 @@ ...@@ -8,11 +8,12 @@
#include <linux/cache.h> #include <linux/cache.h>
#include "config.h"
#include "io-factory.h"
#include "numeric.h" #include "numeric.h"
#include "time-utils.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 * 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 * value). The entries are sorted by address, and only the delta between successive addresses is
......
...@@ -8,13 +8,14 @@ ...@@ -8,13 +8,14 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/log2.h> #include <linux/log2.h>
#include "delta-index.h"
#include "errors.h" #include "errors.h"
#include "indexer.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "permassert.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 * 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 * fixed number of fixed-size pages. The volume layout is defined by two constants and four
......
...@@ -6,9 +6,10 @@ ...@@ -6,9 +6,10 @@
#ifndef UDS_HASH_UTILS_H #ifndef UDS_HASH_UTILS_H
#define UDS_HASH_UTILS_H #define UDS_HASH_UTILS_H
#include "numeric.h"
#include "geometry.h" #include "geometry.h"
#include "indexer.h" #include "indexer.h"
#include "numeric.h"
/* Utilities for extracting portions of a request name for various uses. */ /* Utilities for extracting portions of a request name for various uses. */
......
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
#include <linux/random.h> #include <linux/random.h>
#include "config.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "murmurhash3.h" #include "murmurhash3.h"
#include "numeric.h" #include "numeric.h"
#include "open-chapter.h"
#include "time-utils.h" #include "time-utils.h"
#include "config.h"
#include "open-chapter.h"
#include "volume-index.h" #include "volume-index.h"
/* /*
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
#include "index-page-map.h" #include "index-page-map.h"
#include "errors.h" #include "errors.h"
#include "hash-utils.h"
#include "indexer.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "numeric.h" #include "numeric.h"
...@@ -15,6 +13,9 @@ ...@@ -15,6 +13,9 @@
#include "string-utils.h" #include "string-utils.h"
#include "thread-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 * 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 * page number within the chapter. Each entry contains the number of the last delta list on that
......
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
#include <linux/atomic.h> #include <linux/atomic.h>
#include "funnel-requestqueue.h"
#include "index.h"
#include "index-layout.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "time-utils.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 * 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 * change the state of its index at a time. The state field indicates the current state of the
......
...@@ -9,9 +9,10 @@ ...@@ -9,9 +9,10 @@
#include <linux/atomic.h> #include <linux/atomic.h>
#include <linux/cache.h> #include <linux/cache.h>
#include "thread-utils.h"
#include "config.h" #include "config.h"
#include "indexer.h" #include "indexer.h"
#include "thread-utils.h"
/* /*
* The index session mediates all interactions with a UDS index. Once the index session is created, * The index session mediates all interactions with a UDS index. Once the index session is created,
......
...@@ -6,10 +6,11 @@ ...@@ -6,10 +6,11 @@
#include "index.h" #include "index.h"
#include "funnel-requestqueue.h"
#include "hash-utils.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "funnel-requestqueue.h"
#include "hash-utils.h"
#include "sparse-cache.h" #include "sparse-cache.h"
static const u64 NO_LAST_SAVE = U64_MAX; static const u64 NO_LAST_SAVE = U64_MAX;
......
...@@ -7,13 +7,14 @@ ...@@ -7,13 +7,14 @@
#include <linux/log2.h> #include <linux/log2.h>
#include "config.h"
#include "hash-utils.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "numeric.h" #include "numeric.h"
#include "permassert.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 * 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, * open chapter space. Records are assigned to zones based on their record name. Within each zone,
......
...@@ -9,13 +9,14 @@ ...@@ -9,13 +9,14 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/dm-bufio.h> #include <linux/dm-bufio.h>
#include "chapter-index.h"
#include "config.h"
#include "index.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "permassert.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 * 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 * specific virtual chapter is implemented as a linear search. The cache replacement policy is
......
...@@ -10,17 +10,18 @@ ...@@ -10,17 +10,18 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#include <linux/log2.h> #include <linux/log2.h>
#include "config.h"
#include "errors.h" #include "errors.h"
#include "geometry.h"
#include "hash-utils.h"
#include "indexer.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "numeric.h" #include "numeric.h"
#include "permassert.h" #include "permassert.h"
#include "thread-utils.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 * 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 * (retained for all chapters), and one containing the remaining entries (retained only for the
......
...@@ -8,10 +8,11 @@ ...@@ -8,10 +8,11 @@
#include <linux/limits.h> #include <linux/limits.h>
#include "thread-utils.h"
#include "config.h" #include "config.h"
#include "delta-index.h" #include "delta-index.h"
#include "indexer.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 * The volume index is the primary top-level index for UDS. It contains records which map a record
......
...@@ -9,19 +9,20 @@ ...@@ -9,19 +9,20 @@
#include <linux/dm-bufio.h> #include <linux/dm-bufio.h>
#include <linux/err.h> #include <linux/err.h>
#include "chapter-index.h"
#include "config.h"
#include "errors.h" #include "errors.h"
#include "geometry.h"
#include "hash-utils.h"
#include "index.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "permassert.h" #include "permassert.h"
#include "sparse-cache.h"
#include "string-utils.h" #include "string-utils.h"
#include "thread-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 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 * The remainder of the volume is divided into chapters consisting of several pages of records, and
......
...@@ -11,16 +11,17 @@ ...@@ -11,16 +11,17 @@
#include <linux/dm-bufio.h> #include <linux/dm-bufio.h>
#include <linux/limits.h> #include <linux/limits.h>
#include "permassert.h"
#include "thread-utils.h"
#include "chapter-index.h" #include "chapter-index.h"
#include "config.h" #include "config.h"
#include "geometry.h" #include "geometry.h"
#include "indexer.h" #include "indexer.h"
#include "index-layout.h" #include "index-layout.h"
#include "index-page-map.h" #include "index-page-map.h"
#include "permassert.h"
#include "radix-sort.h" #include "radix-sort.h"
#include "sparse-cache.h" #include "sparse-cache.h"
#include "thread-utils.h"
/* /*
* The volume manages deduplication records on permanent storage. The term "volume" can also refer * The volume manages deduplication records on permanent storage. The term "volume" can also refer
......
...@@ -9,11 +9,12 @@ ...@@ -9,11 +9,12 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
#include "indexer.h"
#include "logger.h" #include "logger.h"
#include "memory-alloc.h" #include "memory-alloc.h"
#include "string-utils.h" #include "string-utils.h"
#include "indexer.h"
#define UDS_SYSFS_NAME "uds" #define UDS_SYSFS_NAME "uds"
static struct { static struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment