From 1eb467fb0d2fc2ab41f12d9537184fc6ae95b48a Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 13 Jun 2016 13:32:55 -0600 Subject: [PATCH] stat: treat !per_unit_logs() like IO offload mode For IO offload mode, we regrow the logs inline. We need to do the same for !per_unit_logs(), since we log identically for those. Signed-off-by: Jens Axboe --- stat.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/stat.c b/stat.c index 26d8d537..e0e97cd9 100644 --- a/stat.c +++ b/stat.c @@ -1983,11 +1983,14 @@ static struct io_logs *get_cur_log(struct io_log *iolog) return cur_log; /* - * Out of space. If we're in IO offload mode, add a new log chunk - * inline. If we're doing inline submissions, flag 'td' as needing - * a log regrow and we'll take care of it on the submission side. + * Out of space. If we're in IO offload mode, or we're not doing + * per unit logging (hence logging happens outside of the IO thread + * as well), add a new log chunk inline. If we're doing inline + * submissions, flag 'td' as needing a log regrow and we'll take + * care of it on the submission side. */ - if (iolog->td->o.io_submit_mode == IO_MODE_OFFLOAD) + if (iolog->td->o.io_submit_mode == IO_MODE_OFFLOAD || + !per_unit_log(iolog)) return regrow_log(iolog); iolog->td->flags |= TD_F_REGROW_LOGS; -- 2.25.1