[Devel] [PATCH RHEL7 COMMIT] ploop: Simplify check in ploop_fast_end_io()

Konstantin Khorenko khorenko at virtuozzo.com
Fri Mar 6 13:55:47 MSK 2020


The commit is pushed to "branch-rh7-3.10.0-1062.12.1.vz7.145.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1062.12.1.vz7.131.8
------>
commit 2ff2aae805bf1ad4540a125c12330620e69d00d0
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Mar 6 13:55:46 2020 +0300

    ploop: Simplify check in ploop_fast_end_io()
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    =====================
    Patchset description:
    
    ploop: Be over protectable on discard
    
    Forcedly wait and disable discard on snapshot and grow.
    
    Kirill Tkhai (4):
          ploop: Simplify check in ploop_fast_end_io()
          ploop: Rename fast_path_waitq into pending_waitq
          ploop: Rename bio_discard_inflight_reqs into discard_inflight_reqs
          ploop: Be overprotective on discard
---
 drivers/block/ploop/dev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 8e09b45f3e94d..7ef4432a0082b 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -673,8 +673,8 @@ DEFINE_BIO_CB(ploop_fast_end_io)
 	    (test_bit(PLOOP_S_EXITING, &plo->state) ||
 	     !list_empty(&plo->entry_queue)))
 		wake_up_interruptible(&plo->waitq);
-	if ((plo->fast_path_disabled_count || plo->bio_discard_inflight_reqs) &&
-	    !plo->fastpath_reqs)
+	if (!plo->fastpath_reqs &&
+	    waitqueue_active(&plo->fast_path_waitq))
 		wake_up(&plo->fast_path_waitq);
 	spin_unlock_irqrestore(&plo->lock, flags);
 


More information about the Devel mailing list