prep dskreqs when adding blocks

parent fc01b8c1
...@@ -2258,6 +2258,8 @@ logbuffer_prep_dskreqs(struct fellow_logbuffer *lbuf, unsigned urgent) ...@@ -2258,6 +2258,8 @@ logbuffer_prep_dskreqs(struct fellow_logbuffer *lbuf, unsigned urgent)
if (lbuf->dskreqs != NULL) if (lbuf->dskreqs != NULL)
return; return;
assert(logbuffer_can(lbuf, LBUF_CAN_FLUSH));
/* /*
* when the log region is becoming full, start * when the log region is becoming full, start
* pre-allocating disk blocks. For this, we need * pre-allocating disk blocks. For this, we need
...@@ -3065,6 +3067,8 @@ logbuffer_addblks(struct fellow_fd *ffd, ...@@ -3065,6 +3067,8 @@ logbuffer_addblks(struct fellow_fd *ffd,
assert(n >= 1); assert(n >= 1);
AZ(lbuf->active.block); AZ(lbuf->active.block);
} }
if(logbuffer_can(lbuf, LBUF_CAN_FLUSH))
logbuffer_prep_dskreqs(lbuf, 0);
} }
enum getblk_e { enum getblk_e {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment