In case of sync requests coming through allocate-new-block path, it is
incorrect to delay wakeup of fsync-thread. Sync request should always
be processed as soon as possible.

https://jira.sw.ru/browse/PSBM-22381

Signed-off-by: Maxim Patlasov <mpatla...@parallels.com>
---
 drivers/block/ploop/io_direct.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/block/ploop/io_direct.c b/drivers/block/ploop/io_direct.c
index 56b9f37..babc940 100644
--- a/drivers/block/ploop/io_direct.c
+++ b/drivers/block/ploop/io_direct.c
@@ -448,7 +448,8 @@ try_again:
                preq->iblock = iblk;
                list_add_tail(&preq->list, &io->fsync_queue);
                plo->st.bio_syncwait++;
-               if (++io->fsync_qlen >= plo->tune.fsync_max &&
+               if ((test_bit(PLOOP_REQ_SYNC, &preq->state) ||
+                    ++io->fsync_qlen >= plo->tune.fsync_max) &&
                    waitqueue_active(&io->fsync_waitq))
                        wake_up_interruptible(&io->fsync_waitq);
                else if (!timer_pending(&io->fsync_timer))
-- 
1.9.3

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to