[Devel] [PATCH RHEL7 COMMIT] ploop: push_backup: fix ploop_push_backup_io_read()

Konstantin Khorenko khorenko at virtuozzo.com
Fri May 13 08:14:51 PDT 2016


The commit is pushed to "branch-rh7-3.10.0-327.10.1.vz7.12.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.10.1.vz7.12.19
------>
commit 159bc2053c487eb977aebe73b7582299ff568b3a
Author: Maxim Patlasov <mpatlasov at virtuozzo.com>
Date:   Fri May 13 19:14:51 2016 +0400

    ploop: push_backup: fix ploop_push_backup_io_read()
    
    ploop_push_backup_io_read() services ioctl(PLOOP_IOC_PUSH_BACKUP_IO)
    for direction = PLOOP_READ.
    
    If at least one extent is successfully filled, the -ENOENT error from
    ploop_pb_get_pending() must be interpreted as "OK, no more data present".
    
    https://jira.sw.ru/browse/PSBM-45000
    
    Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
---
 drivers/block/ploop/dev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/block/ploop/dev.c b/drivers/block/ploop/dev.c
index 6058449..8dd1ffa 100644
--- a/drivers/block/ploop/dev.c
+++ b/drivers/block/ploop/dev.c
@@ -4582,7 +4582,9 @@ static int ploop_push_backup_io_read(struct ploop_device *plo, unsigned long arg
 	while (n_extents < ctl->n_extents) {
 		cluster_t clu, len;
 		rc = ploop_pb_get_pending(plo->pbd, &clu, &len, n_extents);
-		if (rc)
+		if (rc == -ENOENT && n_extents)
+			break;
+		else if (rc)
 			goto io_read_done;
 
 		e[n_extents].clu = clu;


More information about the Devel mailing list