stat: treat !per_unit_logs() like IO offload mode
authorJens Axboe <axboe@fb.com>
Mon, 13 Jun 2016 19:32:55 +0000 (13:32 -0600)
committerJens Axboe <axboe@fb.com>
Mon, 13 Jun 2016 19:32:55 +0000 (13:32 -0600)
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 <axboe@fb.com>
stat.c

diff --git a/stat.c b/stat.c
index 26d8d537df9eac65c23cb1b6e5ffc19d9fc5af54..e0e97cd923c18324ecc35597ba782495eb1e444a 100644 (file)
--- 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;