X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fchannel.c;h=1621bc626bba7d72b52098b8c1798ee859d80c70;hp=6c7422b292dcb3ffd21665468c0f15cc6a728180;hb=1624d5b7ba86633d36f3a5c86ea1df5d308c4360;hpb=6d5d85c79765744fcad6ba189a256784b825e7bf diff --git a/src/bin/lttng-sessiond/channel.c b/src/bin/lttng-sessiond/channel.c index 6c7422b29..1621bc626 100644 --- a/src/bin/lttng-sessiond/channel.c +++ b/src/bin/lttng-sessiond/channel.c @@ -272,6 +272,16 @@ int channel_ust_create(struct ltt_ust_session *usess, goto error; } + /* + * The tracefile_size should not be < to the subbuf_size, otherwise + * we won't be able to write the packets on disk + */ + if ((attr->attr.tracefile_size > 0) && + (attr->attr.tracefile_size < attr->attr.subbuf_size)) { + ret = LTTNG_ERR_INVALID; + goto error; + } + /* Create UST channel */ uchan = trace_ust_create_channel(attr, usess->pathname); if (uchan == NULL) {