linux/drivers/md/persistent-data/dm-space-map.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2011 Red Hat, Inc.
 *
 * This file is released under the GPL.
 */

#ifndef _LINUX_DM_SPACE_MAP_H
#define _LINUX_DM_SPACE_MAP_H

#include "dm-block-manager.h"

dm_sm_threshold_fn;

/*
 * struct dm_space_map keeps a record of how many times each block in a device
 * is referenced.  It needs to be fixed on disk as part of the transaction.
 */
struct dm_space_map {};

/*----------------------------------------------------------------*/

static inline void dm_sm_destroy(struct dm_space_map *sm)
{}

static inline int dm_sm_extend(struct dm_space_map *sm, dm_block_t extra_blocks)
{}

static inline int dm_sm_get_nr_blocks(struct dm_space_map *sm, dm_block_t *count)
{}

static inline int dm_sm_get_nr_free(struct dm_space_map *sm, dm_block_t *count)
{}

static inline int dm_sm_get_count(struct dm_space_map *sm, dm_block_t b,
				  uint32_t *result)
{}

static inline int dm_sm_count_is_more_than_one(struct dm_space_map *sm,
					       dm_block_t b, int *result)
{}

static inline int dm_sm_set_count(struct dm_space_map *sm, dm_block_t b,
				  uint32_t count)
{}

static inline int dm_sm_commit(struct dm_space_map *sm)
{}

static inline int dm_sm_inc_blocks(struct dm_space_map *sm, dm_block_t b, dm_block_t e)
{}

static inline int dm_sm_inc_block(struct dm_space_map *sm, dm_block_t b)
{}

static inline int dm_sm_dec_blocks(struct dm_space_map *sm, dm_block_t b, dm_block_t e)
{}

static inline int dm_sm_dec_block(struct dm_space_map *sm, dm_block_t b)
{}

static inline int dm_sm_new_block(struct dm_space_map *sm, dm_block_t *b)
{}

static inline int dm_sm_root_size(struct dm_space_map *sm, size_t *result)
{}

static inline int dm_sm_copy_root(struct dm_space_map *sm, void *copy_to_here_le, size_t len)
{}

static inline int dm_sm_register_threshold_callback(struct dm_space_map *sm,
						    dm_block_t threshold,
						    dm_sm_threshold_fn fn,
						    void *context)
{}


#endif	/* _LINUX_DM_SPACE_MAP_H */