projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: Missing rcu_read_lock in cmd_list_events()
[lttng-tools.git]
/
src
/
bin
/
lttng-relayd
/
index.c
diff --git
a/src/bin/lttng-relayd/index.c
b/src/bin/lttng-relayd/index.c
index 8cacdd2f01eb8807d9a5d5de239277b311776256..b7507a022076e0e6be789523111c08f4fcad2d66 100644
(file)
--- a/
src/bin/lttng-relayd/index.c
+++ b/
src/bin/lttng-relayd/index.c
@@
-17,6
+17,7
@@
*/
#define _GNU_SOURCE
*/
#define _GNU_SOURCE
+#define _LGPL_SOURCE
#include <assert.h>
#include <common/common.h>
#include <assert.h>
#include <common/common.h>
@@
-116,7
+117,7
@@
void relay_index_add(struct relay_index *index, struct relay_index **_index)
assert(index);
DBG2("Adding relay index with stream id %" PRIu64 " and seqnum %" PRIu64,
assert(index);
DBG2("Adding relay index with stream id %" PRIu64 " and seqnum %" PRIu64,
- index->
key.key1, index->
key.key2);
+ index->
index_n.key.key1, index->index_n.
key.key2);
node_ptr = cds_lfht_add_unique(indexes_ht->ht,
indexes_ht->hash_fct((void *) &index->index_n.key, lttng_ht_seed),
node_ptr = cds_lfht_add_unique(indexes_ht->ht,
indexes_ht->hash_fct((void *) &index->index_n.key, lttng_ht_seed),
@@
-141,7
+142,8
@@
int relay_index_write(int fd, struct relay_index *index)
struct lttng_ht_iter iter;
DBG2("Writing index for stream ID %" PRIu64 " and seq num %" PRIu64
struct lttng_ht_iter iter;
DBG2("Writing index for stream ID %" PRIu64 " and seq num %" PRIu64
- " on fd %d", index->key.key1, index->key.key2, fd);
+ " on fd %d", index->index_n.key.key1,
+ index->index_n.key.key2, fd);
/* Delete index from hash table. */
iter.iter.node = &index->index_n.node;
/* Delete index from hash table. */
iter.iter.node = &index->index_n.node;
@@
-183,7
+185,8
@@
void relay_index_delete(struct relay_index *index)
struct lttng_ht_iter iter;
DBG3("Relay index with stream ID %" PRIu64 " and seq num %" PRIu64
struct lttng_ht_iter iter;
DBG3("Relay index with stream ID %" PRIu64 " and seq num %" PRIu64
- "deleted.", index->key.key1, index->key.key2);
+ " deleted.", index->index_n.key.key1,
+ index->index_n.key.key2);
/* Delete index from hash table. */
iter.iter.node = &index->index_n.node;
/* Delete index from hash table. */
iter.iter.node = &index->index_n.node;
@@
-201,7
+204,7
@@
void relay_index_destroy_by_stream_id(uint64_t stream_id)
rcu_read_lock();
cds_lfht_for_each_entry(indexes_ht->ht, &iter.iter, index, index_n.node) {
rcu_read_lock();
cds_lfht_for_each_entry(indexes_ht->ht, &iter.iter, index, index_n.node) {
- if (index->key.key1 == stream_id) {
+ if (index->
index_n.
key.key1 == stream_id) {
relay_index_delete(index);
relay_index_free_safe(index);
}
relay_index_delete(index);
relay_index_free_safe(index);
}
This page took
0.024426 seconds
and
4
git commands to generate.