[Devel] [PATCH 1/2] ploop: Disable ioctl(PLOOP_IOC_BALLOON)
Kirill Tkhai
ktkhai at virtuozzo.com
Wed Apr 10 12:18:54 MSK 2019
This ioctl enters in discard maintaince mode
in hidden way. The discard logic is rewritten,
so we disable it.
v2: Leave entering into PLOOP_MNTN_BALLOON,
since it protects ploop against entering
another maintaince mode (grow, etc).
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
drivers/block/ploop/dev.c | 16 ----------------
1 file changed, 16 deletions(-)
diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 815c74438dd6..949617d5b14f 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -4524,22 +4524,6 @@ 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