[Devel] [PATCH RHEL7 COMMIT] ploop: Disable ioctl(PLOOP_IOC_BALLOON)

Konstantin Khorenko khorenko at virtuozzo.com
Thu Apr 11 13:09:13 MSK 2019


The commit is pushed to "branch-rh7-3.10.0-957.10.1.vz7.94.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.10.1.vz7.94.12
------>
commit cdc9c8f4750e837673dca5e4d12f26d799292d1c
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Thu Apr 11 13:09:11 2019 +0300

    ploop: Disable ioctl(PLOOP_IOC_BALLOON)
    
    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