[Devel] [PATCH RHEL7 COMMIT] ploop: prioritize BAT operations

Konstantin Khorenko khorenko at odin.com
Mon May 18 21:27:04 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 d742aa564de94c3816a9d3a7991adb00d23678d4
Author: Andrey Smetanin <asmetanin at virtuozzo.com>
Date:   Tue May 19 08:27:04 2015 +0400

    ploop: prioritize BAT operations
    
    Ploop uses ->read_page and ->write_page methods of pio_direct to read/write
    index table. These operations are rare and usually someone is blocked on them.
    Let's give them a priority by setting SYNCIO flag.
    
    Signed-off-by: Maxim Patlasov <MPatlasov at parallels.com>
---
 drivers/block/ploop/io_direct.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/block/ploop/io_direct.c b/drivers/block/ploop/io_direct.c
index c18d2f0..e5eb66a 100644
--- a/drivers/block/ploop/io_direct.c
+++ b/drivers/block/ploop/io_direct.c
@@ -1432,7 +1432,7 @@ static void
 dio_read_page(struct ploop_io * io, struct ploop_request * preq,
 	      struct page * page, sector_t sec)
 {
-	dio_io_page(io, READ, preq, page, sec);
+	dio_io_page(io, READ | REQ_SYNC, preq, page, sec);
 }
 
 static void
@@ -1444,7 +1444,8 @@ dio_write_page(struct ploop_io * io, struct ploop_request * preq,
 		return;
 	}
 
-	dio_io_page(io, WRITE | (fua ? REQ_FUA : 0), preq, page, sec);
+	dio_io_page(io, WRITE | (fua ? REQ_FUA : 0) | REQ_SYNC,
+		    preq, page, sec);
 }
 
 static int



More information about the Devel mailing list