From 09898ffdd942215e939df50e862e0f49be856c3a Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Fri, 29 Mar 2013 16:44:50 -0700 Subject: [PATCH] rbd: complete progress for import-diff from stdin The diff format gives us a size, so unlike a normal import, we do update progress. Signed-off-by: Josh Durgin --- src/rbd.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/rbd.cc b/src/rbd.cc index e35ce7c2dfa..f3158396f2a 100644 --- a/src/rbd.cc +++ b/src/rbd.cc @@ -1505,13 +1505,12 @@ static int do_import_diff(librbd::Image &image, const char *path) } done: - if (!from_stdin) { - if (r < 0) - pc.fail(); - else - pc.finish(); + if (r < 0) + pc.fail(); + else + pc.finish(); + if (!from_stdin) close(fd); - } return r; } -- 2.47.3