From: Jérémie Galarneau Date: Tue, 21 Jan 2020 00:44:07 +0000 (-0500) Subject: fd-tracker: refactor: extract fs_handle interface from fd_tracker X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=f5ea02416c656bba136e742788f2d5ae12b98278;hp=f5ea02416c656bba136e742788f2d5ae12b98278 fd-tracker: refactor: extract fs_handle interface from fd_tracker Make the fs_handle interface a proper abstract interface containing overridable callbacks. The objective of this refactor is to make it possible for lttng_trace_chunk to return fs_handles which are tracked by an fd_tracker (or not) depending on the execution context (which daemon). In effect, the relay daemon will provide a trace chunk with an fd_tracker to use and then rely on the fs_handle interface to track the use of file descriptors. The other daemons using the lttng_trace_chunk interface will use a dummy implementation of fs_handle which basically directly returns the underlying file descriptor and performs the unlink/close operations directly. This makes is possible to share code interacting with files between the various daemons without carrying a plethora of optional parameters in every util. Signed-off-by: Jérémie Galarneau Change-Id: Iaafa0f4442442bdfdaf220ce33a966978877df23 ---