fd-tracker: refactor: extract fs_handle interface from fd_tracker
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 21 Jan 2020 00:44:07 +0000 (19:44 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 30 Jan 2020 06:55:34 +0000 (01:55 -0500)
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


No differences found
This page took 0.026028 seconds and 5 git commands to generate.