The snapshot_mode flag of an ltt_session only affects the default
channel creation attributes. It is not used to prevent the
modification of snapshot outputs.
Since a snapshot session is necessarily in "no-output" mode, it
is redundant to check for this flag in rotation-related commands.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
goto end;
}
- if (session->live_timer || session->snapshot_mode ||
- !session->output_traces) {
+ if (session->live_timer || !session->output_traces) {
cmd_ret = LTTNG_ERR_ROTATION_NOT_AVAILABLE;
goto end;
}
DBG("Cmd rotate set schedule session %s", session->name);
- if (session->live_timer || session->snapshot_mode ||
- !session->output_traces) {
+ if (session->live_timer || !session->output_traces) {
DBG("Failing ROTATION_SET_SCHEDULE command as the rotation feature is not available for this session");
ret = LTTNG_ERR_ROTATION_NOT_AVAILABLE;
goto end;
/* Indicate if the session has to output the traces or not. */
unsigned int output_traces;
/*
- * This session is in snapshot mode. This means that every channel enabled
- * will be set in overwrite mode and mmap. It is considered exclusively for
- * snapshot purposes.
+ * This session is in snapshot mode. This means that channels enabled
+ * will be set in overwrite mode by default and must be in mmap
+ * output mode. Note that snapshots can be taken on a session that
+ * is not in "snapshot_mode". This parameter only affects channel
+ * creation defaults.
*/
unsigned int snapshot_mode;
/*