linux/drivers/md/dm-vdo/indexer/index-session.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright 2023 Red Hat
 */

#ifndef UDS_INDEX_SESSION_H
#define UDS_INDEX_SESSION_H

#include <linux/atomic.h>
#include <linux/cache.h>

#include "thread-utils.h"

#include "config.h"
#include "indexer.h"

/*
 * The index session mediates all interactions with a UDS index. Once the index session is created,
 * it can be used to open, close, suspend, or recreate an index. It implements the majority of the
 * functions in the top-level UDS API.
 *
 * If any deduplication request fails due to an internal error, the index is marked disabled. It
 * will not accept any further requests and can only be closed. Closing the index will clear the
 * disabled flag, and the index can then be reopened and recovered using the same index session.
 */

struct __aligned(L1_CACHE_BYTES) session_stats {};

enum index_suspend_status {};

struct index_load_context {};

struct uds_index_session {};

#endif /* UDS_INDEX_SESSION_H */