We can infinitely recurse if we do that, if log_compression= is set.
Signed-off-by: Jens Axboe <axboe@fb.com>
{
struct iolog_flush_data *data;
{
struct iolog_flush_data *data;
- io_u_quiesce(log->td);
-
data = malloc(sizeof(*data));
if (!data)
return 1;
data = malloc(sizeof(*data));
if (!data)
return 1;
new_samples = MAX_LOG_ENTRIES;
}
new_samples = MAX_LOG_ENTRIES;
}
- /*
- * If the alloc size is sufficiently large, quiesce pending IO before
- * attempting it. This is to avoid spending a long time in alloc with
- * IO pending, which will unfairly skew the completion latencies of
- * inflight IO.
- */
new_size = new_samples * log_entry_sz(iolog);
new_size = new_samples * log_entry_sz(iolog);
- if (new_size >= LOG_QUIESCE_SZ)
- io_u_quiesce(iolog->td);
cur_log = malloc(sizeof(*cur_log));
if (cur_log) {
cur_log = malloc(sizeof(*cur_log));
if (cur_log) {
* Get a new log array, and add to our list
*/
cur_log = get_new_log(iolog);
* Get a new log array, and add to our list
*/
cur_log = get_new_log(iolog);
- if (!cur_log) {
- log_err("fio: failed extending iolog! Will stop logging.\n");
- return NULL;
- }
+ if (cur_log)
+ return cur_log;
+ log_err("fio: failed extending iolog! Will stop logging.\n");
+ return NULL;
}
static void __add_log_sample(struct io_log *iolog, unsigned long val,
}
static void __add_log_sample(struct io_log *iolog, unsigned long val,