[RHEL7,COMMIT] ploop: Make PLOOP_IOC_FREEBLKS always return 0

Submitted by Konstantin Khorenko on April 11, 2019, 10:09 a.m.

Details

Message ID 201904111009.x3BA9BwT012330@finist-ce7.sw.ru
State New
Series "Series without cover letter"
Headers show

Commit Message

Konstantin Khorenko April 11, 2019, 10:09 a.m.
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 98c63fbc561c3c62027708483213fcdc424d5677
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Thu Apr 11 13:09:11 2019 +0300

    ploop: Make PLOOP_IOC_FREEBLKS always return 0
    
    This passes balloon file blocks to kernel.
    New native discard scheme should send discard in these blocks.
    Make it return 0 for a while to make tests happy
    (later, it will be needed to implement cycle,
    sending discards in the blocks).
    
    Note, that the ioctl won't return any data to userspace anymore,
    since in new scheme it's not needed to call PLOOP_IOC_RELOCBLKS after that
    (everything should be made in PLOOP_IOC_FREEBLKS).
    
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 drivers/block/ploop/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 949617d5b14f..37685356d08a 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -4555,7 +4555,7 @@  static int ploop_freeblks_ioc(struct ploop_device *plo, unsigned long arg)
 	int i;
 	int rc = 0;
 
-	return -EINVAL;
+	return 0;
 
 	if (list_empty(&plo->map.delta_list))
 		return -ENOENT;