Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
}
pthread_mutex_unlock(socket->lock);
}
- ret = kernctl_session_metadata_cache_dump(ksess->fd);
- if (ret < 0) {
- ERR("Dump the kernel metadata cache");
- goto error;
- }
ret = LTTNG_OK;
if (ret < 0) {
goto error;
}
-
- /* TODO: regenerate metadata here instead of at the end ? */
}
break;
}
if (ret < 0) {
goto error;
}
-
- /*
- ret = regenerate_per_pid_metadata(usess, app, registry);
- if (ret < 0) {
- goto error;
- }
- */
}
break;
}
}
stream->index_file = index_file;
stream->out_fd_offset = 0;
+ } else {
+ /*
+ * Reset the position of what has been read from the metadata
+ * cache to 0 so we can dump it again.
+ */
+ ret = kernctl_metadata_cache_dump(stream->wait_fd);
+ if (ret < 0) {
+ ERR("Failed to dump the metadata cache after rotation");
+ goto error;
+ }
}
stream->rotate_position = 0;