<HTML><BODY><div>Thanks for the patch! LGTM.</div><div> </div><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;">Четверг, 20 августа 2020, 0:35 +03:00 от Cyrill Gorcunov <gorcunov@gmail.com>:<br> <div id=""><div class="js-helper js-readmsg-msg"><style type="text/css"></style><div><div id="style_15978729250729173567_BODY">To create raw journal entries. We will use it<br>to write confirm/rollback entries.<br><br>Part-of #5129<br><br>Signed-off-by: Cyrill Gorcunov <<a href="/compose?To=gorcunov@gmail.com">gorcunov@gmail.com</a>><br>---<br> src/box/journal.c | 8 ++------<br> src/box/journal.h | 16 ++++++++++++++++<br> 2 files changed, 18 insertions(+), 6 deletions(-)<br><br>diff --git a/src/box/journal.c b/src/box/journal.c<br>index 48af9157b..cb320b557 100644<br>--- a/src/box/journal.c<br>+++ b/src/box/journal.c<br>@@ -51,11 +51,7 @@ journal_entry_new(size_t n_rows, struct region *region,<br>  return NULL;<br>  }<br> <br>- entry->write_async_cb = write_async_cb;<br>- entry->complete_data = complete_data;<br>- entry->approx_len = 0;<br>- entry->n_rows = n_rows;<br>- entry->res = -1;<br>-<br>+ journal_entry_create(entry, n_rows, 0, write_async_cb,<br>+ complete_data);<br>  return entry;<br> }<br>diff --git a/src/box/journal.h b/src/box/journal.h<br>index 4b019fecf..5d8d5a726 100644<br>--- a/src/box/journal.h<br>+++ b/src/box/journal.h<br>@@ -83,6 +83,22 @@ struct journal_entry {<br> <br> struct region;<br> <br>+/**<br>+ * Initialize a new journal entry.<br>+ */<br>+static inline void<br>+journal_entry_create(struct journal_entry *entry, size_t n_rows,<br>+ size_t approx_len,<br>+ journal_write_async_f write_async_cb,<br>+ void *complete_data)<br>+{<br>+ entry->write_async_cb = write_async_cb;<br>+ entry->complete_data = complete_data;<br>+ entry->approx_len = approx_len;<br>+ entry->n_rows = n_rows;<br>+ entry->res = -1;<br>+}<br>+<br> /**<br>  * Create a new journal entry.<br>  *<br>--<br>2.26.2</div></div></div></div></blockquote><div><div> <div><div>--<br>Serge Petrenko</div></div></div></div><div> </div></BODY></HTML>