Skip to content

Commit b0e6210

Browse files
Dr. David Alan GilbertMikulas Patocka
authored andcommitted
dm vdo: Remove unused uds_compute_index_size
uds_compute_index_size() has been unused since it was added in commit b46d79b ("dm vdo: add deduplication index storage interface") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Reviewed-by: Matthew Sakai <msakai@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
1 parent 295815f commit b0e6210

File tree

2 files changed

+0
-30
lines changed

2 files changed

+0
-30
lines changed

drivers/md/dm-vdo/indexer/index-layout.c

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -248,32 +248,6 @@ static int __must_check compute_sizes(const struct uds_configuration *config,
248248
return UDS_SUCCESS;
249249
}
250250

251-
int uds_compute_index_size(const struct uds_parameters *parameters, u64 *index_size)
252-
{
253-
int result;
254-
struct uds_configuration *index_config;
255-
struct save_layout_sizes sizes;
256-
257-
if (index_size == NULL) {
258-
vdo_log_error("Missing output size pointer");
259-
return -EINVAL;
260-
}
261-
262-
result = uds_make_configuration(parameters, &index_config);
263-
if (result != UDS_SUCCESS) {
264-
vdo_log_error_strerror(result, "cannot compute index size");
265-
return uds_status_to_errno(result);
266-
}
267-
268-
result = compute_sizes(index_config, &sizes);
269-
uds_free_configuration(index_config);
270-
if (result != UDS_SUCCESS)
271-
return uds_status_to_errno(result);
272-
273-
*index_size = sizes.total_size;
274-
return UDS_SUCCESS;
275-
}
276-
277251
/* Create unique data using the current time and a pseudorandom number. */
278252
static void create_unique_nonce_data(u8 *buffer)
279253
{

drivers/md/dm-vdo/indexer/indexer.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,6 @@ struct uds_request {
283283
enum uds_index_region location;
284284
};
285285

286-
/* Compute the number of bytes needed to store an index. */
287-
int __must_check uds_compute_index_size(const struct uds_parameters *parameters,
288-
u64 *index_size);
289-
290286
/* A session is required for most index operations. */
291287
int __must_check uds_create_index_session(struct uds_index_session **session);
292288

0 commit comments

Comments
 (0)