Skip to content

Commit

Permalink
dm vdo: internalize sysfs-only functions
Browse files Browse the repository at this point in the history
David Alan Gibert, upstream, wants to remove these functions
because they are no longer used in the kernel. But we need them
for sysfs, so hide them instead.

Cf. commit 2ca99346cd62 ("dm vdo: Remove unused functions")

Signed-off-by: Matthew Sakai <[email protected]>
  • Loading branch information
lorelei-sakai committed Nov 4, 2024
1 parent 63a477e commit c8b07c7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
29 changes: 0 additions & 29 deletions drivers/md/dm-vdo/data-vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,35 +1075,6 @@ void dump_data_vio_pool(struct data_vio_pool *pool, bool dump_vios)
spin_unlock(&pool->lock);
}

data_vio_count_t get_data_vio_pool_active_discards(struct data_vio_pool *pool)
{
return READ_ONCE(pool->discard_limiter.busy);
}

data_vio_count_t get_data_vio_pool_discard_limit(struct data_vio_pool *pool)
{
return READ_ONCE(pool->discard_limiter.limit);
}

data_vio_count_t get_data_vio_pool_maximum_discards(struct data_vio_pool *pool)
{
return READ_ONCE(pool->discard_limiter.max_busy);
}

int set_data_vio_pool_discard_limit(struct data_vio_pool *pool, data_vio_count_t limit)
{
if (get_data_vio_pool_request_limit(pool) < limit) {
// The discard limit may not be higher than the data_vio limit.
return -EINVAL;
}

spin_lock(&pool->lock);
pool->discard_limiter.limit = limit;
spin_unlock(&pool->lock);

return VDO_SUCCESS;
}

data_vio_count_t get_data_vio_pool_active_requests(struct data_vio_pool *pool)
{
return READ_ONCE(pool->limiter.busy);
Expand Down
5 changes: 0 additions & 5 deletions drivers/md/dm-vdo/data-vio.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,6 @@ void drain_data_vio_pool(struct data_vio_pool *pool, struct vdo_completion *comp
void resume_data_vio_pool(struct data_vio_pool *pool, struct vdo_completion *completion);

void dump_data_vio_pool(struct data_vio_pool *pool, bool dump_vios);
data_vio_count_t get_data_vio_pool_active_discards(struct data_vio_pool *pool);
data_vio_count_t get_data_vio_pool_discard_limit(struct data_vio_pool *pool);
data_vio_count_t get_data_vio_pool_maximum_discards(struct data_vio_pool *pool);
int __must_check set_data_vio_pool_discard_limit(struct data_vio_pool *pool,
data_vio_count_t limit);
data_vio_count_t get_data_vio_pool_active_requests(struct data_vio_pool *pool);
data_vio_count_t get_data_vio_pool_request_limit(struct data_vio_pool *pool);
data_vio_count_t get_data_vio_pool_maximum_requests(struct data_vio_pool *pool);
Expand Down

0 comments on commit c8b07c7

Please sign in to comment.