From: Jérémie Galarneau Date: Sun, 10 May 2020 22:00:26 +0000 (-0400) Subject: consumerd: refactor: split read_subbuf into sub-operations X-Git-Tag: v2.11.5~27 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=6f1177cf8de79015ed38f48749029c81240b0eb6;hp=6f1177cf8de79015ed38f48749029c81240b0eb6;p=lttng-tools.git consumerd: refactor: split read_subbuf into sub-operations The read_subbuf code paths intertwine domain-specific operations and metadata/data-specific logic which makes modifications error prone and introduces a fair amount of code duplication. lttng_consumer_read_subbuffer is effectively turned into a template method invoking overridable callbacks making most of the consumption logic domain and data/metadata agnostic. The goal is not to extensively clean-up that code path. A follow-up fix introduces metadata buffering logic which would not reasonably fit in the current scheme. This clean-up makes it easier to safely introduce those changes. No changes in behaviour are intended by this change. Signed-off-by: Jérémie Galarneau Change-Id: I9366f2e2a38018ca9b617b93ad9259340180c55d ---