- /*
- * Get the session maximum size for a snapshot meaning it will compute the
- * size of all streams from all domain.
- */
- max_stream_size = get_session_max_subbuf_size(session);
-
- nb_streams = get_session_nb_streams(session);
- if (nb_streams) {
- /*
- * The maximum size of the snapshot is the number of streams multiplied
- * by the biggest subbuf size of all channels in a session which is the
- * maximum stream size available for each stream. The session max size
- * is now checked against the snapshot max size value given by the user
- * and if lower, an error is returned.
- */
- session_max_size = max_stream_size * nb_streams;
- }
-
- DBG3("Snapshot max size is %" PRIu64 " for max stream size of %" PRIu64,
- session_max_size, max_stream_size);
-
- /*
- * If we use a temporary output, check right away if the max size fits else
- * for each output the max size will be checked.
- */
- if (use_tmp_output &&
- (tmp_output.max_size != 0 &&
- tmp_output.max_size < session_max_size)) {
- ret = LTTNG_ERR_MAX_SIZE_INVALID;
- goto error;
- }
-