[Devel] [PATCH rh7 09/38] ploop: fix sync delay for sync requests

Andrey Smetanin asmetanin at virtuozzo.com
Fri May 15 09:48:10 PDT 2015


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 <MPatlasov at 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




More information about the Devel mailing list