[Devel] [PATCH RHEL7 COMMIT] ploop: Prohibit discard in case of multi-delta case
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Mar 18 16:29:06 MSK 2019
The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.85.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.85.1
------>
commit e68a7564bf855efe8d004aadddd4897835ecdfac
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date: Mon Mar 18 16:29:04 2019 +0300
ploop: Prohibit discard in case of multi-delta case
We can't send discard in case of there are more than
on delta. Otherewise it is considered as REQ_WRITE
request and forces block allocation, which leads
to crash since bio list is NULL on discard.
Strange thing, crash dis -l shows me, that problem
address is on the bottoms branch of this function,
but really we go thru
delta && delta != top_delta && whole_block() branch.
https://jira.sw.ru/browse/PSBM-92785
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/block/ploop/dev.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 6349f0d556be..26745d9fc81f 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -2548,6 +2548,9 @@ static bool ploop_can_issue_discard(struct ploop_device *plo,
if (test_bit(PLOOP_S_NO_FALLOC_DISCARD, &plo->state))
return false;
+ if (!list_is_singular(&plo->map.delta_list))
+ return false;
+
return whole_block(plo, preq);
}
More information about the Devel
mailing list