diff options
author | Sami Tolvanen <samitolvanen@google.com> | 2015-06-29 09:14:00 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2015-08-12 11:32:20 -0400 |
commit | 4fb9aa5abdb791defedb3a5ce254ad193e82d77b (patch) | |
tree | d817e3665b256d96cb681da1d8e79d07089c45a0 | |
parent | e44b6a5a3c711c1ada4cf7135bf9dbf860caffd2 (diff) |
dm verity: remove unused mempool
Since commit 003b5c571 ("block: Convert drivers to immutable biovecs"),
vec_mempool in struct dm_verity is no longer used. Remove it and
related definitions.
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
-rw-r--r-- | drivers/md/dm-verity.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/md/dm-verity.c b/drivers/md/dm-verity.c index bb9c6a00e4b0..3adb3323b8c3 100644 --- a/drivers/md/dm-verity.c +++ b/drivers/md/dm-verity.c | |||
@@ -26,8 +26,6 @@ | |||
26 | #define DM_VERITY_ENV_LENGTH 42 | 26 | #define DM_VERITY_ENV_LENGTH 42 |
27 | #define DM_VERITY_ENV_VAR_NAME "DM_VERITY_ERR_BLOCK_NR" | 27 | #define DM_VERITY_ENV_VAR_NAME "DM_VERITY_ERR_BLOCK_NR" |
28 | 28 | ||
29 | #define DM_VERITY_IO_VEC_INLINE 16 | ||
30 | #define DM_VERITY_MEMPOOL_SIZE 4 | ||
31 | #define DM_VERITY_DEFAULT_PREFETCH_SIZE 262144 | 29 | #define DM_VERITY_DEFAULT_PREFETCH_SIZE 262144 |
32 | 30 | ||
33 | #define DM_VERITY_MAX_LEVELS 63 | 31 | #define DM_VERITY_MAX_LEVELS 63 |
@@ -76,8 +74,6 @@ struct dm_verity { | |||
76 | enum verity_mode mode; /* mode for handling verification errors */ | 74 | enum verity_mode mode; /* mode for handling verification errors */ |
77 | unsigned corrupted_errs;/* Number of errors for corrupted blocks */ | 75 | unsigned corrupted_errs;/* Number of errors for corrupted blocks */ |
78 | 76 | ||
79 | mempool_t *vec_mempool; /* mempool of bio vector */ | ||
80 | |||
81 | struct workqueue_struct *verify_wq; | 77 | struct workqueue_struct *verify_wq; |
82 | 78 | ||
83 | /* starting blocks for each tree level. 0 is the lowest level. */ | 79 | /* starting blocks for each tree level. 0 is the lowest level. */ |
@@ -691,9 +687,6 @@ static void verity_dtr(struct dm_target *ti) | |||
691 | if (v->verify_wq) | 687 | if (v->verify_wq) |
692 | destroy_workqueue(v->verify_wq); | 688 | destroy_workqueue(v->verify_wq); |
693 | 689 | ||
694 | if (v->vec_mempool) | ||
695 | mempool_destroy(v->vec_mempool); | ||
696 | |||
697 | if (v->bufio) | 690 | if (v->bufio) |
698 | dm_bufio_client_destroy(v->bufio); | 691 | dm_bufio_client_destroy(v->bufio); |
699 | 692 | ||
@@ -962,14 +955,6 @@ static int verity_ctr(struct dm_target *ti, unsigned argc, char **argv) | |||
962 | 955 | ||
963 | ti->per_bio_data_size = roundup(sizeof(struct dm_verity_io) + v->shash_descsize + v->digest_size * 2, __alignof__(struct dm_verity_io)); | 956 | ti->per_bio_data_size = roundup(sizeof(struct dm_verity_io) + v->shash_descsize + v->digest_size * 2, __alignof__(struct dm_verity_io)); |
964 | 957 | ||
965 | v->vec_mempool = mempool_create_kmalloc_pool(DM_VERITY_MEMPOOL_SIZE, | ||
966 | BIO_MAX_PAGES * sizeof(struct bio_vec)); | ||
967 | if (!v->vec_mempool) { | ||
968 | ti->error = "Cannot allocate vector mempool"; | ||
969 | r = -ENOMEM; | ||
970 | goto bad; | ||
971 | } | ||
972 | |||
973 | /* WQ_UNBOUND greatly improves performance when running on ramdisk */ | 958 | /* WQ_UNBOUND greatly improves performance when running on ramdisk */ |
974 | v->verify_wq = alloc_workqueue("kverityd", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | WQ_UNBOUND, num_online_cpus()); | 959 | v->verify_wq = alloc_workqueue("kverityd", WQ_CPU_INTENSIVE | WQ_MEM_RECLAIM | WQ_UNBOUND, num_online_cpus()); |
975 | if (!v->verify_wq) { | 960 | if (!v->verify_wq) { |