[Devel] [PATCH RHEL7 COMMIT] ploop: fix sync delay for sync requests

Konstantin Khorenko khorenko at odin.com
Mon May 18 21:26:59 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.1
------>
commit f4520fa1bcbd2fc979b5dcae101cfe9ea0b4217a
Author: Andrey Smetanin <asmetanin at virtuozzo.com>
Date:   Tue May 19 08:26:59 2015 +0400

    ploop: fix sync delay for sync requests
    
    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))



More information about the Devel mailing list