[Devel] [PATCH RHEL7 COMMIT] ploop: Enable discard support for ploop1 format backed by io_direct

Konstantin Khorenko khorenko at virtuozzo.com
Thu Mar 7 16:45:54 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.1.3.vz7.93.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.1.3.vz7.93.1
------>
commit 089ea0f724bc88d7590c2b22d484019b28fb6cdc
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Thu Mar 7 16:45:52 2019 +0300

    ploop: Enable discard support for ploop1 format backed by io_direct
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/fmt_ploop1.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/block/ploop/fmt_ploop1.c b/drivers/block/ploop/fmt_ploop1.c
index c2be627b924d..1281a343bff4 100644
--- a/drivers/block/ploop/fmt_ploop1.c
+++ b/drivers/block/ploop/fmt_ploop1.c
@@ -189,7 +189,8 @@ ploop1_open(struct ploop_delta * delta)
 	    ((u64)ph->bd_size + ph->l1_off) << 9)
 		delta->flags |= PLOOP_FMT_PREALLOCATED;
 
-	set_bit(PLOOP_S_NO_FALLOC_DISCARD, &delta->plo->state);
+	if (delta->io.ops->id != PLOOP_IO_DIRECT)
+		set_bit(PLOOP_S_NO_FALLOC_DISCARD, &delta->plo->state);
 
 	return 0;
 



More information about the Devel mailing list