X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-relayd%2Findex.h;fp=src%2Fbin%2Flttng-relayd%2Findex.h;h=0000000000000000000000000000000000000000;hp=4364f12ffdb096179e6e736dd821388c4c4bb028;hb=c9e313bc594f40a86eed237dce222c0fc99c957f;hpb=4878de5c7deb512bbdac4fdfc498907efa06fb7c diff --git a/src/bin/lttng-relayd/index.h b/src/bin/lttng-relayd/index.h deleted file mode 100644 index 4364f12ff..000000000 --- a/src/bin/lttng-relayd/index.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef _RELAY_INDEX_H -#define _RELAY_INDEX_H - -/* - * Copyright (C) 2013 Julien Desfossez - * Copyright (C) 2013 David Goulet - * Copyright (C) 2015 Mathieu Desnoyers - * - * SPDX-License-Identifier: GPL-2.0-only - * - */ - -#include -#include - -#include -#include - -struct relay_stream; -struct relay_connection; -struct lttcomm_relayd_index; - -struct relay_index { - /* - * index lock nests inside stream lock. - */ - struct urcu_ref ref; /* Reference from getters. */ - struct relay_stream *stream; /* Back ref to stream */ - - pthread_mutex_t lock; - /* - * index file on which to write the index data. May differ from - * stream->index_file due to tracefile rotation. - */ - struct lttng_index_file *index_file; - - /* Index packet data. This is the data that is written on disk. */ - struct ctf_packet_index index_data; - /* Data + padding size of this packet, filled by the data thread. */ - uint64_t total_size; - - bool has_index_data; - bool flushed; - bool in_hash_table; - - /* - * Node within indexes_ht that corresponds to this struct - * relay_index. Indexed by net_seq_num, which is unique for this - * index across the stream. - */ - struct lttng_ht_node_u64 index_n; - struct rcu_head rcu_node; /* For call_rcu teardown. */ -}; - -struct relay_index *relay_index_get_by_id_or_create(struct relay_stream *stream, - uint64_t net_seq_num); -void relay_index_put(struct relay_index *index); -int relay_index_set_file(struct relay_index *index, - struct lttng_index_file *index_file, - uint64_t data_offset); -int relay_index_set_data(struct relay_index *index, - const struct ctf_packet_index *data); -int relay_index_try_flush(struct relay_index *index); - -void relay_index_close_all(struct relay_stream *stream); -void relay_index_close_partial_fd(struct relay_stream *stream); -uint64_t relay_index_find_last(struct relay_stream *stream); -int relay_index_switch_all_files(struct relay_stream *stream); -int relay_index_set_control_data(struct relay_index *index, - const struct lttcomm_relayd_index *data, - unsigned int minor_version); - -#endif /* _RELAY_INDEX_H */