Docs: clarify the meaning of the snapshot_mode flag in ltt_session
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 27 Mar 2019 18:12:47 +0000 (14:12 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 28 Mar 2019 19:52:47 +0000 (15:52 -0400)
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>
src/bin/lttng-sessiond/cmd.c
src/bin/lttng-sessiond/session.h

index d91869fae8c5d69ac3c3ad88ca20e9a902d0f587..0330186209268cb63b49175e08d4a4102d07e96a 100644 (file)
@@ -4499,8 +4499,7 @@ int cmd_rotate_session(struct ltt_session *session,
                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;
        }
@@ -4849,8 +4848,7 @@ int cmd_rotation_set_schedule(struct ltt_session *session,
 
        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;
index 6a0da6c164f95a48b15a2e0250611d77a0dcf2ec..82e409521c440c621f06d5d46a86d8cc380e6d6c 100644 (file)
@@ -114,9 +114,11 @@ struct ltt_session {
        /* 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;
        /*
This page took 0.02741 seconds and 4 git commands to generate.