From: Mathieu Desnoyers Date: Wed, 11 Dec 2019 18:19:13 +0000 (-0500) Subject: common: index and trace-chunk file creation/open API change X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=3ff5c5db220d92baf64280ba54713fcafe76142e;hp=3ff5c5db220d92baf64280ba54713fcafe76142e common: index and trace-chunk file creation/open API change An API change to the common libraries is required for the following functions to accomodate the clear feature: - lttng_trace_chunk_open_file(), - lttng_index_file_create_from_trace_chunk(), - lttng_index_file_create_from_trace_chunk_read_only(). An "expect_no_file" boolean is introduced, allowing specific invocation to consider a ENOENT errno as an expected condition (and not an error). This is the case for instance for relayd live viewer_stream_rotate(), which can fail to open files in the new chunk after a clear with per-pid buffers. Same goes for viewer_get_next_index() and try_open_index(). Change the lttng_index_file_create_from_trace_chunk_read_only and lttng_index_file_create_from_trace_chunk to allow them to return a chunk status, which allows the callers to distinguish between errors and a "no file" status, and deal with the situation accordingly. Signed-off-by: Mathieu Desnoyers Change-Id: I3c43edca01629488c4e777078db7ffd2e88dc7ea Signed-off-by: Jérémie Galarneau ---