relayd: register fd tracker instance to all created trace chunks
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Jan 2020 06:51:10 +0000 (01:51 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Jan 2020 19:46:10 +0000 (14:46 -0500)
Provide a reference to 'the_fd_tracker' to trace chunks during their
creation. This causes file descriptors created through the relay
daemon's trace chunks to be tracked by the daemon's fd tracker.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Change-Id: I9c96851ef06bb7f0be0c7f3e8b7f01638f13fbda

src/bin/lttng-relayd/main.c
src/bin/lttng-relayd/session.c

index 00292a02d6545db9d5b94cb4e08939e9b739a723..4a2258d34abeb96be16ddcc0ae34a42c167d23f3 100644 (file)
@@ -2724,6 +2724,7 @@ static int relay_create_trace_chunk(const struct lttcomm_relayd_hdr *recv_hdr,
                reply_code = LTTNG_ERR_NOMEM;
                goto end;
        }
+       lttng_trace_chunk_set_fd_tracker(chunk, the_fd_tracker);
 
        if (msg->override_name_length) {
                const char *name;
index d838385210389642950213d8fe5b68a47a586a97..5d5aa4c643d8e0d289fd9499d177277fdd068c81 100644 (file)
@@ -241,6 +241,8 @@ static int session_set_anonymous_chunk(struct relay_session *session)
                ret = -1;
                goto end;
        }
+
+       lttng_trace_chunk_set_fd_tracker(chunk, the_fd_tracker);
        output_directory = NULL;
        session->current_trace_chunk = chunk;
        chunk = NULL;
This page took 0.027374 seconds and 4 git commands to generate.