[Devel] [PATCH RHEL7 COMMIT] Revert "ploop: Disable ioctl(PLOOP_IOC_BALLOON)"
Konstantin Khorenko
khorenko at virtuozzo.com
Thu May 23 17:43:11 MSK 2019
The commit is pushed to "branch-rh7-3.10.0-957.12.2.vz7.96.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.12.2.vz7.96.3
------>
commit 1a72f7ea47a914060d2af4263c32bca989c9ed55
Author: Konstantin Khorenko <khorenko at virtuozzo.com>
Date: Thu May 23 17:40:35 2019 +0300
Revert "ploop: Disable ioctl(PLOOP_IOC_BALLOON)"
This reverts commit 79a7179319069e66e2a410074cac0f402777f0b9.
This is an additional patch for patchset "ploop: Return maintaince mode"
This patch set enables it for vstorage.
Also, added file /sys/block/ploopXXX/pstate/native_discard,
which shows, whether we should use maintaince-mode based
discard or not.
https://jira.sw.ru/browse/PSBM-94662
Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
drivers/block/ploop/dev.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 36df41450c4d..21cf83f2c408 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -4535,6 +4535,22 @@ static int ploop_balloon_ioc(struct ploop_device *plo, unsigned long arg)
return -EINVAL;
switch (plo->maintenance_type) {
+ case PLOOP_MNTN_DISCARD:
+ if (!test_bit(PLOOP_S_DISCARD_LOADED, &plo->state))
+ break;
+
+ ploop_quiesce(plo);
+ clear_bit(PLOOP_S_DISCARD_LOADED, &plo->state);
+ plo->maintenance_type = PLOOP_MNTN_FBLOADED;
+ ploop_fb_lost_range_init(plo->fbd, delta->io.alloc_head);
+ ploop_relax(plo);
+ /* fall through */
+ case PLOOP_MNTN_FBLOADED:
+ case PLOOP_MNTN_RELOC:
+ BUG_ON (!plo->fbd);
+ ctl.alloc_head = ploop_fb_get_alloc_head(plo->fbd);
+ ctl.level = ploop_fb_get_freezed_level(plo->fbd);
+ break;
case PLOOP_MNTN_OFF:
if (ctl.inflate) {
if (delta->ops->id != PLOOP_FMT_PLOOP1)
More information about the Devel
mailing list