Fix: allow get/put subbuf in loop for metadata stream
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 15 Jul 2013 15:26:06 +0000 (11:26 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 15 Jul 2013 15:26:06 +0000 (11:26 -0400)
commitf613e3e6ea34dec9fe9232056bc02f6d80d95965
tree1ad0ef7bbcc866b4f5cfeb597ec45238c16a1829
parentb3c40230ad700b12c39640d8593aece428a2702b
Fix: allow get/put subbuf in loop for metadata stream

data_pending check can trigger the following sequence:

- get_next_subbuf
- put_subbuf
- get_next_subbuf
- put_subbuf
- get_next_subbuf
- put_subbuf
...

and then finally a thread would consume the data:

- get_next_subbuf
- put_next_subbuf

However, we don't want to populate data from the metadata cache into the
stream until put_next_subbuf is issued. Add a check to ensure that it is
not populated until required.

Also, disallow get_subbuf() ioctl on metadata channel: its random-access
semantic does not play well with serialization of the metadata cache on
demand.

Reviewed-by: Julien Desfossez <jdesfossez@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-abi.c
lttng-events.c
lttng-events.h
This page took 0.028145 seconds and 4 git commands to generate.