From: linux@treblig.org
To: agk@redhat.com, snitzer@kernel.org, mpatocka@redhat.com,
msakai@redhat.com
Cc: dm-devel@lists.linux.dev, linux-kernel@vger.kernel.org,
"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH 9/9] dm vdo: Remove unused uds_compute_index_size
Date: Thu, 3 Oct 2024 02:15:54 +0100 [thread overview]
Message-ID: <20241003011554.266654-10-linux@treblig.org> (raw)
In-Reply-To: <20241003011554.266654-1-linux@treblig.org>
From: "Dr. David Alan Gilbert" <linux@treblig.org>
uds_compute_index_size() has been unused since it was added in
commit b46d79bdb82a ("dm vdo: add deduplication index storage interface")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
drivers/md/dm-vdo/indexer/index-layout.c | 26 ------------------------
drivers/md/dm-vdo/indexer/indexer.h | 4 ----
2 files changed, 30 deletions(-)
diff --git a/drivers/md/dm-vdo/indexer/index-layout.c b/drivers/md/dm-vdo/indexer/index-layout.c
index 627adc24af3b..af8fab83b0f3 100644
--- a/drivers/md/dm-vdo/indexer/index-layout.c
+++ b/drivers/md/dm-vdo/indexer/index-layout.c
@@ -248,32 +248,6 @@ static int __must_check compute_sizes(const struct uds_configuration *config,
return UDS_SUCCESS;
}
-int uds_compute_index_size(const struct uds_parameters *parameters, u64 *index_size)
-{
- int result;
- struct uds_configuration *index_config;
- struct save_layout_sizes sizes;
-
- if (index_size == NULL) {
- vdo_log_error("Missing output size pointer");
- return -EINVAL;
- }
-
- result = uds_make_configuration(parameters, &index_config);
- if (result != UDS_SUCCESS) {
- vdo_log_error_strerror(result, "cannot compute index size");
- return uds_status_to_errno(result);
- }
-
- result = compute_sizes(index_config, &sizes);
- uds_free_configuration(index_config);
- if (result != UDS_SUCCESS)
- return uds_status_to_errno(result);
-
- *index_size = sizes.total_size;
- return UDS_SUCCESS;
-}
-
/* Create unique data using the current time and a pseudorandom number. */
static void create_unique_nonce_data(u8 *buffer)
{
diff --git a/drivers/md/dm-vdo/indexer/indexer.h b/drivers/md/dm-vdo/indexer/indexer.h
index 3744aaf625b0..183a94eb7e92 100644
--- a/drivers/md/dm-vdo/indexer/indexer.h
+++ b/drivers/md/dm-vdo/indexer/indexer.h
@@ -283,10 +283,6 @@ struct uds_request {
enum uds_index_region location;
};
-/* Compute the number of bytes needed to store an index. */
-int __must_check uds_compute_index_size(const struct uds_parameters *parameters,
- u64 *index_size);
-
/* A session is required for most index operations. */
int __must_check uds_create_index_session(struct uds_index_session **session);
--
2.46.2
next prev parent reply other threads:[~2024-10-03 1:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 1:15 [PATCH 0/9] dm deadcoding linux
2024-10-03 1:15 ` [PATCH 1/9] dm cache: Remove unused btracker_nr_writebacks_queued linux
2024-10-03 1:15 ` [PATCH 2/9] dm cache: Remove unused dm_cache_dump linux
2024-10-03 1:15 ` [PATCH 3/9] dm cache: Remove unused dm_cache_size linux
2024-10-03 1:15 ` [PATCH 4/9] dm cache: Remove unused functions in bio-prison-v1 linux
2024-10-03 1:15 ` [PATCH 5/9] dm: Remove unused dm_set_md_type linux
2024-10-03 1:15 ` [PATCH 6/9] dm: Remove unused dm_table_bio_based linux
2024-10-03 1:15 ` [PATCH 7/9] dm: zoned: Remove unused functions linux
2024-10-03 1:15 ` [PATCH 8/9] dm vdo: " linux
2024-10-03 15:43 ` Matthew Sakai
2024-10-03 1:15 ` linux [this message]
2024-10-03 15:43 ` [PATCH 9/9] dm vdo: Remove unused uds_compute_index_size Matthew Sakai
2024-10-21 11:55 ` [PATCH 0/9] dm deadcoding Mikulas Patocka
2024-10-21 12:02 ` Dr. David Alan Gilbert
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=20241003011554.266654-10-linux@treblig.org \
--to=linux@treblig.org \
--cc=agk@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=msakai@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox