[Devel] [PATCH RHEL7 COMMIT] ploop: Fix discard BIOs mis accounting
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Feb 1 16:42:02 MSK 2019
The commit is pushed to "branch-rh7-3.10.0-957.1.3.vz7.83.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.1.3.vz7.83.9
------>
commit 8e258a43fdd55019dc594388d328ead2f9b687a6
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Fri Feb 1 16:42:00 2019 +0300
ploop: Fix discard BIOs mis accounting
Discard requests submitted in non-maintaince mode
never decremented. So, their number grows endlessly
in file:
$cat /sys/block/ploopXXX/pstate/discard_bios
Fix that.
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/block/ploop/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index a82988c1f538..c398026ff602 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -593,7 +593,7 @@ ploop_bio_queue(struct ploop_device * plo, struct bio * bio,
__TRACE("A %p %u\n", preq, preq->req_cluster);
- if (unlikely(preq->state & (1 << PLOOP_REQ_DISCARD)))
+ if (unlikely(bio->bi_rw & REQ_DISCARD))
plo->bio_discard_qlen--;
else
plo->bio_qlen--;
More information about the Devel
mailing list