[Devel] [PATCH RHEL7 COMMIT] ploop: remove preflush from dio_submit

Konstantin Khorenko khorenko at virtuozzo.com
Mon Jun 27 00:10:25 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.18.2.vz7.14.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.18.2.vz7.14.20
------>
commit 2b1ed059b7652289bd56abc580fe6eb6bdbb02f2
Author: Maxim Patlasov <mpatlasov at virtuozzo.com>
Date:   Mon Jun 27 11:10:24 2016 +0400

    ploop: remove preflush from dio_submit
    
    After commit c2247f3745 fixing barriers for ordinary
    requests and previous patch fixing delay_fua,
    that legacy code in dio_submit processing
    (preq->req_rw & REQ_FLUSH) by setting REQ_FLUSH in
    the first outgoing bio must die: it is incorrect
    anyway (we don't wait for completion of the first
    bio before sending others).
    
    Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
    Acked-by: Dmitry Monakhov <dmonakhov at virtuozzo.com>
---
 drivers/block/ploop/io_direct.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/block/ploop/io_direct.c b/drivers/block/ploop/io_direct.c
index fdf7273..10f965d 100644
--- a/drivers/block/ploop/io_direct.c
+++ b/drivers/block/ploop/io_direct.c
@@ -89,15 +89,12 @@ dio_submit(struct ploop_io *io, struct ploop_request * preq,
 	sector_t sec, nsec;
 	int err;
 	struct bio_list_walk bw;
-	int preflush;
 	int postfua = 0;
 	int write = !!(rw & REQ_WRITE);
 	int delayed_fua = 0;
 
 	trace_submit(preq);
 
-	preflush = !!(rw & REQ_FLUSH);
-
 	if (test_and_clear_bit(PLOOP_REQ_FORCE_FUA, &preq->state))
 		postfua = 1;
 
@@ -237,10 +234,6 @@ flush_bio:
 		b->bi_private = preq;
 		b->bi_end_io = dio_endio_async;
 
-		if (unlikely(preflush)) {
-			rw2 |= REQ_FLUSH;
-			preflush = 0;
-		}
 		if (unlikely(postfua && !bl.head))
 			rw2 |= REQ_FUA;
 


More information about the Devel mailing list