[Devel] [PATCH RHEL7 COMMIT] ploop: Actually do not split bio in kaio

Konstantin Khorenko khorenko at virtuozzo.com
Fri Jul 5 11:05:07 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.21.3.vz7.106.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.21.3.vz7.106.4
------>
commit 7e5df8b0b54517d266d82418d585f0c0a649adb0
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Fri Jul 5 11:05:04 2019 +0300

    ploop: Actually do not split bio in kaio
    
    max_discard_sectors = 0 disables discard at all.
    True value we had in maintaince mode is INT_MAX >> 9.
    
    https://jira.sw.ru/browse/PSBM-95948
    Fixes: 44b4e9571214 "ploop: Do not split discard bio in kaio"
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    khorenko@: max_discard_sectors means how big discard request can we handle.
    If we get a discard request bigger than our max_discard_sectors, than it will
    be splitted.  Here we increase max_discard_sectors to max, notifying we can
    handle a very big request, so effectively discard requests will never be
    splitted.
---
 drivers/block/ploop/io_kaio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/ploop/io_kaio.c b/drivers/block/ploop/io_kaio.c
index 1e68727a3f87..3632f8376fbe 100644
--- a/drivers/block/ploop/io_kaio.c
+++ b/drivers/block/ploop/io_kaio.c
@@ -1078,6 +1078,7 @@ static void kaio_queue_settings(struct ploop_io * io, struct request_queue * q)
 	 * https://jira.sw.ru/browse/PSBM-95772
 	 */
 	//ploop_set_discard_limits(io->plo);
+	q->limits.max_discard_sectors = UINT_MAX >> 9;
 }
 
 static void kaio_issue_flush(struct ploop_io * io, struct ploop_request *preq)



More information about the Devel mailing list