os/FileJournal: Only using aio then alloc the related resources.

If define HAVE_LIBAIO, it alloc related resouces. But itt don't check whether
using aio mode. Only using aio it alloc the related resources.

Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
os/FileJournal: For journal-aio-mode, don't use aio when closing journal.

For jouranl-aio-mode when closing journal, the write_finish_thread_entry may exit before
write_thread_entry. This cause no one wait last aios to complete.
On some platform, after that the journal-header on journal corrupted.
To avoid this, when closing jouranl we don't use aio.

Fixes: 9073
Reported-by: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Tested-by: Mark Kirkwood <mark.kirkwood@catalyst.net.nz>
Signed-off-by: Ma Jianpeng <jianpeng.ma@intel.com>
tracing: bootstrap lttng-ust with mutex events

See src/tracing/README.md

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
lttng: trace mutex::unlock

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
lttng: add pg and osd tracepoints

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
lttng: Check for lttng/tracepoint.h when configuring
tracing: automake-ify tracepoint generation

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
lttng: Trace OpRequest

Signed-off-by: Adam Crume <adamcrume@gmail.com>
lttng: Add rmw_flags to tracepoint in PG::queue_op

Signed-off-by: Adam Crume <adamcrume@gmail.com>
lttng: Trace ReplicatedPG::do_osd_ops

Signed-off-by: Adam Crume <adamcrume@gmail.com>
lttng: Add tracing-common.h

Signed-off-by: Adam Crume <adamcrume@gmail.com>
examples: Add example for the librados C API

Simply copied and modified the C++ API example.

Signed-off-by: Adam Crume <adamcrume@gmail.com>
lttng: Trace librados C API

Signed-off-by: Adam Crume <adamcrume@gmail.com>
lttng: Prevent creation of incorrect .o files when generating from .tp

Signed-off-by: Adam Crume <adamcrume@gmail.com>
lttng: Prevent deletion of tracing-common.h when cleaning

Signed-off-by: Adam Crume <adamcrume@gmail.com>
lttng: Split up libtracepoints

Signed-off-by: Adam Crume <adamcrume@gmail.com>
lttng: Remove 'ver' from trace in code for CEPH_OSD_OP_NOTIFY

'ver' is obsolete and variable exists only for proper deserialization

Signed-off-by: Adam Crume <adamcrume@gmail.com>
lttng: Basic tracing of librbd

Signed-off-by: Adam Crume <adamcrume@gmail.com>
tracing: instrument filestore

This adds objectstore tracepoints for the filestore. It'd be nice to add
these to the objectstore interface some how so we can get all
implementations for free, but that might just be a bit difficult
especially since each impl will apply transactions in a differnet way.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
lttng: Add more tracing to librbd

Includes:
- aio_complete
- aio_discard
- aio_flush
- aio_get_return_value
- aio_is_complete
- aio_read
- aio_wait_for_complete
- aio_write
- copy
- discard
- flush
- invalidate_cache
- rename
- resize
- Add ImageCtx pointer to trace points
- Add snap_name and readonly flag to trace point open_image_enter

Signed-off-by: Adam Crume <adamcrume@gmail.com>