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 <jeremie.galarneau@efficios.com>
Change-Id: Iaafa0f4442442bdfdaf220ce33a966978877df23
This page took 0.025257 seconds and 4 git commands to generate.